bug fixes with sync
This commit is contained in:
parent
9c743d49fb
commit
b2c10884e8
@ -157,6 +157,7 @@ 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;
|
||||||
@ -536,6 +537,9 @@ CMD:sync( playerid, params[ ] )
|
|||||||
if ( IsPlayerInAnyVehicle( playerid ) )
|
if ( IsPlayerInAnyVehicle( playerid ) )
|
||||||
return SendError( playerid, "You cannot synchronize yourself in a vehicle." );
|
return SendError( playerid, "You cannot synchronize yourself in a vehicle." );
|
||||||
|
|
||||||
|
if ( IsPlayerTazed( playerid ) || IsPlayerCuffed( playerid ) || IsPlayerKidnapped( playerid ) || IsPlayerTied( playerid ) || IsPlayerLoadingObjects( playerid ) || IsPlayerSpawnProtected( playerid ) )
|
||||||
|
return SendError( playerid, "You cannot synchronize yourself at the moment." );
|
||||||
|
|
||||||
if ( GetPlayerWeapon( playerid ) == WEAPON_SNIPER )
|
if ( GetPlayerWeapon( playerid ) == WEAPON_SNIPER )
|
||||||
return SendError( playerid, "You cannot synchronize yourself holding a sniper." );
|
return SendError( playerid, "You cannot synchronize yourself holding a sniper." );
|
||||||
|
|
||||||
|
@ -21,16 +21,6 @@ hook OnPlayerConnect( playerid )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined AC_INCLUDED
|
|
||||||
hook OnPlayerDeathEx( playerid, killerid, reason, Float: damage, bodypart )
|
|
||||||
#else
|
|
||||||
hook OnPlayerDeath( playerid, killerid, reason )
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
ClearPlayerWantedLevel( playerid );
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ** Hooked Functions ** */
|
/* ** Hooked Functions ** */
|
||||||
stock CNR_GetPlayerWantedLevel( playerid )
|
stock CNR_GetPlayerWantedLevel( playerid )
|
||||||
{
|
{
|
||||||
|
@ -3251,6 +3251,8 @@ public OnPlayerDeath( playerid, killerid, reason )
|
|||||||
p_Deaths[ playerid ] ++; // Usually other events do nothing
|
p_Deaths[ playerid ] ++; // Usually other events do nothing
|
||||||
GivePlayerSeasonalXP( playerid, -10.0 ); // Deduct points, it's meant to be hard!!!
|
GivePlayerSeasonalXP( playerid, -10.0 ); // Deduct points, it's meant to be hard!!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ClearPlayerWantedLevel( playerid );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user