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



Command (Unknow Command) - lsreskjn - 22.07.2013

Hey, this is my command for health...it s show the message and the command is working but i also shows in chat SERVER:unknow command

Код:
if(strcmp("/zivot", cmdtext) == 0)
    {
		SetPlayerHealth(playerid,100); // Nastavi zivot na 100
		SendClientMessage(playerid, 0x800080FF, "[ Server ] Zivot nastaveny na 100HP.");
    }



Re: Command (Unknow Command) - Remba031 - 22.07.2013

Quote:
Originally Posted by lsreskjn
Посмотреть сообщение
Hey, this is my command for health...it s show the message and the command is working but i also shows in chat SERVER:unknow command

Код:
if(strcmp("/zivot", cmdtext) == 0)
    {
		SetPlayerHealth(playerid,100); // Nastavi zivot na 100
		SendClientMessage(playerid, 0x800080FF, "[ Server ] Zivot nastaveny na 100HP.");
    }
Try this
Код:
if(strcmp("/zivot", cmdtext) == 0)
    {
		SetPlayerHealth(playerid,100); // Nastavi zivot na 100
		SendClientMessage(playerid, 0x800080FF, "[ Server ] Zivot nastaveny na 100HP.");
                return 1;
    }



Re: Command (Unknow Command) - sniperwars - 22.07.2013

You haven't returned the command so it gives the SERVER: Unknown Command.

pawn Код:
if(strcmp("/zivot", cmdtext) == 0)
{
     SetPlayerHealth(playerid,100); // Nastavi zivot na 100
     SendClientMessage(playerid, 0x800080FF, "[ Server ] Zivot nastaveny na 100HP.");
     return 1;
}