Quote:
Originally Posted by TheToretto
PHP Code:
public OnPlayerText(playerid, text[])
{
if(strfind(text, "/rcon", true) != -1 || strfind(text, "/ rcon", true) != -1 || strfind(text, "rcon", true) != -1)
{
SendClientMessage(playerid, -1, "Bad idea.");
// Ban him if you want to :)
return 0;
}
return 1;
}
This will prevent the message from being sent + warn/sanction the player.
|
/rcon is a client-side command it'll process regardless of whatever you do under OnPlayerText or OnPlayerCommandText. Just like /pagesize and /headmove and so on. And the fact that you're going to ban/kick someone for simply saying rcon is irrelevant too!