09.08.2012, 23:42
True;
phillip875: The OnPlayerCommandText callback returns 0 not 1;
Wiki: https://sampwiki.blast.hk/wiki/OnPlayerCommandText
Regards,
FalconX
phillip875: The OnPlayerCommandText callback returns 0 not 1;
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth (playerid, 0);
SendClientMessage (playerid, 0x4D34B3FF, "You have killed yourself, idiot.");
return 1;
}
return 0;// it should be 0 not 1..
// Returning 0 informs the server that the command hasn't been processed by this script.
// OnPlayerCommandText will be called in other scripts until one returns 1.
// If no scripts return 1, the 'SERVER: Unknown Command' message will be shown.
}
Regards,
FalconX