/dance1
#1

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
Reply
#2

https://sampwiki.blast.hk/wiki/SetPlayerSpecialAction

Example:

pawn Код:
CMD:dance1(playerid,params[])
{
    SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
    return 1;
}
Reply
#3

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;
}
Reply
#4

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)