fixes a critical bug with hardpoints, it would restore players health everytime they enter zone
This commit is contained in:
parent
158890715f
commit
633eaa19c8
@ -389,7 +389,7 @@ public OnPlayerUpdateGangZone( playerid, zoneid )
|
|||||||
if ( g_gangTurfData[ g_gangHardpointTurf ] [ E_ID ] != g_gangTurfData[ zoneid ] [ E_ID ] ) {
|
if ( g_gangTurfData[ g_gangHardpointTurf ] [ E_ID ] != g_gangTurfData[ zoneid ] [ E_ID ] ) {
|
||||||
PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], "~b~~h~(INACTIVE HARDPOINT)~n~~w~~h~Unchallenged" );
|
PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], "~b~~h~(INACTIVE HARDPOINT)~n~~w~~h~Unchallenged" );
|
||||||
} else {
|
} else {
|
||||||
DisablePlayerSpawnProtection( playerid );
|
DisablePlayerSpawnProtection( playerid, true );
|
||||||
PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], sprintf( "~r~~h~(ACTIVE HARDPOINT)~n~~w~~h~%s", g_gangHardpointAttacker != INVALID_GANG_ID ? ( ReturnGangName( g_gangHardpointAttacker ) ) : ( "Unchallenged" ) ) );
|
PlayerTextDrawSetString( playerid, g_ZoneOwnerTD[ playerid ], sprintf( "~r~~h~(ACTIVE HARDPOINT)~n~~w~~h~%s", g_gangHardpointAttacker != INVALID_GANG_ID ? ( ReturnGangName( g_gangHardpointAttacker ) ) : ( "Unchallenged" ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13145,10 +13145,12 @@ stock IsPlayerInMinigame( playerid ) {
|
|||||||
return IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) || IsPlayerPlayingPool( playerid ) || IsPlayerPlayingPoker( playerid );
|
return IsPlayerInPaintBall( playerid ) || IsPlayerDueling( playerid ) || IsPlayerPlayingPool( playerid ) || IsPlayerPlayingPoker( playerid );
|
||||||
}
|
}
|
||||||
|
|
||||||
stock DisablePlayerSpawnProtection( playerid )
|
stock DisablePlayerSpawnProtection( playerid, bool: restore_health = false )
|
||||||
{
|
{
|
||||||
DisableRemoteVehicleCollisions( playerid, p_AdminOnDuty{ playerid } );
|
if ( restore_health )
|
||||||
SetPlayerHealth( playerid, p_AdminOnDuty{ playerid } ? float( INVALID_PLAYER_ID ) : 100.0 );
|
SetPlayerHealth( playerid, p_AdminOnDuty{ playerid } ? float( INVALID_PLAYER_ID ) : 100.0 );
|
||||||
|
|
||||||
|
DisableRemoteVehicleCollisions( playerid, p_AdminOnDuty{ playerid } );
|
||||||
Delete3DTextLabel( p_SpawnKillLabel[ playerid ] );
|
Delete3DTextLabel( p_SpawnKillLabel[ playerid ] );
|
||||||
p_SpawnKillLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
p_SpawnKillLabel[ playerid ] = Text3D: INVALID_3DTEXT_ID;
|
||||||
p_AntiSpawnKillEnabled{ playerid } = false;
|
p_AntiSpawnKillEnabled{ playerid } = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user