allow spawn protection to be disabled while setting a specific health

This commit is contained in:
Lorenc Pekaj 2019-02-18 00:01:37 +11:00
parent 7e7ab281e3
commit e88d6ffb20

View File

@ -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;