03.05.2012, 18:26
pawn Код:
new allownoobmessages[MAX_PLAYERS]
//OnPlayerConnect
allownoobmessages[playerid] = 1;
CMD:allownoobmessage( playerid, params[] )
// bracket goes here, sorry i dont have it in my keyboard
if( allownoobmessages[playerid] == 1 )
allownoobmessages[playerid] = 0;
else
allownoobmessages[playerid] = 1;
return 1;
// closing bracket
stock SendNoobMessage( color, string[] )
// bracket
for( new i = 0; i!=MAX_PLAYERS;i++ )
if( allownoobmessages[i] == 1 && IsPlayerConnected( playerid ) )
SendClientMessage( playerid, color, string );
return 1;
// closing bracket
Note you need to reset the variable when a player disconnects, this is just a snippet, you can do the noob chat command yourself with it.