19.02.2009, 19:36
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:
And this is what i get when i try to compile

Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256], idx; cmd = strtok(cmdtext, idx); if (strcmp(cmd, "/kill", true) == 0) { SetPlayerHealth(playerid, 0.0); } }
Код:
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"