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 ( p_Class[ playerid ] == CLASS_POLICE )
if ( p_Class[ playerid ] == CLASS_POLICE && ! IsPlayerChatBanned ( playerid ) )
{
format( szBigString, 144, "%s", text );
@ -109,7 +109,8 @@ CMD:t( playerid, params[ ] )
;
if ( GetPlayerClass( playerid ) != CLASS_POLICE ) return SendError( playerid, "Only police can use this command!" );
else if ( sscanf( params, "s[90]", msg ) ) return SendUsage( playerid, "/t [MESSAGE]" );
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 ( p_Class[ playerid ] == CLASS_POLICE )

View File

@ -1624,7 +1624,7 @@ public OnPlayerText( playerid, text[ ] )
DCC_SendChannelMessageFormatted( discordChatChan, "**[%s] (VIP) %s(%d):** %s", getCurrentTime(), ReturnPlayerName( playerid ), playerid, text[ 1 ] );
SendClientMessageToAllFormatted( 0x3eff3eff, "[VIP] %s(%d):{9ec34f} %s", ReturnPlayerName( playerid ), playerid, text[ 1 ] );
return 0;
}
}
}
case '$':
{
@ -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" );
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 ( textContainsIP( msg ) ) return SendServerMessage( playerid, "Please do not advertise." );
else
@ -3378,6 +3379,7 @@ CMD:me( playerid, params[ ] )
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." );
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
{