GeoIP util and fix veh lights

This commit is contained in:
Vortrex
2022-04-30 13:17:13 -05:00
parent 4ea236670b
commit b5f2b3602a

View File

@@ -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;
}
// ===========================================================================