From d7e803acc9f58ed286a7f4714462532a9147cbe5 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Tue, 11 Sep 2018 03:20:01 +1000 Subject: [PATCH] bug fixes for paintball module --- gamemodes/irresistible/cnr/features/paintball.pwn | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/paintball.pwn b/gamemodes/irresistible/cnr/features/paintball.pwn index aa5c061..1723426 100644 --- a/gamemodes/irresistible/cnr/features/paintball.pwn +++ b/gamemodes/irresistible/cnr/features/paintball.pwn @@ -1,6 +1,6 @@ /* * Irresistible Gaming (c) 2018 - * Developed by Steven Howard + * Developed by Lorenc Pekaj, Steven Howard * Module: cnr/features/paintball.pwn * Purpose: paintball related features */ @@ -60,12 +60,12 @@ new /* ** Hooks ** */ #if defined AC_INCLUDED -hook OnPlayerDeathEx(playerid, killerid, reason, Float: damage, bodypart) +hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart ) #else -hook OnPlayerDeath(playerid, killerid, reason) +hook OnPlayerDeath( playerid, killerid, reason ) #endif { - if ( p_inPaintBall{ killerid } == true ) + if ( IsPlayerConnected( killerid ) && p_inPaintBall{ killerid } == true ) { new a = p_PaintBallArena{ killerid }; @@ -75,9 +75,8 @@ hook OnPlayerDeath(playerid, killerid, reason) SetPlayerHealth( killerid, g_paintballData[ a ] [ E_HEALTH ] ); SetPlayerArmour( killerid, g_paintballData[ a ] [ E_ARMOUR ] ); } - return 1; + return Y_HOOKS_BREAK_RETURN_1; } - return 1; } @@ -631,4 +630,4 @@ CMD:p( playerid, params[ ] ) SendClientMessageToPaintball( id, -1, ""COL_GREY" %s(%d):"COL_WHITE" %s", ReturnPlayerName( playerid ), playerid, msg ); } return 1; -} \ No newline at end of file +}