05.10.2014, 01:24
pawn Код:
public OnPlayerText(playerid, text[])
{
if ( PlayerInfo[ playerid ][ Muted ] == 1 )
{
FormatMSG( playerid, COLOR_ULTRARED, "You are muted, if you continue to speak you will be kicked. ({33CCFF}%d{FF0000}/5)", PlayerInfo[ playerid ][ MuteWarnings ] );
PlayerInfo[ playerid ][ MuteWarnings ]++;
return 0;
}
if ( PlayerInfo[ playerid ][ MuteWarnings ] > 5 ) // If you players got warned
{
SendClientMessage( playerid, COLOR_ULTRARED, "You have been warned! Now you have been kicked" );
FormatLog( "KickLog", "*** %s(%d) have been auto-kicked. Reason: Exceding max mute warnings !", PlayerName( playerid ), playerid );
Kick( playerid );
return 0;
}
return 1;
}