Skip to content

Commit

Permalink
Fix cop killed msg
Browse files Browse the repository at this point in the history
  • Loading branch information
3Mydlo3 committed Mar 14, 2024
1 parent 98e378c commit c837269
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions addons/police/functions/fnc_copKilledMsg.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ if (_timeOfDeath isEqualType 0) then {
_timeOfDeath = [_timeOfDeath] call BIS_fnc_timeToString;
};

if (isNull _nearestTown) then {
_nearestTown = [_deadCop] call EFUNC(common,getNearestCityLocation);
private _nearestCity = if (isNull _nearestTown) then {
[_deadCop] call EFUNC(civilian,getNearestCity)
} else {
[_nearestTown] call EFUNC(civilian,getCityByLocation)
};

private _msg = "";
private _nearestCityArea = _nearestTown getVariable QGVAR(cityArea);
private _nearestCityArea = _nearestCity getVariable QEGVAR(civilian,cityArea);
private _isInCity = (position _deadCop) inArea _nearestCityArea;

// Check if distance is greater than 250 m. If so then change output a bit to represent that.
Expand Down

0 comments on commit c837269

Please sign in to comment.