From f0377f3d5c9185ad5fb7ec806c9ebe6cab5899be Mon Sep 17 00:00:00 2001 From: Steven Howard Date: Tue, 9 Oct 2018 16:04:52 +0100 Subject: [PATCH] fixes the deadly death bug --- gamemodes/irresistible/anticheat/hitpoints.pwn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gamemodes/irresistible/anticheat/hitpoints.pwn b/gamemodes/irresistible/anticheat/hitpoints.pwn index 3ccd60c..18b4683 100644 --- a/gamemodes/irresistible/anticheat/hitpoints.pwn +++ b/gamemodes/irresistible/anticheat/hitpoints.pwn @@ -571,9 +571,6 @@ hook OnPlayerDeath( playerid, killerid, reason ) new server_time = gettime( ); - // Reset spawned variable - AC_SetPlayerSpawned( playerid, false ); - // Anti-fakekill switch( server_time - p_LastDeath[ playerid ] ) { @@ -591,7 +588,7 @@ hook OnPlayerDeath( playerid, killerid, reason ) p_LastDeath[ playerid ] = server_time; // Died in Vehicle - if ( GetPlayerVehicleID( playerid ) && AC_IsPlayerSpawned( playerid ) ) + if ( AC_IsPlayerSpawned( playerid ) ) { if( ( GetTickCount( ) - p_LastTookDamage[ playerid ] ) > 2500 ) { p_LastDamageIssuer[ playerid ] = INVALID_PLAYER_ID, p_LastWeaponIssuer[ playerid ] = 51; @@ -599,6 +596,9 @@ hook OnPlayerDeath( playerid, killerid, reason ) CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, p_LastDamageIssuer[ playerid ], p_LastWeaponIssuer[ playerid ], 3.3, 3 ); } + + // Reset spawned variable + AC_SetPlayerSpawned( playerid, false ); } return 1; }