fixes the deadly death bug
This commit is contained in:
parent
3483bc358b
commit
f0377f3d5c
@ -571,9 +571,6 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
|||||||
new
|
new
|
||||||
server_time = gettime( );
|
server_time = gettime( );
|
||||||
|
|
||||||
// Reset spawned variable
|
|
||||||
AC_SetPlayerSpawned( playerid, false );
|
|
||||||
|
|
||||||
// Anti-fakekill
|
// Anti-fakekill
|
||||||
switch( server_time - p_LastDeath[ playerid ] )
|
switch( server_time - p_LastDeath[ playerid ] )
|
||||||
{
|
{
|
||||||
@ -591,7 +588,7 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
|||||||
p_LastDeath[ playerid ] = server_time;
|
p_LastDeath[ playerid ] = server_time;
|
||||||
|
|
||||||
// Died in Vehicle
|
// Died in Vehicle
|
||||||
if ( GetPlayerVehicleID( playerid ) && AC_IsPlayerSpawned( playerid ) )
|
if ( AC_IsPlayerSpawned( playerid ) )
|
||||||
{
|
{
|
||||||
if( ( GetTickCount( ) - p_LastTookDamage[ playerid ] ) > 2500 ) {
|
if( ( GetTickCount( ) - p_LastTookDamage[ playerid ] ) > 2500 ) {
|
||||||
p_LastDamageIssuer[ playerid ] = INVALID_PLAYER_ID, p_LastWeaponIssuer[ playerid ] = 51;
|
p_LastDamageIssuer[ playerid ] = INVALID_PLAYER_ID, p_LastWeaponIssuer[ playerid ] = 51;
|
||||||
@ -599,6 +596,9 @@ hook OnPlayerDeath( playerid, killerid, reason )
|
|||||||
|
|
||||||
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, p_LastDamageIssuer[ playerid ], p_LastWeaponIssuer[ playerid ], 3.3, 3 );
|
CallRemoteFunction( "OnPlayerDeathEx", "ddfd", playerid, p_LastDamageIssuer[ playerid ], p_LastWeaponIssuer[ playerid ], 3.3, 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Reset spawned variable
|
||||||
|
AC_SetPlayerSpawned( playerid, false );
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user