Fixes player quit to avoid

No longer awards nearest cop is criminal is in event
This commit is contained in:
Cloudy 2019-06-02 14:50:15 +03:00 committed by GitHub
parent ca9af55c37
commit 80b252e9fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -437,7 +437,11 @@ stock BreakPlayerCuffs( playerid )
stock AwardNearestLEO( playerid, reason )
{
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || IsPlayerDead( playerid ) )
#if defined __cloudy_event_system
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || ReturnPlayerHealth( playerid ) <= 0 || IsPlayerInEvent( playerid ) )
#else
if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 || ReturnPlayerHealth( playerid ) <= 0 )
#endif
return false;
new Float: radius = ( IsPlayerInAnyVehicle( playerid ) ? 150.0 : 75.0 ); // If player is in a vehicle, increase radius due to ability to get farther quicker.