GTA Közösség - A magyar GTA fórum

San Andreas Multiplayer (SA-MP) => SA-MP: Szerverfejlesztés => Segítségkérés => A témát indította: BVZS - 2013. március 10. - 10:32:38

Cím: Kézfogás, anim hiba
Írta: BVZS - 2013. március 10. - 10:32:38
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.\");
    }
}
Cím: Kézfogás, anim hiba
Írta: Kovacs_Richard - 2013. március 10. - 11:11:31
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]
Cím: Kézfogás, anim hiba
Írta: BVZS - 2013. március 10. - 12:10:33
Beírtam a végére de most is ugyan az a problémám.
Cím: Kézfogás, anim hiba
Írta: takehun - 2013. március 10. - 14:49:18
Írj -1-et. Talán csak szinkronizációs hiba lehet.
Cím: Kézfogás, anim hiba
Írta: BVZS - 2013. március 12. - 11:24:43
Azt írtam, továbbra sem jó..