From b5f2b3602af69197f45ab7efe505ca48b7c6d94e Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Sat, 30 Apr 2022 13:17:13 -0500 Subject: [PATCH] GeoIP util and fix veh lights --- scripts/server/native/connected.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/server/native/connected.js b/scripts/server/native/connected.js index c0e3bf06..94760c82 100644 --- a/scripts/server/native/connected.js +++ b/scripts/server/native/connected.js @@ -515,7 +515,8 @@ function repairVehicle(vehicle) { // =========================================================================== function setVehicleLights(vehicle, lights) { - vehicle.lights = lights; + setEntityData(vehicle, "vrr.lights", lights, true); + sendNetworkEventToPlayer("vrr.veh.lights", null, vehicle.id, lights); } // =========================================================================== @@ -1196,4 +1197,13 @@ function getGame() { return server.game; } +// =========================================================================== + +function getCountryNameFromIP(ip) { + if(module.geoip.getCountryName(ip)) { + return module.geoip.getCountryName(ip); + } + return false; +} + // =========================================================================== \ No newline at end of file