From e88d6ffb206356ce7b86b49cc3c1844d1e108301 Mon Sep 17 00:00:00 2001 From: Lorenc Pekaj Date: Mon, 18 Feb 2019 00:01:37 +1100 Subject: [PATCH] allow spawn protection to be disabled while setting a specific health --- gamemodes/irresistible/cnr/features/passive_mode.pwn | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gamemodes/irresistible/cnr/features/passive_mode.pwn b/gamemodes/irresistible/cnr/features/passive_mode.pwn index a3f197d..4b0ccd2 100644 --- a/gamemodes/irresistible/cnr/features/passive_mode.pwn +++ b/gamemodes/irresistible/cnr/features/passive_mode.pwn @@ -105,7 +105,7 @@ stock GivePassivePassengersWanted( playerid, vehicleid ) { SetPlayerWantedLevel( pID, 6 ); ShowPlayerHelpDialog( pID, 3000, "You are now considered wanted for associating yourself with a wanted player." ); - } + } } return true; } @@ -123,11 +123,11 @@ stock IsPassivePlayerInVehicle( vehicleid ) return false; } -stock DisablePlayerSpawnProtection( playerid ) +stock DisablePlayerSpawnProtection( playerid, Float: default_health = 100.0 ) { if ( p_AntiSpawnKillEnabled{ playerid } ) { - SetPlayerHealth( playerid, p_AdminOnDuty{ playerid } ? float( INVALID_PLAYER_ID ) : 100.0 ); + SetPlayerHealth( playerid, p_AdminOnDuty{ playerid } ? float( INVALID_PLAYER_ID ) : default_health ); DisableRemoteVehicleCollisions( playerid, p_AdminOnDuty{ playerid } ); Delete3DTextLabel( p_SpawnKillLabel[ playerid ] ); p_SpawnKillLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;