SA-MP Forums Archive
CMD: - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: CMD: (/showthread.php?tid=402307)



CMD: - WiseRice - 26.12.2012

How to add animations using CMD?


Respuesta: CMD: - Strier - 26.12.2012

pawn Код:
COMMAND:piss(playerid, params[])
{
    #pragma unused params  //This is because, we don't use params on this command
    SetPlayerSpecialAction(playerid,68); //SetPlayerSpecialAction, piss is an special action is not an animation
    return 1;
}
Example 2.
pawn Код:
COMMAND:handsup(playerid, params[])
{
    #pragma unused params
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_HANDSUP);
    return 1;
}
Using strcmp
pawn Код:
if (strcmp("/dance", cmdtext, true, 6) ==0) // 6 because it is the command letters
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DAN CE1); //here is our special action
return 1;
}
Those are actions ids
https://sampwiki.blast.hk/wiki/SpecialActions