chatban-fix

fixes
This commit is contained in:
Sultan1337 2019-06-24 14:52:30 -07:00
parent c619235d27
commit b1c708bf81
2 changed files with 6 additions and 3 deletions

View File

@ -76,7 +76,7 @@ hook OnPlayerText( playerid, text[ ] )
{ {
if ( text[ 0 ] == '!' && ! IsPlayerSettingToggled( playerid, SETTING_CHAT_PREFIXES ) ) if ( text[ 0 ] == '!' && ! IsPlayerSettingToggled( playerid, SETTING_CHAT_PREFIXES ) )
{ {
if ( p_Class[ playerid ] == CLASS_POLICE ) if ( p_Class[ playerid ] == CLASS_POLICE && ! IsPlayerChatBanned ( playerid ) )
{ {
format( szBigString, 144, "%s", text ); format( szBigString, 144, "%s", text );
@ -109,6 +109,7 @@ CMD:t( playerid, params[ ] )
; ;
if ( GetPlayerClass( playerid ) != CLASS_POLICE ) return SendError( playerid, "Only police can use this command!" ); if ( GetPlayerClass( playerid ) != CLASS_POLICE ) return SendError( playerid, "Only police can use this command!" );
else if ( IsPlayerChatBanned( playerid ) ) return SendError( playerid, "You can not use this feature as you are chat banned." );
else if ( sscanf( params, "s[90]", msg ) ) return SendUsage( playerid, "/t [MESSAGE]" ); else if ( sscanf( params, "s[90]", msg ) ) return SendUsage( playerid, "/t [MESSAGE]" );
else else
{ {

View File

@ -2242,6 +2242,7 @@ CMD:vsay( playerid, params[ ] )
; ;
if ( p_VIPLevel[ playerid ] < 1 ) return SendError( playerid, "You are not a V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" ); if ( p_VIPLevel[ playerid ] < 1 ) return SendError( playerid, "You are not a V.I.P, to become one visit "COL_GREY"donate.sfcnr.com" );
else if ( IsPlayerChatBanned( playerid ) ) return SendError( playerid, "You have been chat banned and are not allowed to chat." );
else if ( sscanf( params, "s[100]", msg ) ) return SendUsage( playerid, "/vsay [MESSAGE]" ); else if ( sscanf( params, "s[100]", msg ) ) return SendUsage( playerid, "/vsay [MESSAGE]" );
else if ( textContainsIP( msg ) ) return SendServerMessage( playerid, "Please do not advertise." ); else if ( textContainsIP( msg ) ) return SendServerMessage( playerid, "Please do not advertise." );
else else
@ -3378,6 +3379,7 @@ CMD:me( playerid, params[ ] )
new action[70]; new action[70];
if ( p_Muted{ playerid } == true && g_iTime < p_MutedTime[ playerid ] ) return SendError( playerid, "You cannot use this feature as you are muted." ); if ( p_Muted{ playerid } == true && g_iTime < p_MutedTime[ playerid ] ) return SendError( playerid, "You cannot use this feature as you are muted." );
else if ( GetPlayerScore( playerid ) < 25 ) return SendError( playerid, "You need at least 25 score to use this feature (spamming purposes)." ); else if ( GetPlayerScore( playerid ) < 25 ) return SendError( playerid, "You need at least 25 score to use this feature (spamming purposes)." );
else if ( IsPlayerChatBanned( playerid ) ) return SendError( playerid, "You have been chat banned and are not allowed to chat." );
else if ( sscanf( params, "s[70]", action ) ) return SendUsage( playerid, "/me [ACTION]" ); else if ( sscanf( params, "s[70]", action ) ) return SendUsage( playerid, "/me [ACTION]" );
else else
{ {