From 7fe17a317f15cf7be0e5b4475a90d886e77dc552 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Sun, 23 Dec 2018 12:35:32 +1100 Subject: [PATCH] bug fix with chuff saying random stuff in chat --- gamemodes/irresistible/cnr/auth/login.pwn | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gamemodes/irresistible/cnr/auth/login.pwn b/gamemodes/irresistible/cnr/auth/login.pwn index 25fba23..a57290c 100644 --- a/gamemodes/irresistible/cnr/auth/login.pwn +++ b/gamemodes/irresistible/cnr/auth/login.pwn @@ -15,12 +15,16 @@ /* ** Hooks ** */ hook OnPlayerText( playerid, text[ ] ) { - 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." ), Y_HOOKS_BREAK_RETURN_1; + if ( ! IsPlayerNPC( playerid ) ) { - if ( ! IsPlayerLoggedIn( playerid ) ) - return SendError( playerid, "You must be logged in to talk." ), Y_HOOKS_BREAK_RETURN_1; + 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." ), Y_HOOKS_BREAK_RETURN_1; + } + if ( ! IsPlayerLoggedIn( playerid ) ) { + return SendError( playerid, "You must be logged in to talk." ), Y_HOOKS_BREAK_RETURN_1; + } + } return Y_HOOKS_CONTINUE_RETURN_1; }