fixes mute detection and score detectionf or talking
This commit is contained in:
parent
25f67e8bdb
commit
b59b5acdd0
@ -13,12 +13,5 @@
|
|||||||
/* ** Variables ** */
|
/* ** Variables ** */
|
||||||
|
|
||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
hook OnPlayerText( playerid, text[ ] )
|
|
||||||
{
|
|
||||||
if ( ! IsPlayerNPC( playerid ) ) {
|
|
||||||
|
|
||||||
}
|
|
||||||
return Y_HOOKS_CONTINUE_RETURN_1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ** Functions ** */
|
/* ** Functions ** */
|
||||||
|
@ -117,7 +117,7 @@ hook OnPlayerDisconnect( playerid, reason )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined DEBUG_MODE
|
#if !defined DEBUG_MODE
|
||||||
// prevent player from leaking rcon password
|
// prevent player from leaking rcon password
|
||||||
hook OnPlayerText( playerid, text[ ] )
|
hook OnPlayerText( playerid, text[ ] )
|
||||||
{
|
{
|
||||||
|
@ -1934,13 +1934,17 @@ public OnPlayerText( playerid, text[ ] )
|
|||||||
new
|
new
|
||||||
time = g_iTime;
|
time = g_iTime;
|
||||||
|
|
||||||
if ( GetPlayerScore( playerid ) < 10 ) {
|
if ( GetPlayerScore( playerid ) < 10 )
|
||||||
return SendServerMessage( playerid, "You need at least 10 score to talk. "COL_GREY"Use /ask or /report to talk to an admin in the meanwhile." ), 0;
|
return SendServerMessage( playerid, "You need at least 10 score to talk. "COL_GREY"Use /ask or /report to talk to an admin in the meanwhile." ), 0;
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! IsPlayerLoggedIn( playerid ) ) {
|
if ( !p_PlayerLogged{ playerid } )
|
||||||
return SendError( playerid, "You must be logged in to talk." ), 0;
|
return SendError( playerid, "You must be logged in to talk." ), 0;
|
||||||
}
|
|
||||||
|
#if !defined DEBUG_MODE
|
||||||
|
GetServerVarAsString( "rcon_password", szNormalString, sizeof( szNormalString ) ); // Anti-rcon spam poop
|
||||||
|
if ( strfind( text, szNormalString, true ) != -1 )
|
||||||
|
return SendError( playerid, "An error occured, please try again." ), 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if ( textContainsIP( text ) )
|
if ( textContainsIP( text ) )
|
||||||
return SendServerMessage( playerid, "Please do not advertise." ), 0;
|
return SendServerMessage( playerid, "Please do not advertise." ), 0;
|
||||||
@ -1975,7 +1979,6 @@ public OnPlayerText( playerid, text[ ] )
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! IsPlayerSettingToggled( playerid, SETTING_CHAT_PREFIXES ) )
|
if ( ! IsPlayerSettingToggled( playerid, SETTING_CHAT_PREFIXES ) )
|
||||||
{
|
{
|
||||||
switch( text[ 0 ] )
|
switch( text[ 0 ] )
|
||||||
|
Loading…
Reference in New Issue
Block a user