30.06.2012, 22:42
Hello, im very good with commands and good with sscanf but got a problem i want to make a command /dance <1-4> but unsure of doing it.
CMD:dance(playerid, params[])
{
new dance;
if(sscanf(params, "d", dance))
return SendClientMessage(playerid, -1, "* USE: /dance [1-4]");
if(dance == 1) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1); }
else if(dance == 2) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2); }
else if(dance == 3) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3); }
else if(dance == 4) { SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4); }
else { SendClientMessage(playerid, -1, "* USE: /dance [1-4]"); return 1; }
return 1;
}