Szerző Téma: Kézfogás, anim hiba  (Megtekintve 767 alkalommal)

Nem elérhető BVZS

  • 487
    • Profil megtekintése
Kézfogás, anim hiba
« Dátum: 2013. Március 10. - 10:32:38 »
0 Show voters
Szép jóreggelt mindenkinek!
Srácok, olyan problémám lenne, hogy van egy kézfogásos scriptem, ami addig tökéletesen mûködik, míg be nem jön az animáció. Tehát amikor elfogadja a játékos a kézfogást, elindul 2 animáció, ugye annak aki kezet szeretne fogni és annak akivel szeretné ezt. Sajnos mindig csak magunknak mutatja az animációt, az elõttünk álló játékosnak meg nem. Kérem aki tud erre valamit, az feltétlen írjon, mert nagyon fontos lenne.




CMD:shake(playerid, params[])
{
new stilus, id;
if(sscanf(params, \"ud\", id, stilus))
{
       SendClientMessage(playerid,ZOLD, \"Használat: /shakehand [playerid] [1-9]\");
}
else
{
    if(IsPlayerConnected(id))
    {
          if(!ProxDetectorS(1.5, playerid,id)) SendClientMessage(playerid,VPIROS,\"*Nem vagy közel a játékoshoz\");
   else {
            if(stilus >= 1 && stilus < 10)
            {
            jatekos[id][shakeAjanlasStilus] = stilus;
            jatekos[id][shakeAjanlas] = playerid;
                    SendFormattedMessage(playerid,SZOLD, \"*Kezet szeretnél fogni %s-val/vel.\",GetRPName(id));
                    SendFormattedMessage(id,SZOLD, \"*%s kezet szeretne fogni veled. /accept shake\",GetRPName(playerid));
            }  else {
                SendClientMessage(playerid,ZOLD, \"Használat: /shake [playerid] [1-9]\");
            }
        }
    } else {
        SendClientMessage(playerid,VPIROS, \"*A játékos nincs fennt a szerveren.\");
    }
}
return 1;
}
/accept-nél:
else if(strcmp(alparancs, \"shake\",true)==0)
{
    //new id;
    if(jatekos[playerid][shakeAjanlas] != -1)
    {
        if(!ProxDetectorS(1.5, playerid,jatekos[playerid][shakeAjanlas])) SendClientMessage(playerid,VPIROS,\"*Nem vagy közel a játékoshoz\");
      else {
           switch(jatekos[playerid][shakeAjanlasStilus])
           {
               case 1:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkaa\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkaa\", 4.0, 1, 1, 1, 0, 1000);
                   jatekos[playerid][shakeAjanlas] = -1;
            }
               case 2:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkba\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkba\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
               case 3:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkca\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkca\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
               case 4:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkcb\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkcb\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
               case 5:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkda\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkda\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
               case 6:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkea\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkea\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
               case 7:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkfa\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkfa\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
               case 8:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"hndshkfa_swt\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"hndshkfa_swt\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
               case 9:
               {
                   SzemtolSzemben(playerid, jatekos[playerid][shakeAjanlas]);
                   ApplyPlayerAnimation(playerid, \"GANGS\", \"prtial_hndshk_01\", 4.0, 1, 1, 1, 0, 1000);
                   ApplyPlayerAnimation(jatekos[playerid][shakeAjanlas], \"GANGS\", \"prtial_hndshk_01\", 4.0, 1, 1, 1, 0, 1000);
               jatekos[playerid][shakeAjanlas] = -1;
               }
         }
      }
    } else {
        SendClientMessage(playerid,VPIROS, \"*Nem akar veled senki sem kezet fogni.\");
    }
}

Nem elérhető Kovacs_Richard

  • 1743
  • HRP Fejlesztő
  • Discord: Kovacs_Richard#0321
    • Profil megtekintése
    • Hun Role Play Web
Kézfogás, anim hiba
« Válasz #1 Dátum: 2013. Március 10. - 11:11:31 »
0 Show voters
http://wiki.sa-mp.com/wiki/ApplyAnimation
az utolsó paramétered hiányzik ( ami alapértelmezés szerint 0 )
 
forcesync   Set to 1 to force playerid to sync animation with other players in all instances (optional).[/quote]
Régóta nem tevékenykedem, mint SA-MP scripter.
HRP Fejlesztő.

Nem elérhető BVZS

  • 487
    • Profil megtekintése
Kézfogás, anim hiba
« Válasz #2 Dátum: 2013. Március 10. - 12:10:33 »
0 Show voters
Beírtam a végére de most is ugyan az a problémám.

Kézfogás, anim hiba
« Válasz #3 Dátum: 2013. Március 10. - 14:49:18 »
0 Show voters
Írj -1-et. Talán csak szinkronizációs hiba lehet.
« Utoljára szerkesztve: 2013. Március 10. - 15:06:01 írta takehun »

Nem elérhető BVZS

  • 487
    • Profil megtekintése
Kézfogás, anim hiba
« Válasz #4 Dátum: 2013. Március 12. - 11:24:43 »
0 Show voters
Azt írtam, továbbra sem jó..

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal