SA-MP Forums Archive
Help please! /kill cmd - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help please! /kill cmd (/showthread.php?tid=87977)



Help please! /kill cmd - lolpurple - 23.07.2009

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(0);
return 1;
}
return 0;
}

Why does this simple command not work? I get the warning -warning 202: number of arguments does not match definition
When tested in my server it occasionally works but often does not work -- in both cases it says "Server did not recognise commmand". Please help! I'd like to use /kill


Re: Help please! /kill cmd - refshal - 23.07.2009

pawn Код:
SetPlayerHealth(playerid, 0);



Re: Help please! /kill cmd - iLinx - 23.07.2009

yus, you gotta put in the playerid in the Setplayerhealth or else samp wont know which player to set heath = 0


Re: Help please! /kill cmd - lolpurple - 23.07.2009

thankyou!