sync refilled health bugfix

This commit is contained in:
Lorenc Pekaj 2018-10-15 21:28:05 +11:00
parent e054a62b22
commit 60df8738df

View File

@ -141,6 +141,7 @@ hook SetPlayerRandomSpawn( playerid )
if ( p_SyncingPlayer{ playerid } == true ) if ( p_SyncingPlayer{ playerid } == true )
{ {
ResetPlayerWeapons( playerid ); ResetPlayerWeapons( playerid );
DisablePlayerSpawnProtection( playerid );
SetPlayerWantedLevel( playerid, g_syncData[ playerid ] [ E_WANTED_LEVEL ] ); SetPlayerWantedLevel( playerid, g_syncData[ playerid ] [ E_WANTED_LEVEL ] );
SetPlayerHealth( playerid, g_syncData[ playerid ] [ E_HEALTH ] ); SetPlayerHealth( playerid, g_syncData[ playerid ] [ E_HEALTH ] );
@ -157,7 +158,6 @@ hook SetPlayerRandomSpawn( playerid )
SetPlayerArmedWeapon( playerid, g_syncData[ playerid ] [ E_CURRENT_WEAPON ] ); SetPlayerArmedWeapon( playerid, g_syncData[ playerid ] [ E_CURRENT_WEAPON ] );
SetCameraBehindPlayer( playerid ); SetCameraBehindPlayer( playerid );
DisablePlayerSpawnProtection( playerid );
p_SyncingPlayer{ playerid } = false; p_SyncingPlayer{ playerid } = false;
return Y_HOOKS_BREAK_RETURN_1; return Y_HOOKS_BREAK_RETURN_1;