Kill /kill
#1

Hello, how can i kill myself with cmd /kill? I have made it, but compiler shows errors Can anyone help me, this is my script:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new cmd[256], idx;
	cmd = strtok(cmdtext, idx);
	
	if (strcmp(cmd, "/kill", true) == 0)
	{
	  SetPlayerHealth(playerid, 0.0);
	}
}
And this is what i get when i try to compile

Код:
C:\Documents and Settings\Martynas\Desktop\samp\gamemodes\timertest.pwn(71) : error 017: undefined symbol "strtok"
C:\Documents and Settings\Martynas\Desktop\samp\gamemodes\timertest.pwn(71) : error 033: array must be indexed (variable "cmd")
C:\Documents and Settings\Martynas\Desktop\samp\gamemodes\timertest.pwn(70) : warning 203: symbol is never used: "idx"
Reply


Messages In This Thread
Kill /kill - by walrus - 19.02.2009, 19:36
Re: Kill /kill - by Grim_ - 19.02.2009, 19:38
Re: Kill /kill - by walrus - 19.02.2009, 19:39
Re: Kill /kill - by amrour - 19.02.2009, 19:41
Re: Kill /kill - by Grim_ - 19.02.2009, 19:43
Re: Kill /kill - by walrus - 19.02.2009, 19:59
Re: Kill /kill - by TheArbiter97 - 24.04.2009, 09:25

Forum Jump:


Users browsing this thread: 2 Guest(s)