diff --git a/gamemodes/irresistible/cnr/features/cop/arrest.pwn b/gamemodes/irresistible/cnr/features/cop/arrest.pwn index 1d74c5b..55668e7 100644 --- a/gamemodes/irresistible/cnr/features/cop/arrest.pwn +++ b/gamemodes/irresistible/cnr/features/cop/arrest.pwn @@ -26,7 +26,7 @@ hook OnPlayerDisconnect( playerid, reason ) p_AwaitingBCAttemptTimer[ playerid ] = -1; // Quit to Avoid - Award Handling - if ( playerid != INVALID_PLAYER_ID ) AwardNearestLEO( playerid, 0 ); + AwardNearestLEO( playerid, 0 ); return 1; } @@ -499,12 +499,9 @@ stock AwardNearestLEO( playerid, reason ) if ( ! IsPlayerConnected( playerid ) || playerid == INVALID_PLAYER_ID || GetPlayerWantedLevel( playerid ) < 2 ) return false; - new - closestLEO = INVALID_PLAYER_ID, - Float: radius = ( IsPlayerInAnyVehicle( playerid ) ? 150.0 : 75.0 ) // If player is in a vehicle, increase radius due to ability to get farther quicker. - ; + new Float: radius = ( IsPlayerInAnyVehicle( playerid ) ? 150.0 : 75.0 ); // If player is in a vehicle, increase radius due to ability to get farther quicker. - closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius ); + new closestLEO = GetClosestPlayerEx( playerid, CLASS_POLICE, radius ); if ( IsPlayerConnected( closestLEO ) ) { @@ -512,15 +509,14 @@ stock AwardNearestLEO( playerid, reason ) switch ( reason ) { - case 0: reasonText = "Q'ing to Avoid"; - case 1: reasonText = "being AFK while wanted"; + case 0: reasonText = "Quit To Avoid"; + case 1: reasonText = "AFK'd While Wanted"; } AwardArrest( playerid, closestLEO ); - SendGlobalMessage( -1, ""COL_GOLD"[JAIL]{FFFFFF} %s(%d) has been awarded for the arrest on %s(%d) due to them "COL_LRED"%s.", ReturnPlayerName( closestLEO ), closestLEO, ReturnPlayerName( playerid ), playerid, reasonText ); + SendGlobalMessage( -1, ""COL_GOLD"[JAIL]{FFFFFF} %s(%d) has been awarded for the arrest on %s(%d) as they "COL_LRED"%s.", ReturnPlayerName( closestLEO ), closestLEO, ReturnPlayerName( playerid ), playerid, reasonText ); return true; } - return false; } diff --git a/gamemodes/irresistible/cnr/features/player/experience.pwn b/gamemodes/irresistible/cnr/features/player/experience.pwn index f1d2cc7..f8cfb00 100644 --- a/gamemodes/irresistible/cnr/features/player/experience.pwn +++ b/gamemodes/irresistible/cnr/features/player/experience.pwn @@ -385,6 +385,9 @@ stock ShowPlayerIrresistibleRank( playerid ) stock GivePlayerSeasonalXP( playerid, Float: default_xp ) { + if ( ! IsPlayerConnected( playerid ) || ! IsPlayerLoggedIn( playerid ) ) + return; + new Float: previous_season_xp = p_seasonalXP[ playerid ]; new Float: current_season_xp = previous_season_xp + default_xp;