08.01.2010, 14:05
So yeah, Im trying to make a command where it allow you to type /dance 1-4. But when I try my command below it gives SERVER: UNKNOWN COMMAND message. I added the dcmd part in OnPlayerCommandText so thats not the problem.
Also when I tried it earlier it did the first anim even if I did /dance 4.
So I'm not 100% sure about how I should do commands like this, any help would be extremly helpfull!
Thanks, [03]Garsino.
Also when I tried it earlier it did the first anim even if I did /dance 4.
So I'm not 100% sure about how I should do commands like this, any help would be extremly helpfull!
pawn Код:
dcmd_dance(playerid,params[])
{
if(!strval(params)) return SendClientMessage(playerid, RED, "Usage: /dance 1-4");
switch(strval(params))
{
case 0: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE1);
case 1: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE2);
case 2: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE3);
case 3: SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DANCE4);
}
return 1;
}