SA-MP Forums Archive
Server:Unknown Command - 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: Server:Unknown Command (/showthread.php?tid=556228)



Server:Unknown Command - AgusZ - 10.01.2015

why ?


Код:
	if (strcmp("/dance", cmdtext, true) == 0)
		{
        if(!IsAblePedAnimation(playerid)) return 1;
        switch(strval(params))
        {
        case 1: SetPlayerSpecialAction(playerid, 5);
        case 2: SetPlayerSpecialAction(playerid, 6);
        case 3: SetPlayerSpecialAction(playerid, 7);
        case 4: SetPlayerSpecialAction(playerid, 8);
        default: SendClientMessage(playerid, COLOR_WHITE, "USAGE: /dance [1-4]");
        }
        return 1;



Re: Server:Unknown Command - ATGOggy - 10.01.2015

Try this:
PHP код:
if(strcmp("/dance "cmdtexttrue8) == 0)
{
    if(!
IsAblePedAnimation(playerid)) return 1;
    switch(
strval(params))
    {
        case 
1SetPlayerSpecialAction(playerid5);
        case 
2SetPlayerSpecialAction(playerid6);
        case 
3SetPlayerSpecialAction(playerid7);
        case 
4SetPlayerSpecialAction(playerid8);
        default: 
SendClientMessage(playeridCOLOR_WHITE"USAGE: /dance [1-4]");
    }
    return 
1;