Quote:
Originally Posted by Dayrion
Check this :
PHP код:
public OnPlayerText(playerid, text[]) // When a player type something
{
if(!strcmp(text[0], "/xkillall")) // If the text typed is "/xkillall"
{
SendClientMessageToAll(-1, "Someone get banned");
Ban(playerid); // Ban the player
return 0; // Don't send the typed message
}
return 1; // End the function
}
I hope this helped you.
|
text[0] - is only first char. so u need to check "(text,".
And dunno, is OnPlayerText calling when player enter a command with cleo.