/dance1 - 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: /dance1 (
/showthread.php?tid=474935)
/dance1 -
Another1 - 10.11.2013
how to put this in one command like /dance1 /dance2 etc....
pawn Код:
5 - SPECIAL_ACTION_DANCE1
6 - SPECIAL_ACTION_DANCE2
7 - SPECIAL_ACTION_DANCE3
8 - SPECIAL_ACTION_DANCE4
Re: /dance1 -
DobbysGamertag - 10.11.2013
https://sampwiki.blast.hk/wiki/SetPlayerSpecialAction
Example:
pawn Код:
CMD:dance1(playerid,params[])
{
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
return 1;
}
Re: /dance1 -
erminpr0 - 10.11.2013
pawn Код:
YCMD:dance(playerid, params[], help)
{
#pragma unused help
if(isnull(params))
{
SendClientMessage(playerid, 0xAAAAAAFF, "Usage: /dance [style]");
SendClientMessage(playerid, 0xAAAAAAFF, "Styles: 1, 2, 3, 4");
return 1;
}
else if(params < 1 || params > 4)
return SendClientMessage(playerid, 0xAAAAAAFF, "(Error) Style can't go below 1 or above 4!");
SetPlayerSpecialAction(playerid, params + 4);
return 1;
}
Re: /dance1 -
NeMoK - 10.11.2013
pawn Код:
#include <sscanf2>
#include <zcmd>
#define SCM SendClientMessage
#define COLOR_ERROR 0x808080FF
CMD:dance(playerid,params[])
{
new style;
if(sscanf(params,"d",style)) return SCM(playerid,COLOR_ERROR,"Usage: /dance [1-4]");
if(style<1||style>4) return SCM(playerid,COLOR_ERROR,"Use a style between 1 and 4.");
SetPlayerSpecialAction(playerid, style+4);
return 1;
}
HERE the sscanf2
https://sampforum.blast.hk/showthread.php?tid=120356
HERE the zcmd
https://sampforum.blast.hk/showthread.php?tid=91354