mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
Merge branch 'esx-framework:main' into main
This commit is contained in:
@@ -80,34 +80,36 @@ function ESX.SetPlayerData(key, val)
|
||||
end
|
||||
|
||||
function ESX.Progressbar(message, length, Options)
|
||||
exports["esx_progressbar"]:Progressbar(message, length, Options)
|
||||
if GetResourceState("esx_progressbar") ~= "missing" then
|
||||
return exports["esx_progressbar"]:Progressbar(message, length, Options)
|
||||
end
|
||||
|
||||
print("[^1ERROR^7] ^5ESX Progressbar^7 is Missing!")
|
||||
end
|
||||
|
||||
function ESX.ShowNotification(message, type, length)
|
||||
if GetResourceState("esx_notify") ~= "missing" then
|
||||
exports["esx_notify"]:Notify(type, length, message)
|
||||
else
|
||||
print("[^1ERROR^7] ^5ESX Notify^7 is Missing!")
|
||||
end
|
||||
return exports["esx_notify"]:Notify(type, length, message)
|
||||
end
|
||||
|
||||
print("[^1ERROR^7] ^5ESX Notify^7 is Missing!")
|
||||
end
|
||||
|
||||
|
||||
function ESX.TextUI(message, type)
|
||||
if GetResourceState("esx_textui") ~= "missing" then
|
||||
exports["esx_textui"]:TextUI(message, type)
|
||||
else
|
||||
print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
|
||||
return
|
||||
return exports["esx_textui"]:TextUI(message, type)
|
||||
end
|
||||
|
||||
print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
|
||||
end
|
||||
|
||||
function ESX.HideUI()
|
||||
if GetResourceState("esx_textui") ~= "missing" then
|
||||
exports["esx_textui"]:HideUI()
|
||||
else
|
||||
print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
|
||||
return
|
||||
return exports["esx_textui"]:HideUI()
|
||||
end
|
||||
|
||||
print("[^1ERROR^7] ^5ESX TextUI^7 is Missing!")
|
||||
end
|
||||
|
||||
function ESX.ShowAdvancedNotification(sender, subject, msg, textureDict, iconType, flash, saveToBrief, hudColorIndex)
|
||||
@@ -151,7 +153,7 @@ ESX.HashString = function(str)
|
||||
local gsub = string.gsub
|
||||
local hash = joaat(str)
|
||||
local input_map = format("~INPUT_%s~", upper(format("%x", hash)))
|
||||
input_map = string.gsub(input_map, "FFFFFFFF", "")
|
||||
input_map = gsub(input_map, "FFFFFFFF", "")
|
||||
|
||||
return input_map
|
||||
end
|
||||
@@ -426,8 +428,7 @@ function ESX.Game.GetPedMugshot(ped, transparent)
|
||||
end
|
||||
|
||||
function ESX.Game.Teleport(entity, coords, cb)
|
||||
local vector = type(coords) == "vector4" and coords or type(coords) == "vector3" and vector4(coords, 0.0) or
|
||||
vec(coords.x, coords.y, coords.z, coords.heading or 0.0)
|
||||
local vector = type(coords) == "vector4" and coords or type(coords) == "vector3" and vector4(coords, 0.0) or vec(coords.x, coords.y, coords.z, coords.heading or 0.0)
|
||||
|
||||
if DoesEntityExist(entity) then
|
||||
RequestCollisionAtCoord(vector.xyz)
|
||||
@@ -666,409 +667,391 @@ function ESX.Game.GetVehicleInDirection()
|
||||
end
|
||||
|
||||
function ESX.Game.GetVehicleProperties(vehicle)
|
||||
if DoesEntityExist(vehicle) then
|
||||
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
|
||||
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
|
||||
local hasCustomPrimaryColor = GetIsVehiclePrimaryColourCustom(vehicle)
|
||||
local customPrimaryColor = nil
|
||||
if hasCustomPrimaryColor then
|
||||
local r, g, b = GetVehicleCustomPrimaryColour(vehicle)
|
||||
customPrimaryColor = {r, g, b}
|
||||
end
|
||||
|
||||
local customXenonColorR, customXenonColorG, customXenonColorB = GetVehicleXenonLightsCustomColor(vehicle)
|
||||
local customXenonColor = nil
|
||||
if customXenonColorR and customXenonColorG and customXenonColorB then
|
||||
customXenonColor = {customXenonColorR, customXenonColorG, customXenonColorB}
|
||||
end
|
||||
|
||||
local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle)
|
||||
local customSecondaryColor = nil
|
||||
if hasCustomSecondaryColor then
|
||||
local r, g, b = GetVehicleCustomSecondaryColour(vehicle)
|
||||
customSecondaryColor = {r, g, b}
|
||||
end
|
||||
local extras = {}
|
||||
|
||||
for extraId = 0, 12 do
|
||||
if DoesExtraExist(vehicle, extraId) then
|
||||
local state = IsVehicleExtraTurnedOn(vehicle, extraId)
|
||||
extras[tostring(extraId)] = state
|
||||
end
|
||||
end
|
||||
|
||||
local doorsBroken, windowsBroken, tyreBurst = {}, {}, {}
|
||||
local numWheels = tostring(GetVehicleNumberOfWheels(vehicle))
|
||||
|
||||
local TyresIndex = { -- Wheel index list according to the number of vehicle wheels.
|
||||
['2'] = {0, 4}, -- Bike and cycle.
|
||||
['3'] = {0, 1, 4, 5}, -- Vehicle with 3 wheels (get for wheels because some 3 wheels vehicles have 2 wheels on front and one rear or the reverse).
|
||||
['4'] = {0, 1, 4, 5}, -- Vehicle with 4 wheels.
|
||||
['6'] = {0, 1, 2, 3, 4, 5} -- Vehicle with 6 wheels.
|
||||
}
|
||||
|
||||
if TyresIndex[numWheels] then
|
||||
for tyre, idx in pairs(TyresIndex[numWheels]) do
|
||||
if IsVehicleTyreBurst(vehicle, idx, false) then
|
||||
tyreBurst[tostring(idx)] = true
|
||||
else
|
||||
tyreBurst[tostring(idx)] = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
for windowId = 0, 7 do -- 13
|
||||
if not IsVehicleWindowIntact(vehicle, windowId) then
|
||||
windowsBroken[tostring(windowId)] = true
|
||||
else
|
||||
windowsBroken[tostring(windowId)] = false
|
||||
end
|
||||
end
|
||||
|
||||
local numDoors = GetNumberOfVehicleDoors(vehicle)
|
||||
if numDoors and numDoors > 0 then
|
||||
for doorsId = 0, numDoors do
|
||||
if IsVehicleDoorDamaged(vehicle, doorsId) then
|
||||
doorsBroken[tostring(doorsId)] = true
|
||||
else
|
||||
doorsBroken[tostring(doorsId)] = false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
model = GetEntityModel(vehicle),
|
||||
doorsBroken = doorsBroken,
|
||||
windowsBroken = windowsBroken,
|
||||
tyreBurst = tyreBurst,
|
||||
plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)),
|
||||
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
|
||||
|
||||
bodyHealth = ESX.Math.Round(GetVehicleBodyHealth(vehicle), 1),
|
||||
engineHealth = ESX.Math.Round(GetVehicleEngineHealth(vehicle), 1),
|
||||
tankHealth = ESX.Math.Round(GetVehiclePetrolTankHealth(vehicle), 1),
|
||||
|
||||
fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1),
|
||||
dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1),
|
||||
color1 = colorPrimary,
|
||||
color2 = colorSecondary,
|
||||
customPrimaryColor = customPrimaryColor,
|
||||
customSecondaryColor = customSecondaryColor,
|
||||
|
||||
pearlescentColor = pearlescentColor,
|
||||
wheelColor = wheelColor,
|
||||
|
||||
wheels = GetVehicleWheelType(vehicle),
|
||||
windowTint = GetVehicleWindowTint(vehicle),
|
||||
xenonColor = GetVehicleXenonLightsColor(vehicle),
|
||||
customXenonColor = customXenonColor,
|
||||
|
||||
neonEnabled = {IsVehicleNeonLightEnabled(vehicle, 0), IsVehicleNeonLightEnabled(vehicle, 1),
|
||||
IsVehicleNeonLightEnabled(vehicle, 2), IsVehicleNeonLightEnabled(vehicle, 3)},
|
||||
|
||||
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
|
||||
extras = extras,
|
||||
tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
|
||||
|
||||
modSpoilers = GetVehicleMod(vehicle, 0),
|
||||
modFrontBumper = GetVehicleMod(vehicle, 1),
|
||||
modRearBumper = GetVehicleMod(vehicle, 2),
|
||||
modSideSkirt = GetVehicleMod(vehicle, 3),
|
||||
modExhaust = GetVehicleMod(vehicle, 4),
|
||||
modFrame = GetVehicleMod(vehicle, 5),
|
||||
modGrille = GetVehicleMod(vehicle, 6),
|
||||
modHood = GetVehicleMod(vehicle, 7),
|
||||
modFender = GetVehicleMod(vehicle, 8),
|
||||
modRightFender = GetVehicleMod(vehicle, 9),
|
||||
modRoof = GetVehicleMod(vehicle, 10),
|
||||
|
||||
modEngine = GetVehicleMod(vehicle, 11),
|
||||
modBrakes = GetVehicleMod(vehicle, 12),
|
||||
modTransmission = GetVehicleMod(vehicle, 13),
|
||||
modHorns = GetVehicleMod(vehicle, 14),
|
||||
modSuspension = GetVehicleMod(vehicle, 15),
|
||||
modArmor = GetVehicleMod(vehicle, 16),
|
||||
|
||||
modTurbo = IsToggleModOn(vehicle, 18),
|
||||
modSmokeEnabled = IsToggleModOn(vehicle, 20),
|
||||
modXenon = IsToggleModOn(vehicle, 22),
|
||||
|
||||
modFrontWheels = GetVehicleMod(vehicle, 23),
|
||||
modBackWheels = GetVehicleMod(vehicle, 24),
|
||||
|
||||
modPlateHolder = GetVehicleMod(vehicle, 25),
|
||||
modVanityPlate = GetVehicleMod(vehicle, 26),
|
||||
modTrimA = GetVehicleMod(vehicle, 27),
|
||||
modOrnaments = GetVehicleMod(vehicle, 28),
|
||||
modDashboard = GetVehicleMod(vehicle, 29),
|
||||
modDial = GetVehicleMod(vehicle, 30),
|
||||
modDoorSpeaker = GetVehicleMod(vehicle, 31),
|
||||
modSeats = GetVehicleMod(vehicle, 32),
|
||||
modSteeringWheel = GetVehicleMod(vehicle, 33),
|
||||
modShifterLeavers = GetVehicleMod(vehicle, 34),
|
||||
modAPlate = GetVehicleMod(vehicle, 35),
|
||||
modSpeakers = GetVehicleMod(vehicle, 36),
|
||||
modTrunk = GetVehicleMod(vehicle, 37),
|
||||
modHydrolic = GetVehicleMod(vehicle, 38),
|
||||
modEngineBlock = GetVehicleMod(vehicle, 39),
|
||||
modAirFilter = GetVehicleMod(vehicle, 40),
|
||||
modStruts = GetVehicleMod(vehicle, 41),
|
||||
modArchCover = GetVehicleMod(vehicle, 42),
|
||||
modAerials = GetVehicleMod(vehicle, 43),
|
||||
modTrimB = GetVehicleMod(vehicle, 44),
|
||||
modTank = GetVehicleMod(vehicle, 45),
|
||||
modDoorR = GetVehicleMod(vehicle, 47),
|
||||
modLivery = GetVehicleMod(vehicle, 48) == -1 and GetVehicleLivery(vehicle) or GetVehicleMod(vehicle, 48),
|
||||
modLightbar = GetVehicleMod(vehicle, 49)
|
||||
}
|
||||
else
|
||||
if not DoesEntityExist(vehicle) then
|
||||
return
|
||||
end
|
||||
|
||||
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
|
||||
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
|
||||
local hasCustomPrimaryColor = GetIsVehiclePrimaryColourCustom(vehicle)
|
||||
local customPrimaryColor = nil
|
||||
if hasCustomPrimaryColor then
|
||||
customPrimaryColor = {GetVehicleCustomPrimaryColour(vehicle)}
|
||||
end
|
||||
|
||||
local hasCustomXenonColor, customXenonColorR, customXenonColorG, customXenonColorB = GetVehicleXenonLightsCustomColor(vehicle)
|
||||
local customXenonColor = nil
|
||||
if hasCustomXenonColor then
|
||||
customXenonColor = {customXenonColorR, customXenonColorG, customXenonColorB}
|
||||
end
|
||||
|
||||
local hasCustomSecondaryColor = GetIsVehicleSecondaryColourCustom(vehicle)
|
||||
local customSecondaryColor = nil
|
||||
if hasCustomSecondaryColor then
|
||||
customSecondaryColor = {GetVehicleCustomSecondaryColour(vehicle)}
|
||||
end
|
||||
|
||||
local extras = {}
|
||||
for extraId = 0, 12 do
|
||||
if DoesExtraExist(vehicle, extraId) then
|
||||
extras[tostring(extraId)] = IsVehicleExtraTurnedOn(vehicle, extraId)
|
||||
end
|
||||
end
|
||||
|
||||
local doorsBroken, windowsBroken, tyreBurst = {}, {}, {}
|
||||
local numWheels = tostring(GetVehicleNumberOfWheels(vehicle))
|
||||
|
||||
local TyresIndex = { -- Wheel index list according to the number of vehicle wheels.
|
||||
['2'] = {0, 4}, -- Bike and cycle.
|
||||
['3'] = {0, 1, 4, 5}, -- Vehicle with 3 wheels (get for wheels because some 3 wheels vehicles have 2 wheels on front and one rear or the reverse).
|
||||
['4'] = {0, 1, 4, 5}, -- Vehicle with 4 wheels.
|
||||
['6'] = {0, 1, 2, 3, 4, 5} -- Vehicle with 6 wheels.
|
||||
}
|
||||
|
||||
if TyresIndex[numWheels] then
|
||||
for tyre, idx in pairs(TyresIndex[numWheels]) do
|
||||
tyreBurst[tostring(idx)] = IsVehicleTyreBurst(vehicle, idx, false)
|
||||
end
|
||||
end
|
||||
|
||||
for windowId = 0, 7 do -- 13
|
||||
windowsBroken[tostring(windowId)] = not IsVehicleWindowIntact(vehicle, windowId)
|
||||
end
|
||||
|
||||
local numDoors = GetNumberOfVehicleDoors(vehicle)
|
||||
if numDoors and numDoors > 0 then
|
||||
for doorsId = 0, numDoors do
|
||||
doorsBroken[tostring(doorsId)] = IsVehicleDoorDamaged(vehicle, doorsId)
|
||||
end
|
||||
end
|
||||
|
||||
return {
|
||||
model = GetEntityModel(vehicle),
|
||||
doorsBroken = doorsBroken,
|
||||
windowsBroken = windowsBroken,
|
||||
tyreBurst = tyreBurst,
|
||||
plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)),
|
||||
plateIndex = GetVehicleNumberPlateTextIndex(vehicle),
|
||||
|
||||
bodyHealth = ESX.Math.Round(GetVehicleBodyHealth(vehicle), 1),
|
||||
engineHealth = ESX.Math.Round(GetVehicleEngineHealth(vehicle), 1),
|
||||
tankHealth = ESX.Math.Round(GetVehiclePetrolTankHealth(vehicle), 1),
|
||||
|
||||
fuelLevel = ESX.Math.Round(GetVehicleFuelLevel(vehicle), 1),
|
||||
dirtLevel = ESX.Math.Round(GetVehicleDirtLevel(vehicle), 1),
|
||||
color1 = colorPrimary,
|
||||
color2 = colorSecondary,
|
||||
customPrimaryColor = customPrimaryColor,
|
||||
customSecondaryColor = customSecondaryColor,
|
||||
|
||||
pearlescentColor = pearlescentColor,
|
||||
wheelColor = wheelColor,
|
||||
|
||||
wheels = GetVehicleWheelType(vehicle),
|
||||
windowTint = GetVehicleWindowTint(vehicle),
|
||||
xenonColor = GetVehicleXenonLightsColor(vehicle),
|
||||
customXenonColor = customXenonColor,
|
||||
|
||||
neonEnabled = {IsVehicleNeonLightEnabled(vehicle, 0), IsVehicleNeonLightEnabled(vehicle, 1),
|
||||
IsVehicleNeonLightEnabled(vehicle, 2), IsVehicleNeonLightEnabled(vehicle, 3)},
|
||||
|
||||
neonColor = table.pack(GetVehicleNeonLightsColour(vehicle)),
|
||||
extras = extras,
|
||||
tyreSmokeColor = table.pack(GetVehicleTyreSmokeColor(vehicle)),
|
||||
|
||||
modSpoilers = GetVehicleMod(vehicle, 0),
|
||||
modFrontBumper = GetVehicleMod(vehicle, 1),
|
||||
modRearBumper = GetVehicleMod(vehicle, 2),
|
||||
modSideSkirt = GetVehicleMod(vehicle, 3),
|
||||
modExhaust = GetVehicleMod(vehicle, 4),
|
||||
modFrame = GetVehicleMod(vehicle, 5),
|
||||
modGrille = GetVehicleMod(vehicle, 6),
|
||||
modHood = GetVehicleMod(vehicle, 7),
|
||||
modFender = GetVehicleMod(vehicle, 8),
|
||||
modRightFender = GetVehicleMod(vehicle, 9),
|
||||
modRoof = GetVehicleMod(vehicle, 10),
|
||||
|
||||
modEngine = GetVehicleMod(vehicle, 11),
|
||||
modBrakes = GetVehicleMod(vehicle, 12),
|
||||
modTransmission = GetVehicleMod(vehicle, 13),
|
||||
modHorns = GetVehicleMod(vehicle, 14),
|
||||
modSuspension = GetVehicleMod(vehicle, 15),
|
||||
modArmor = GetVehicleMod(vehicle, 16),
|
||||
|
||||
modTurbo = IsToggleModOn(vehicle, 18),
|
||||
modSmokeEnabled = IsToggleModOn(vehicle, 20),
|
||||
modXenon = IsToggleModOn(vehicle, 22),
|
||||
|
||||
modFrontWheels = GetVehicleMod(vehicle, 23),
|
||||
modBackWheels = GetVehicleMod(vehicle, 24),
|
||||
|
||||
modPlateHolder = GetVehicleMod(vehicle, 25),
|
||||
modVanityPlate = GetVehicleMod(vehicle, 26),
|
||||
modTrimA = GetVehicleMod(vehicle, 27),
|
||||
modOrnaments = GetVehicleMod(vehicle, 28),
|
||||
modDashboard = GetVehicleMod(vehicle, 29),
|
||||
modDial = GetVehicleMod(vehicle, 30),
|
||||
modDoorSpeaker = GetVehicleMod(vehicle, 31),
|
||||
modSeats = GetVehicleMod(vehicle, 32),
|
||||
modSteeringWheel = GetVehicleMod(vehicle, 33),
|
||||
modShifterLeavers = GetVehicleMod(vehicle, 34),
|
||||
modAPlate = GetVehicleMod(vehicle, 35),
|
||||
modSpeakers = GetVehicleMod(vehicle, 36),
|
||||
modTrunk = GetVehicleMod(vehicle, 37),
|
||||
modHydrolic = GetVehicleMod(vehicle, 38),
|
||||
modEngineBlock = GetVehicleMod(vehicle, 39),
|
||||
modAirFilter = GetVehicleMod(vehicle, 40),
|
||||
modStruts = GetVehicleMod(vehicle, 41),
|
||||
modArchCover = GetVehicleMod(vehicle, 42),
|
||||
modAerials = GetVehicleMod(vehicle, 43),
|
||||
modTrimB = GetVehicleMod(vehicle, 44),
|
||||
modTank = GetVehicleMod(vehicle, 45),
|
||||
modDoorR = GetVehicleMod(vehicle, 47),
|
||||
modLivery = GetVehicleMod(vehicle, 48) == -1 and GetVehicleLivery(vehicle) or GetVehicleMod(vehicle, 48),
|
||||
modLightbar = GetVehicleMod(vehicle, 49)
|
||||
}
|
||||
end
|
||||
|
||||
function ESX.Game.SetVehicleProperties(vehicle, props)
|
||||
if DoesEntityExist(vehicle) then
|
||||
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
|
||||
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
|
||||
SetVehicleModKit(vehicle, 0)
|
||||
if not DoesEntityExist(vehicle) then
|
||||
return
|
||||
end
|
||||
local colorPrimary, colorSecondary = GetVehicleColours(vehicle)
|
||||
local pearlescentColor, wheelColor = GetVehicleExtraColours(vehicle)
|
||||
SetVehicleModKit(vehicle, 0)
|
||||
|
||||
if props.plate then
|
||||
SetVehicleNumberPlateText(vehicle, props.plate)
|
||||
end
|
||||
if props.plateIndex then
|
||||
SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex)
|
||||
end
|
||||
if props.bodyHealth then
|
||||
SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0)
|
||||
end
|
||||
if props.engineHealth then
|
||||
SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0)
|
||||
end
|
||||
if props.tankHealth then
|
||||
SetVehiclePetrolTankHealth(vehicle, props.tankHealth + 0.0)
|
||||
end
|
||||
if props.fuelLevel then
|
||||
SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0)
|
||||
end
|
||||
if props.dirtLevel then
|
||||
SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0)
|
||||
end
|
||||
if props.customPrimaryColor then
|
||||
SetVehicleCustomPrimaryColour(vehicle, props.customPrimaryColor[1], props.customPrimaryColor[2],
|
||||
props.customPrimaryColor[3])
|
||||
end
|
||||
if props.customSecondaryColor then
|
||||
SetVehicleCustomSecondaryColour(vehicle, props.customSecondaryColor[1], props.customSecondaryColor[2],
|
||||
props.customSecondaryColor[3])
|
||||
end
|
||||
if props.color1 then
|
||||
SetVehicleColours(vehicle, props.color1, colorSecondary)
|
||||
end
|
||||
if props.color2 then
|
||||
SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2)
|
||||
end
|
||||
if props.pearlescentColor then
|
||||
SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor)
|
||||
end
|
||||
if props.wheelColor then
|
||||
SetVehicleExtraColours(vehicle, props.pearlescentColor or pearlescentColor, props.wheelColor)
|
||||
end
|
||||
if props.wheels then
|
||||
SetVehicleWheelType(vehicle, props.wheels)
|
||||
end
|
||||
if props.windowTint then
|
||||
SetVehicleWindowTint(vehicle, props.windowTint)
|
||||
end
|
||||
if props.plate ~= nil then
|
||||
SetVehicleNumberPlateText(vehicle, props.plate)
|
||||
end
|
||||
if props.plateIndex ~= nil then
|
||||
SetVehicleNumberPlateTextIndex(vehicle, props.plateIndex)
|
||||
end
|
||||
if props.bodyHealth ~= nil then
|
||||
SetVehicleBodyHealth(vehicle, props.bodyHealth + 0.0)
|
||||
end
|
||||
if props.engineHealth ~= nil then
|
||||
SetVehicleEngineHealth(vehicle, props.engineHealth + 0.0)
|
||||
end
|
||||
if props.tankHealth ~= nil then
|
||||
SetVehiclePetrolTankHealth(vehicle, props.tankHealth + 0.0)
|
||||
end
|
||||
if props.fuelLevel ~= nil then
|
||||
SetVehicleFuelLevel(vehicle, props.fuelLevel + 0.0)
|
||||
end
|
||||
if props.dirtLevel ~= nil then
|
||||
SetVehicleDirtLevel(vehicle, props.dirtLevel + 0.0)
|
||||
end
|
||||
if props.customPrimaryColor ~= nil then
|
||||
SetVehicleCustomPrimaryColour(vehicle, props.customPrimaryColor[1], props.customPrimaryColor[2],
|
||||
props.customPrimaryColor[3])
|
||||
end
|
||||
if props.customSecondaryColor ~= nil then
|
||||
SetVehicleCustomSecondaryColour(vehicle, props.customSecondaryColor[1], props.customSecondaryColor[2],
|
||||
props.customSecondaryColor[3])
|
||||
end
|
||||
if props.color1 ~= nil then
|
||||
SetVehicleColours(vehicle, props.color1, colorSecondary)
|
||||
end
|
||||
if props.color2 ~= nil then
|
||||
SetVehicleColours(vehicle, props.color1 or colorPrimary, props.color2)
|
||||
end
|
||||
if props.pearlescentColor ~= nil then
|
||||
SetVehicleExtraColours(vehicle, props.pearlescentColor, wheelColor)
|
||||
end
|
||||
if props.wheelColor ~= nil then
|
||||
SetVehicleExtraColours(vehicle, props.pearlescentColor or pearlescentColor, props.wheelColor)
|
||||
end
|
||||
if props.wheels ~= nil then
|
||||
SetVehicleWheelType(vehicle, props.wheels)
|
||||
end
|
||||
if props.windowTint ~= nil then
|
||||
SetVehicleWindowTint(vehicle, props.windowTint)
|
||||
end
|
||||
|
||||
if props.neonEnabled then
|
||||
SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1])
|
||||
SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2])
|
||||
SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3])
|
||||
SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4])
|
||||
end
|
||||
if props.neonEnabled ~= nil then
|
||||
SetVehicleNeonLightEnabled(vehicle, 0, props.neonEnabled[1])
|
||||
SetVehicleNeonLightEnabled(vehicle, 1, props.neonEnabled[2])
|
||||
SetVehicleNeonLightEnabled(vehicle, 2, props.neonEnabled[3])
|
||||
SetVehicleNeonLightEnabled(vehicle, 3, props.neonEnabled[4])
|
||||
end
|
||||
|
||||
if props.extras then
|
||||
for extraId, enabled in pairs(props.extras) do
|
||||
if enabled then
|
||||
SetVehicleExtra(vehicle, tonumber(extraId), 0)
|
||||
else
|
||||
SetVehicleExtra(vehicle, tonumber(extraId), 1)
|
||||
end
|
||||
if props.extras ~= nil then
|
||||
for extraId, enabled in pairs(props.extras) do
|
||||
SetVehicleExtra(vehicle, tonumber(extraId), enabled and 0 or 0)
|
||||
end
|
||||
end
|
||||
|
||||
if props.neonColor ~= nil then
|
||||
SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
|
||||
end
|
||||
if props.xenonColor ~= nil then
|
||||
SetVehicleXenonLightsColor(vehicle, props.xenonColor)
|
||||
end
|
||||
if props.customXenonColor ~= nil then
|
||||
SetVehicleXenonLightsCustomColor(vehicle, props.customXenonColor[1], props.customXenonColor[2],
|
||||
props.customXenonColor[3])
|
||||
end
|
||||
if props.modSmokeEnabled ~= nil then
|
||||
ToggleVehicleMod(vehicle, 20, true)
|
||||
end
|
||||
if props.tyreSmokeColor ~= nil then
|
||||
SetVehicleTyreSmokeColor(vehicle, props.tyreSmokeColor[1], props.tyreSmokeColor[2], props.tyreSmokeColor[3])
|
||||
end
|
||||
if props.modSpoilers ~= nil then
|
||||
SetVehicleMod(vehicle, 0, props.modSpoilers, false)
|
||||
end
|
||||
if props.modFrontBumper ~= nil then
|
||||
SetVehicleMod(vehicle, 1, props.modFrontBumper, false)
|
||||
end
|
||||
if props.modRearBumper ~= nil then
|
||||
SetVehicleMod(vehicle, 2, props.modRearBumper, false)
|
||||
end
|
||||
if props.modSideSkirt ~= nil then
|
||||
SetVehicleMod(vehicle, 3, props.modSideSkirt, false)
|
||||
end
|
||||
if props.modExhaust ~= nil then
|
||||
SetVehicleMod(vehicle, 4, props.modExhaust, false)
|
||||
end
|
||||
if props.modFrame ~= nil then
|
||||
SetVehicleMod(vehicle, 5, props.modFrame, false)
|
||||
end
|
||||
if props.modGrille ~= nil then
|
||||
SetVehicleMod(vehicle, 6, props.modGrille, false)
|
||||
end
|
||||
if props.modHood ~= nil then
|
||||
SetVehicleMod(vehicle, 7, props.modHood, false)
|
||||
end
|
||||
if props.modFender ~= nil then
|
||||
SetVehicleMod(vehicle, 8, props.modFender, false)
|
||||
end
|
||||
if props.modRightFender ~= nil then
|
||||
SetVehicleMod(vehicle, 9, props.modRightFender, false)
|
||||
end
|
||||
if props.modRoof ~= nil then
|
||||
SetVehicleMod(vehicle, 10, props.modRoof, false)
|
||||
end
|
||||
if props.modEngine ~= nil then
|
||||
SetVehicleMod(vehicle, 11, props.modEngine, false)
|
||||
end
|
||||
if props.modBrakes ~= nil then
|
||||
SetVehicleMod(vehicle, 12, props.modBrakes, false)
|
||||
end
|
||||
if props.modTransmission ~= nil then
|
||||
SetVehicleMod(vehicle, 13, props.modTransmission, false)
|
||||
end
|
||||
if props.modHorns ~= nil then
|
||||
SetVehicleMod(vehicle, 14, props.modHorns, false)
|
||||
end
|
||||
if props.modSuspension ~= nil then
|
||||
SetVehicleMod(vehicle, 15, props.modSuspension, false)
|
||||
end
|
||||
if props.modArmor ~= nil then
|
||||
SetVehicleMod(vehicle, 16, props.modArmor, false)
|
||||
end
|
||||
if props.modTurbo ~= nil then
|
||||
ToggleVehicleMod(vehicle, 18, props.modTurbo)
|
||||
end
|
||||
if props.modXenon ~= nil then
|
||||
ToggleVehicleMod(vehicle, 22, props.modXenon)
|
||||
end
|
||||
if props.modFrontWheels ~= nil then
|
||||
SetVehicleMod(vehicle, 23, props.modFrontWheels, false)
|
||||
end
|
||||
if props.modBackWheels ~= nil then
|
||||
SetVehicleMod(vehicle, 24, props.modBackWheels, false)
|
||||
end
|
||||
if props.modPlateHolder ~= nil then
|
||||
SetVehicleMod(vehicle, 25, props.modPlateHolder, false)
|
||||
end
|
||||
if props.modVanityPlate ~= nil then
|
||||
SetVehicleMod(vehicle, 26, props.modVanityPlate, false)
|
||||
end
|
||||
if props.modTrimA ~= nil then
|
||||
SetVehicleMod(vehicle, 27, props.modTrimA, false)
|
||||
end
|
||||
if props.modOrnaments ~= nil then
|
||||
SetVehicleMod(vehicle, 28, props.modOrnaments, false)
|
||||
end
|
||||
if props.modDashboard ~= nil then
|
||||
SetVehicleMod(vehicle, 29, props.modDashboard, false)
|
||||
end
|
||||
if props.modDial ~= nil then
|
||||
SetVehicleMod(vehicle, 30, props.modDial, false)
|
||||
end
|
||||
if props.modDoorSpeaker ~= nil then
|
||||
SetVehicleMod(vehicle, 31, props.modDoorSpeaker, false)
|
||||
end
|
||||
if props.modSeats ~= nil then
|
||||
SetVehicleMod(vehicle, 32, props.modSeats, false)
|
||||
end
|
||||
if props.modSteeringWheel ~= nil then
|
||||
SetVehicleMod(vehicle, 33, props.modSteeringWheel, false)
|
||||
end
|
||||
if props.modShifterLeavers ~= nil then
|
||||
SetVehicleMod(vehicle, 34, props.modShifterLeavers, false)
|
||||
end
|
||||
if props.modAPlate ~= nil then
|
||||
SetVehicleMod(vehicle, 35, props.modAPlate, false)
|
||||
end
|
||||
if props.modSpeakers ~= nil then
|
||||
SetVehicleMod(vehicle, 36, props.modSpeakers, false)
|
||||
end
|
||||
if props.modTrunk ~= nil then
|
||||
SetVehicleMod(vehicle, 37, props.modTrunk, false)
|
||||
end
|
||||
if props.modHydrolic ~= nil then
|
||||
SetVehicleMod(vehicle, 38, props.modHydrolic, false)
|
||||
end
|
||||
if props.modEngineBlock ~= nil then
|
||||
SetVehicleMod(vehicle, 39, props.modEngineBlock, false)
|
||||
end
|
||||
if props.modAirFilter ~= nil then
|
||||
SetVehicleMod(vehicle, 40, props.modAirFilter, false)
|
||||
end
|
||||
if props.modStruts ~= nil then
|
||||
SetVehicleMod(vehicle, 41, props.modStruts, false)
|
||||
end
|
||||
if props.modArchCover ~= nil then
|
||||
SetVehicleMod(vehicle, 42, props.modArchCover, false)
|
||||
end
|
||||
if props.modAerials ~= nil then
|
||||
SetVehicleMod(vehicle, 43, props.modAerials, false)
|
||||
end
|
||||
if props.modTrimB ~= nil then
|
||||
SetVehicleMod(vehicle, 44, props.modTrimB, false)
|
||||
end
|
||||
if props.modTank ~= nil then
|
||||
SetVehicleMod(vehicle, 45, props.modTank, false)
|
||||
end
|
||||
if props.modWindows ~= nil then
|
||||
SetVehicleMod(vehicle, 46, props.modWindows, false)
|
||||
end
|
||||
|
||||
if props.modLivery ~= nil then
|
||||
SetVehicleMod(vehicle, 48, props.modLivery, false)
|
||||
SetVehicleLivery(vehicle, props.modLivery)
|
||||
end
|
||||
|
||||
if props.windowsBroken ~= nil then
|
||||
for k, v in pairs(props.windowsBroken) do
|
||||
if v then
|
||||
SmashVehicleWindow(vehicle, tonumber(k))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if props.neonColor then
|
||||
SetVehicleNeonLightsColour(vehicle, props.neonColor[1], props.neonColor[2], props.neonColor[3])
|
||||
end
|
||||
if props.xenonColor then
|
||||
SetVehicleXenonLightsColor(vehicle, props.xenonColor)
|
||||
end
|
||||
if props.customXenonColor then
|
||||
SetVehicleXenonLightsCustomColor(vehicle, props.customXenonColor[1], props.customXenonColor[2],
|
||||
props.customXenonColor[3])
|
||||
end
|
||||
if props.modSmokeEnabled then
|
||||
ToggleVehicleMod(vehicle, 20, true)
|
||||
end
|
||||
if props.tyreSmokeColor then
|
||||
SetVehicleTyreSmokeColor(vehicle, props.tyreSmokeColor[1], props.tyreSmokeColor[2], props.tyreSmokeColor[3])
|
||||
end
|
||||
if props.modSpoilers then
|
||||
SetVehicleMod(vehicle, 0, props.modSpoilers, false)
|
||||
end
|
||||
if props.modFrontBumper then
|
||||
SetVehicleMod(vehicle, 1, props.modFrontBumper, false)
|
||||
end
|
||||
if props.modRearBumper then
|
||||
SetVehicleMod(vehicle, 2, props.modRearBumper, false)
|
||||
end
|
||||
if props.modSideSkirt then
|
||||
SetVehicleMod(vehicle, 3, props.modSideSkirt, false)
|
||||
end
|
||||
if props.modExhaust then
|
||||
SetVehicleMod(vehicle, 4, props.modExhaust, false)
|
||||
end
|
||||
if props.modFrame then
|
||||
SetVehicleMod(vehicle, 5, props.modFrame, false)
|
||||
end
|
||||
if props.modGrille then
|
||||
SetVehicleMod(vehicle, 6, props.modGrille, false)
|
||||
end
|
||||
if props.modHood then
|
||||
SetVehicleMod(vehicle, 7, props.modHood, false)
|
||||
end
|
||||
if props.modFender then
|
||||
SetVehicleMod(vehicle, 8, props.modFender, false)
|
||||
end
|
||||
if props.modRightFender then
|
||||
SetVehicleMod(vehicle, 9, props.modRightFender, false)
|
||||
end
|
||||
if props.modRoof then
|
||||
SetVehicleMod(vehicle, 10, props.modRoof, false)
|
||||
end
|
||||
if props.modEngine then
|
||||
SetVehicleMod(vehicle, 11, props.modEngine, false)
|
||||
end
|
||||
if props.modBrakes then
|
||||
SetVehicleMod(vehicle, 12, props.modBrakes, false)
|
||||
end
|
||||
if props.modTransmission then
|
||||
SetVehicleMod(vehicle, 13, props.modTransmission, false)
|
||||
end
|
||||
if props.modHorns then
|
||||
SetVehicleMod(vehicle, 14, props.modHorns, false)
|
||||
end
|
||||
if props.modSuspension then
|
||||
SetVehicleMod(vehicle, 15, props.modSuspension, false)
|
||||
end
|
||||
if props.modArmor then
|
||||
SetVehicleMod(vehicle, 16, props.modArmor, false)
|
||||
end
|
||||
if props.modTurbo then
|
||||
ToggleVehicleMod(vehicle, 18, props.modTurbo)
|
||||
end
|
||||
if props.modXenon then
|
||||
ToggleVehicleMod(vehicle, 22, props.modXenon)
|
||||
end
|
||||
if props.modFrontWheels then
|
||||
SetVehicleMod(vehicle, 23, props.modFrontWheels, false)
|
||||
end
|
||||
if props.modBackWheels then
|
||||
SetVehicleMod(vehicle, 24, props.modBackWheels, false)
|
||||
end
|
||||
if props.modPlateHolder then
|
||||
SetVehicleMod(vehicle, 25, props.modPlateHolder, false)
|
||||
end
|
||||
if props.modVanityPlate then
|
||||
SetVehicleMod(vehicle, 26, props.modVanityPlate, false)
|
||||
end
|
||||
if props.modTrimA then
|
||||
SetVehicleMod(vehicle, 27, props.modTrimA, false)
|
||||
end
|
||||
if props.modOrnaments then
|
||||
SetVehicleMod(vehicle, 28, props.modOrnaments, false)
|
||||
end
|
||||
if props.modDashboard then
|
||||
SetVehicleMod(vehicle, 29, props.modDashboard, false)
|
||||
end
|
||||
if props.modDial then
|
||||
SetVehicleMod(vehicle, 30, props.modDial, false)
|
||||
end
|
||||
if props.modDoorSpeaker then
|
||||
SetVehicleMod(vehicle, 31, props.modDoorSpeaker, false)
|
||||
end
|
||||
if props.modSeats then
|
||||
SetVehicleMod(vehicle, 32, props.modSeats, false)
|
||||
end
|
||||
if props.modSteeringWheel then
|
||||
SetVehicleMod(vehicle, 33, props.modSteeringWheel, false)
|
||||
end
|
||||
if props.modShifterLeavers then
|
||||
SetVehicleMod(vehicle, 34, props.modShifterLeavers, false)
|
||||
end
|
||||
if props.modAPlate then
|
||||
SetVehicleMod(vehicle, 35, props.modAPlate, false)
|
||||
end
|
||||
if props.modSpeakers then
|
||||
SetVehicleMod(vehicle, 36, props.modSpeakers, false)
|
||||
end
|
||||
if props.modTrunk then
|
||||
SetVehicleMod(vehicle, 37, props.modTrunk, false)
|
||||
end
|
||||
if props.modHydrolic then
|
||||
SetVehicleMod(vehicle, 38, props.modHydrolic, false)
|
||||
end
|
||||
if props.modEngineBlock then
|
||||
SetVehicleMod(vehicle, 39, props.modEngineBlock, false)
|
||||
end
|
||||
if props.modAirFilter then
|
||||
SetVehicleMod(vehicle, 40, props.modAirFilter, false)
|
||||
end
|
||||
if props.modStruts then
|
||||
SetVehicleMod(vehicle, 41, props.modStruts, false)
|
||||
end
|
||||
if props.modArchCover then
|
||||
SetVehicleMod(vehicle, 42, props.modArchCover, false)
|
||||
end
|
||||
if props.modAerials then
|
||||
SetVehicleMod(vehicle, 43, props.modAerials, false)
|
||||
end
|
||||
if props.modTrimB then
|
||||
SetVehicleMod(vehicle, 44, props.modTrimB, false)
|
||||
end
|
||||
if props.modTank then
|
||||
SetVehicleMod(vehicle, 45, props.modTank, false)
|
||||
end
|
||||
if props.modWindows then
|
||||
SetVehicleMod(vehicle, 46, props.modWindows, false)
|
||||
end
|
||||
|
||||
if props.modLivery then
|
||||
SetVehicleMod(vehicle, 48, props.modLivery, false)
|
||||
SetVehicleLivery(vehicle, props.modLivery)
|
||||
end
|
||||
|
||||
if props.windowsBroken then
|
||||
for k, v in pairs(props.windowsBroken) do
|
||||
if v then
|
||||
SmashVehicleWindow(vehicle, tonumber(k))
|
||||
end
|
||||
if props.doorsBroken ~= nil then
|
||||
for k, v in pairs(props.doorsBroken) do
|
||||
if v then
|
||||
SetVehicleDoorBroken(vehicle, tonumber(k), true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if props.doorsBroken then
|
||||
for k, v in pairs(props.doorsBroken) do
|
||||
if v then
|
||||
SetVehicleDoorBroken(vehicle, tonumber(k), true)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if props.tyreBurst then
|
||||
for k, v in pairs(props.tyreBurst) do
|
||||
if v then
|
||||
SetVehicleTyreBurst(vehicle, tonumber(k), true, 1000.0)
|
||||
end
|
||||
if props.tyreBurst ~= nil then
|
||||
for k, v in pairs(props.tyreBurst) do
|
||||
if v then
|
||||
SetVehicleTyreBurst(vehicle, tonumber(k), true, 1000.0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -13,6 +13,10 @@ CreateThread(function()
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("esx:requestModel", function(model)
|
||||
ESX.Streaming.RequestModel(model)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:playerLoaded')
|
||||
AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin)
|
||||
ESX.PlayerData = xPlayer
|
||||
|
||||
@@ -1,32 +1,17 @@
|
||||
CreateThread(function()
|
||||
local isDead = false
|
||||
|
||||
while true do
|
||||
local sleep = 1500
|
||||
local player = PlayerId()
|
||||
|
||||
if NetworkIsPlayerActive(player) then
|
||||
local playerPed = PlayerPedId()
|
||||
|
||||
if IsPedFatallyInjured(playerPed) and not isDead then
|
||||
sleep = 0
|
||||
isDead = true
|
||||
|
||||
local killerEntity, deathCause = GetPedSourceOfDeath(playerPed), GetPedCauseOfDeath(playerPed)
|
||||
local killerClientId = NetworkGetPlayerIndexFromPed(killerEntity)
|
||||
|
||||
if killerEntity ~= playerPed and killerClientId and NetworkIsPlayerActive(killerClientId) then
|
||||
PlayerKilledByPlayer(GetPlayerServerId(killerClientId), killerClientId, deathCause)
|
||||
else
|
||||
PlayerKilled(deathCause)
|
||||
end
|
||||
|
||||
elseif not IsPedFatallyInjured(playerPed) and isDead then
|
||||
sleep = 0
|
||||
isDead = false
|
||||
end
|
||||
AddEventHandler('gameEventTriggered', function(event, data)
|
||||
if event ~= 'CEventNetworkEntityDamage' then return end
|
||||
local victim, victimDied = data[1], data[4]
|
||||
if not IsPedAPlayer(victim) then return end
|
||||
local player = PlayerId()
|
||||
local playerPed = PlayerPedId()
|
||||
if victimDied and NetworkGetPlayerIndexFromPed(victim) == player and (IsPedDeadOrDying(victim, true) or IsPedFatallyInjured(victim)) then
|
||||
local killerEntity, deathCause = GetPedSourceOfDeath(playerPed), GetPedCauseOfDeath(playerPed)
|
||||
local killerClientId = NetworkGetPlayerIndexFromPed(killerEntity)
|
||||
if killerEntity ~= playerPed and killerClientId and NetworkIsPlayerActive(killerClientId) then
|
||||
PlayerKilledByPlayer(GetPlayerServerId(killerClientId), killerClientId, deathCause)
|
||||
else
|
||||
PlayerKilled(deathCause)
|
||||
end
|
||||
Wait(sleep)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -7,11 +7,7 @@ for i = 97, 122 do table.insert(Charset, string.char(i)) end
|
||||
function ESX.GetRandomString(length)
|
||||
math.randomseed(GetGameTimer())
|
||||
|
||||
if length > 0 then
|
||||
return ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)]
|
||||
else
|
||||
return ''
|
||||
end
|
||||
return length > 0 and ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)] or ''
|
||||
end
|
||||
|
||||
function ESX.GetConfig()
|
||||
|
||||
@@ -60,7 +60,7 @@ Config.RemoveHudCommonents = {
|
||||
[22] = false, --HUD_WEAPONS
|
||||
}
|
||||
|
||||
Config.MaxAdminVehicles = true -- admin vehicles spawn with max vehcle settings
|
||||
Config.MaxAdminVehicles = false -- admin vehicles spawn with max vehcle settings
|
||||
Config.CustomAIPlates = 'ESX.A111' -- Custom plates for AI vehicles
|
||||
-- Pattern string format
|
||||
--1 will lead to a random number from 0-9.
|
||||
|
||||
@@ -356,8 +356,4 @@ Locales['en'] = {
|
||||
['tint_lspd'] = 'blue skin',
|
||||
['tint_orange'] = 'orange skin',
|
||||
['tint_platinum'] = 'platinum skin',
|
||||
|
||||
-- Duty related
|
||||
['stopped_duty'] = 'You\'ve stopped your duty.',
|
||||
['started_duty'] = 'You\'ve started your duty.',
|
||||
}
|
||||
|
||||
@@ -19,6 +19,12 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
if Config.Multichar then self.license = 'license'.. identifier:sub(identifier:find(':'), identifier:len()) else self.license = 'license:'..identifier end
|
||||
|
||||
ExecuteCommand(('add_principal identifier.%s group.%s'):format(self.license, self.group))
|
||||
|
||||
Player(self.source).state:set("identifier", self.identifier, true)
|
||||
Player(self.source).state:set("license", self.license, true)
|
||||
Player(self.source).state:set("job", self.job, true)
|
||||
Player(self.source).state:set("group", self.group, true)
|
||||
Player(self.source).state:set("name", self.name, true)
|
||||
|
||||
function self.triggerEvent(eventName, ...)
|
||||
TriggerClientEvent(eventName, self.source, ...)
|
||||
@@ -36,7 +42,8 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
function self.updateCoords()
|
||||
local Ped = GetPlayerPed(self.source)
|
||||
local coords = GetEntityCoords(Ped)
|
||||
self.coords = {x = ESX.Math.Round(coords.x, 1), y = ESX.Math.Round(coords.y, 1), z = ESX.Math.Round(coords.z, 1), heading = ESX.Math.Round(coords.heading or 0.0, 1)}
|
||||
local heading = GetEntityHeading(Ped)
|
||||
self.coords = {x = ESX.Math.Round(coords.x, 1), y = ESX.Math.Round(coords.y, 1), z = ESX.Math.Round(coords.z, 1), heading = ESX.Math.Round(heading or 0.0, 1)}
|
||||
end
|
||||
|
||||
function self.getCoords(vector)
|
||||
@@ -77,6 +84,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
function self.setGroup(newGroup)
|
||||
ExecuteCommand(('remove_principal identifier.%s group.%s'):format(self.license, self.group))
|
||||
self.group = newGroup
|
||||
Player(self.source).state:set("group", self.group, true)
|
||||
ExecuteCommand(('add_principal identifier.%s group.%s'):format(self.license, self.group))
|
||||
end
|
||||
|
||||
@@ -86,6 +94,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
|
||||
function self.set(k, v)
|
||||
self.variables[k] = v
|
||||
Player(self.source).state:set(k, v, true)
|
||||
end
|
||||
|
||||
function self.get(k)
|
||||
@@ -169,6 +178,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
|
||||
function self.setName(newName)
|
||||
self.name = newName
|
||||
Player(self.source).state:set("name", self.name, true)
|
||||
end
|
||||
|
||||
function self.setAccountMoney(accountName, money, reason)
|
||||
@@ -300,10 +310,14 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
end
|
||||
|
||||
function self.canCarryItem(name, count, metadata)
|
||||
local currentWeight, itemWeight = self.weight, ESX.Items[name].weight
|
||||
local newWeight = currentWeight + (itemWeight * count)
|
||||
if ESX.Items[name] then
|
||||
local currentWeight, itemWeight = self.weight, ESX.Items[name].weight
|
||||
local newWeight = currentWeight + (itemWeight * count)
|
||||
|
||||
return newWeight <= self.maxWeight
|
||||
return newWeight <= self.maxWeight
|
||||
else
|
||||
print(('[^3WARNING^7] Item ^5"%s"^7 was used but does not exist!'):format(name))
|
||||
end
|
||||
end
|
||||
|
||||
function self.canSwapItem(firstItem, firstItemCount, testItem, testItemCount)
|
||||
@@ -355,6 +369,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
|
||||
TriggerEvent('esx:setJob', self.source, self.job, lastJob)
|
||||
self.triggerEvent('esx:setJob', self.job)
|
||||
Player(self.source).state:set("job", self.job, true)
|
||||
else
|
||||
print(('[es_extended] [^3WARNING^7] Ignoring invalid ^5.setJob()^7 usage for ID: ^5%s^7, Job: ^5%s^7'):format(self.source, job))
|
||||
end
|
||||
|
||||
@@ -62,23 +62,21 @@ end
|
||||
---@param Properties table
|
||||
---@param cb function
|
||||
function ESX.OneSync.SpawnVehicle(model, coords, heading, Properties, cb)
|
||||
model = type(model) == 'string' and joaat(model) or model
|
||||
Properties = Properties or {}
|
||||
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
|
||||
CreateThread(function()
|
||||
local player = nil
|
||||
for _, playerId in ipairs(GetPlayers()) do
|
||||
ESX.GetVehicleType(model, playerId, function(Type)
|
||||
local SpawnedEntity = CreateVehicleServerSetter(model, Type, vector, heading)
|
||||
Wait(250)
|
||||
local NetworkId = NetworkGetNetworkIdFromEntity(SpawnedEntity)
|
||||
Properties.NetId = NetworkId
|
||||
Entity(SpawnedEntity).state:set('VehicleProperties', Properties, true)
|
||||
cb(NetworkId)
|
||||
end)
|
||||
break
|
||||
end
|
||||
end)
|
||||
model = type(model) == 'string' and joaat(model) or model
|
||||
Properties = Properties or {}
|
||||
local vector = type(coords) == "vector3" and coords or vec(coords.x, coords.y, coords.z)
|
||||
TriggerClientEvent("esx:requestModel", -1, model)
|
||||
CreateThread(function()
|
||||
local xPlayer = ESX.OneSync.GetClosestPlayer(vector, 200)
|
||||
ESX.GetVehicleType(model, xPlayer.id, function(Type)
|
||||
local SpawnedEntity = CreateVehicleServerSetter(model, Type, vector, heading)
|
||||
Wait(250)
|
||||
local NetworkId = NetworkGetNetworkIdFromEntity(SpawnedEntity)
|
||||
Properties.NetId = NetworkId
|
||||
Entity(SpawnedEntity).state:set('VehicleProperties', Properties, true)
|
||||
cb(NetworkId)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
|
||||
+100
-96
@@ -1,7 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css">
|
||||
|
||||
@@ -9,7 +10,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>ESX Context HUD</title>
|
||||
|
||||
<style type="text/css">
|
||||
<style type="text/css">
|
||||
:root {
|
||||
--item-main: #242424;
|
||||
--item-unselectable: #161616;
|
||||
@@ -17,7 +18,8 @@
|
||||
--item-disabled: #393939;
|
||||
}
|
||||
|
||||
html,body {
|
||||
html,
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
outline: none;
|
||||
@@ -48,20 +50,20 @@
|
||||
|
||||
.center {
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.left {
|
||||
top: 50%;
|
||||
left: 25%;
|
||||
transform: translate(-50%,-50%);
|
||||
left: 25%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.right {
|
||||
top: 50%;
|
||||
left: 75%;
|
||||
transform: translate(-50%,-50%);
|
||||
left: 75%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
.item {
|
||||
@@ -76,17 +78,17 @@
|
||||
background: var(--item-hover);
|
||||
}
|
||||
|
||||
.item > i {
|
||||
.item>i {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.item > div {
|
||||
.item>div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
.item > div > i {
|
||||
.item>div>i {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
@@ -135,100 +137,101 @@
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: rgb(20,20,20);
|
||||
border-radius: 5px;
|
||||
background: rgb(20, 20, 20);
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: rgb(30,30,30);
|
||||
background: rgb(30, 30, 30);
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 5px;
|
||||
display: flex;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
flex-direction: row-reverse;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
gap: 5px;
|
||||
}
|
||||
|
||||
/* Hide the browser's default checkbox */
|
||||
.container input {
|
||||
position: relative;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
height: 0;
|
||||
width: 0;
|
||||
position: relative;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
/* Create a custom checkbox */
|
||||
.checkmark {
|
||||
position: relative;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
border-radius: 8px;
|
||||
background-color: #eee;
|
||||
position: relative;
|
||||
height: 10px;
|
||||
width: 10px;
|
||||
border-radius: 8px;
|
||||
background-color: #eee;
|
||||
}
|
||||
|
||||
/* On mouse-over, add a grey background color */
|
||||
.container:hover input ~ .checkmark {
|
||||
background-color: #ccc;
|
||||
.container:hover input~.checkmark {
|
||||
background-color: #ccc;
|
||||
}
|
||||
|
||||
/* When the checkbox is checked, add a blue background */
|
||||
.container input:checked ~ .checkmark {
|
||||
background-color: #2196F3;
|
||||
.container input:checked~.checkmark {
|
||||
background-color: #2196F3;
|
||||
}
|
||||
|
||||
/* Create the checkmark/indicator (hidden when not checked) */
|
||||
.checkmark:after {
|
||||
content: "";
|
||||
position: relative;
|
||||
display: none;
|
||||
content: "";
|
||||
position: relative;
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Show the checkmark when checked */
|
||||
.container input:checked ~ .checkmark:after {
|
||||
display: block;
|
||||
.container input:checked~.checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="container" class="right">
|
||||
<div class="item unselectable">
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<i class="fas fa-info-circle"></i>
|
||||
<div>
|
||||
<b>Unselectable Item</b>
|
||||
<i>Testing, testing a description here.</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item disabled">
|
||||
<i class="fas fa-times"></i>
|
||||
<i class="fas fa-times"></i>
|
||||
<div>
|
||||
<b>Disabled Item</b>
|
||||
<i>Testing, testing a description here.</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<i class="fas fa-check"></i>
|
||||
<i class="fas fa-check"></i>
|
||||
<div>
|
||||
<b>Item</b>
|
||||
<i>Testing, testing a description here. Generic words to force overflow.</i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
const container = document.getElementById("container")
|
||||
|
||||
const CreateElement = (tag = "div",className = "",parent) => {
|
||||
const CreateElement = (tag = "div", className = "", parent) => {
|
||||
const e = document.createElement(tag)
|
||||
e.className = className
|
||||
|
||||
@@ -239,48 +242,48 @@
|
||||
return e
|
||||
}
|
||||
|
||||
function Open(eles,position = "right") {
|
||||
function Open(eles, position = "right") {
|
||||
container.innerHTML = ""
|
||||
container.className = position
|
||||
|
||||
for (let i=0;i<eles.length;i++) {
|
||||
for (let i = 0; i < eles.length; i++) {
|
||||
let ele = eles[i]
|
||||
let item = CreateElement("div","item",container)
|
||||
let item = CreateElement("div", "item", container)
|
||||
|
||||
let icon = CreateElement("i",ele.icon,item)
|
||||
let div = CreateElement("div","",item)
|
||||
let icon = CreateElement("i", ele.icon, item)
|
||||
let div = CreateElement("div", "", item)
|
||||
|
||||
let title = CreateElement("b","",div)
|
||||
let title = CreateElement("b", "", div)
|
||||
title.innerHTML = ele.title
|
||||
|
||||
if (ele.description) {
|
||||
let desc = CreateElement("i","",div)
|
||||
let desc = CreateElement("i", "", div)
|
||||
desc.innerHTML = ele.description || ""
|
||||
}
|
||||
|
||||
if (ele.input) {
|
||||
if (ele.inputType == "radio") {
|
||||
for (let j=0;j<ele.inputValues.length;j++) {
|
||||
for (let j = 0; j < ele.inputValues.length; j++) {
|
||||
let v = ele.inputValues[j]
|
||||
let container = CreateElement("label","container",div)
|
||||
container.innerHTML = v.text
|
||||
let container = CreateElement("label", "container", div)
|
||||
container.innerHTML = v.text
|
||||
|
||||
let input = CreateElement("INPUT","",container)
|
||||
let input = CreateElement("INPUT", "", container)
|
||||
input.type = "radio"
|
||||
input.name = i+1
|
||||
input.name = i + 1
|
||||
input.checked = (ele.inputValue || ele.inputPlaceholder || -1) == v.value
|
||||
|
||||
let span = CreateElement("SPAN","checkmark",container)
|
||||
let span = CreateElement("SPAN", "checkmark", container)
|
||||
|
||||
input.onchange = function() {
|
||||
$.post(`https://${GetParentResourceName()}/changed`,JSON.stringify({
|
||||
index:i+1,
|
||||
value:v.value
|
||||
}))
|
||||
input.onchange = function () {
|
||||
$.post(`https://${GetParentResourceName()}/changed`, JSON.stringify({
|
||||
index: i + 1,
|
||||
value: v.value
|
||||
}))
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let input = CreateElement("input","",div)
|
||||
let input = CreateElement("input", "", div)
|
||||
input.type = ele.inputType
|
||||
|
||||
if (ele.inputValue) {
|
||||
@@ -296,34 +299,34 @@
|
||||
if (ele.inputMin) input.min = ele.inputMin;
|
||||
if (ele.inputMax) input.max = ele.inputMax;
|
||||
|
||||
input.onchange = function() {
|
||||
input.onchange = function () {
|
||||
let v = Number(input.value)
|
||||
|
||||
if (ele.inputMin) {
|
||||
v = Math.max(ele.inputMin,v)
|
||||
v = Math.max(ele.inputMin, v)
|
||||
}
|
||||
|
||||
if (ele.inputMax) {
|
||||
v = Math.min(ele.inputMax,v)
|
||||
v = Math.min(ele.inputMax, v)
|
||||
}
|
||||
|
||||
input.value = v
|
||||
input.value = v
|
||||
|
||||
$.post(`https://${GetParentResourceName()}/changed`,JSON.stringify({
|
||||
index:i+1,
|
||||
value:v
|
||||
}))
|
||||
$.post(`https://${GetParentResourceName()}/changed`, JSON.stringify({
|
||||
index: i + 1,
|
||||
value: v
|
||||
}))
|
||||
}
|
||||
break
|
||||
break
|
||||
|
||||
case "text":
|
||||
input.onchange = function() {
|
||||
$.post(`https://${GetParentResourceName()}/changed`,JSON.stringify({
|
||||
index:i+1,
|
||||
value:input.value
|
||||
}))
|
||||
input.onchange = function () {
|
||||
$.post(`https://${GetParentResourceName()}/changed`, JSON.stringify({
|
||||
index: i + 1,
|
||||
value: input.value
|
||||
}))
|
||||
}
|
||||
break
|
||||
break
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -332,9 +335,9 @@
|
||||
} else if (ele.unselectable) {
|
||||
item.className += " unselectable"
|
||||
} else if (!ele.input) {
|
||||
item.onclick = function() {
|
||||
$.post(`https://${GetParentResourceName()}/selected`,JSON.stringify({
|
||||
index:i+1
|
||||
item.onclick = function () {
|
||||
$.post(`https://${GetParentResourceName()}/selected`, JSON.stringify({
|
||||
index: i + 1
|
||||
}))
|
||||
}
|
||||
}
|
||||
@@ -353,7 +356,7 @@
|
||||
Closed()
|
||||
}
|
||||
|
||||
window.addEventListener("message",(e) => {
|
||||
window.addEventListener("message", (e) => {
|
||||
let data = e.data
|
||||
|
||||
if (!data.func || !window[data.func]) {
|
||||
@@ -363,14 +366,14 @@
|
||||
window[data.func](...data.args)
|
||||
})
|
||||
|
||||
window.addEventListener("keydown",(e) => {
|
||||
if (e.key == "Escape" || e.key == "Backspace") {
|
||||
if (e.target.tagName.toLowerCase() == "input") {
|
||||
return
|
||||
}
|
||||
window.addEventListener("keydown", (e) => {
|
||||
if (e.key == "Escape" || e.key == "Backspace") {
|
||||
if (e.target.tagName.toLowerCase() == "input") {
|
||||
return
|
||||
}
|
||||
|
||||
Close()
|
||||
}
|
||||
Close()
|
||||
}
|
||||
})
|
||||
|
||||
// Open([
|
||||
@@ -433,4 +436,5 @@
|
||||
// ])
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
A Core Resource that Allows the player to Pick their characters, Name, Gender, Height and Date-of-birth.
|
||||
|
||||

|
||||

|
||||
|
||||
# Infomation
|
||||
|
||||
## Requirements
|
||||
|
||||
[esx_skin](./../esx_skin/README.md)
|
||||
[esx_skin](./../esx_skin/README.md)
|
||||
|
||||
## Commands
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ end)
|
||||
|
||||
RegisterNetEvent('esx_identity:setPlayerData', function(data)
|
||||
SetTimeout(1, function()
|
||||
ESX.SetPlayerData("name", ('%s %s'):format(data.firstName, data.lastName))
|
||||
ESX.SetPlayerData('firstName', data.firstName)
|
||||
ESX.SetPlayerData('lastName', data.lastName)
|
||||
ESX.SetPlayerData('dateofbirth', data.dateOfBirth)
|
||||
ESX.SetPlayerData('sex', data.sex)
|
||||
ESX.SetPlayerData('height', data.height)
|
||||
ESX.SetPlayerData("name", ('%s %s'):format(data.firstName, data.lastName))
|
||||
ESX.SetPlayerData('firstName', data.firstName)
|
||||
ESX.SetPlayerData('lastName', data.lastName)
|
||||
ESX.SetPlayerData('dateofbirth', data.dateOfBirth)
|
||||
ESX.SetPlayerData('sex', data.sex)
|
||||
ESX.SetPlayerData('height', data.height)
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:loadingScreenOff', function()
|
||||
loadingScreenFinished = true
|
||||
@@ -29,7 +29,7 @@ RegisterNUICallback('ready', function(data, cb)
|
||||
end)
|
||||
|
||||
if not Config.UseDeferrals then
|
||||
function EnableGui(state)
|
||||
function setGuiState(state)
|
||||
SetNuiFocus(state, state)
|
||||
guiEnabled = state
|
||||
|
||||
@@ -39,58 +39,31 @@ if not Config.UseDeferrals then
|
||||
ClearTimecycleModifier()
|
||||
end
|
||||
|
||||
SendNUIMessage({type = "enableui",enable = state})
|
||||
SendNUIMessage({type = "enableui", enable = state})
|
||||
end
|
||||
|
||||
RegisterNetEvent('esx_identity:showRegisterIdentity', function()
|
||||
TriggerEvent('esx_skin:resetFirstSpawn')
|
||||
|
||||
if not ESX.PlayerData.dead then EnableGui(true) end
|
||||
if not ESX.PlayerData.dead then setGuiState(true) end
|
||||
end)
|
||||
|
||||
RegisterNUICallback('register', function(data, cb)
|
||||
ESX.TriggerServerCallback('esx_identity:registerIdentity', function(callback)
|
||||
if callback then
|
||||
ESX.ShowNotification(TranslateCap('thank_you_for_registering'))
|
||||
EnableGui(false)
|
||||
if not guiEnabled then
|
||||
return
|
||||
end
|
||||
|
||||
if not ESX.GetConfig().Multichar then
|
||||
TriggerEvent('esx_skin:playerRegistered')
|
||||
end
|
||||
ESX.TriggerServerCallback('esx_identity:registerIdentity', function(callback)
|
||||
if not callback then
|
||||
return
|
||||
end
|
||||
|
||||
ESX.ShowNotification(TranslateCap('thank_you_for_registering'))
|
||||
setGuiState(false)
|
||||
|
||||
if not ESX.GetConfig().Multichar then
|
||||
TriggerEvent('esx_skin:playerRegistered')
|
||||
end
|
||||
end, data)
|
||||
end)
|
||||
|
||||
CreateThread(function()
|
||||
while true do
|
||||
local sleep = 1500
|
||||
|
||||
if guiEnabled then
|
||||
sleep = 0
|
||||
DisableControlAction(0, 1, true) -- LookLeftRight
|
||||
DisableControlAction(0, 2, true) -- LookUpDown
|
||||
DisableControlAction(0, 106, true) -- VehicleMouseControlOverride
|
||||
DisableControlAction(0, 142, true) -- MeleeAttackAlternate
|
||||
DisableControlAction(0, 30, true) -- MoveLeftRight
|
||||
DisableControlAction(0, 31, true) -- MoveUpDown
|
||||
DisableControlAction(0, 21, true) -- disable sprint
|
||||
DisableControlAction(0, 24, true) -- disable attack
|
||||
DisableControlAction(0, 25, true) -- disable aim
|
||||
DisableControlAction(0, 47, true) -- disable weapon
|
||||
DisableControlAction(0, 58, true) -- disable weapon
|
||||
DisableControlAction(0, 263, true) -- disable melee
|
||||
DisableControlAction(0, 264, true) -- disable melee
|
||||
DisableControlAction(0, 257, true) -- disable melee
|
||||
DisableControlAction(0, 140, true) -- disable melee
|
||||
DisableControlAction(0, 141, true) -- disable melee
|
||||
DisableControlAction(0, 143, true) -- disable melee
|
||||
DisableControlAction(0, 75, true) -- disable exit vehicle
|
||||
DisableControlAction(27, 75, true) -- disable exit vehicle
|
||||
else
|
||||
sleep = 1500
|
||||
end
|
||||
|
||||
Wait(sleep)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
@@ -1,9 +1,7 @@
|
||||
|
||||
|
||||
ALTER TABLE `users`
|
||||
ADD COLUMN `firstname` VARCHAR(16) NULL DEFAULT NULL,
|
||||
ADD COLUMN `lastname` VARCHAR(16) NULL DEFAULT NULL,
|
||||
ADD COLUMN `dateofbirth` VARCHAR(10) NULL DEFAULT NULL,
|
||||
ADD COLUMN `sex` VARCHAR(1) NULL DEFAULT NULL,
|
||||
ADD COLUMN `height` INT NULL DEFAULT NULL
|
||||
;
|
||||
;
|
||||
@@ -6,10 +6,12 @@ description 'ESX Identity'
|
||||
lua54 'yes'
|
||||
version '1.8.5'
|
||||
|
||||
shared_script '@es_extended/imports.lua'
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
'@es_extended/locale.lua',
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
'locales/*.lua',
|
||||
'config.lua',
|
||||
@@ -17,7 +19,6 @@ server_scripts {
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'locales/*.lua',
|
||||
'config.lua',
|
||||
'client/main.lua'
|
||||
@@ -29,7 +30,6 @@ files {
|
||||
'html/index.html',
|
||||
'html/js/script.js',
|
||||
'html/css/style.css',
|
||||
'html/img/esx_identity.png'
|
||||
}
|
||||
|
||||
dependency 'es_extended'
|
||||
dependency 'es_extended'
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB |
@@ -1,23 +1,24 @@
|
||||
<html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
<script src="nui://game/ui/jquery.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
|
||||
<link href="css/style.css" rel="stylesheet" type="text/css" />
|
||||
<link href="css/style.css" rel="stylesheet">
|
||||
|
||||
<title>ESX Identity</title>
|
||||
</head>
|
||||
|
||||
<body onkeydown="TriggeredKey(this)">
|
||||
<div class="dialog">
|
||||
<div class="title"><b>IDENTITY</b></div>
|
||||
<!-- <img id="logo" height="110px" width="332px"> > -->
|
||||
<form id="register" name="register" action="#">
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif";>First Name</div>
|
||||
<input id="firstname" type="text" class="" name="firstname" placeholder="First Name"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif";>Last Name</div>
|
||||
<input id="lastname" type="text" class="" name="lastname" placeholder="Last Name"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif", sans-serif;>Date of Birth (MM/DD/YYYY)</div>
|
||||
<input id="dateofbirth" type="date" name="dateofbirth" class="" placeholder="Date of Birth (dd/mm/yyyy)" min="01/01/1900" max="01/01/2010" onfocus="(this.type='date')"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif", sans-serif;>Height</div>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif">First Name</div>
|
||||
<input id="firstname" type="text" class="" name="firstname" placeholder="First Name" minlength="3" maxlength="8" pattern="[a-zA-Z]*"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif">Last Name</div>
|
||||
<input id="lastname" type="text" class="" name="lastname" placeholder="Last Name" minlength="3" maxlength="10" pattern="[a-zA-Z]*"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif">Date of Birth (MM/DD/YYYY)</div>
|
||||
<input id="dateofbirth" type="date" name="dateofbirth" class="" min="1900-01-01" max="2010-01-01" onfocus="(this.type='date')"><br>
|
||||
<div style="color: rgb(46, 187, 205);font-size: 12px; font-family: 'Gill Sans', sans-serif">Height</div>
|
||||
<input id="height" type="number" class="" name="height" min="120" max="220" placeholder="Height (cm)"><br>
|
||||
<center>
|
||||
<div class="radio-toolbar">
|
||||
@@ -32,74 +33,13 @@
|
||||
</form>
|
||||
<center><font size="1px" color="green">If the submit button doesn't work, please ensure that you've entered the fields correctly.</font></center>
|
||||
</div>
|
||||
<script>
|
||||
const allRanges = document.querySelectorAll(".range-wrap");
|
||||
allRanges.forEach(wrap => {
|
||||
const range = wrap.querySelector(".range");
|
||||
const bubble = wrap.querySelector(".bubble");
|
||||
|
||||
range.addEventListener("input", () => {
|
||||
setBubble(range, bubble);
|
||||
});
|
||||
setBubble(range, bubble);
|
||||
});
|
||||
|
||||
function setBubble(range, bubble) {
|
||||
const val = range.value;
|
||||
const min = range.min ? range.min : 0;
|
||||
const max = range.max ? range.max : 100;
|
||||
const newVal = Number(((val - min) * 100) / (max - min));
|
||||
bubble.innerHTML = 'Height: ' + val;
|
||||
bubble.style.left = `calc(${newVal}% + (${8 - newVal * 0.15}px))`;
|
||||
}
|
||||
|
||||
var myFirstName = document.getElementById('firstname');
|
||||
var myLastName = document.getElementById('lastname');
|
||||
var myDOB = document.getElementById('dateofbirth');
|
||||
var myHeight = document.getElementById('height');
|
||||
|
||||
function isNumber(e) {
|
||||
var key=e.which || e.KeyCode;
|
||||
if ( key >=48 && key <= 57) {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function checkDOB() {
|
||||
var date = new Date($('#dateofbirth').val());
|
||||
day = date.getDate();
|
||||
month = date.getMonth() + 1;
|
||||
year = date.getFullYear();
|
||||
if (isNaN(month) || isNaN(day) || isNaN(year)) {
|
||||
myDOB.style.backgroundColor = '#E06666';
|
||||
myDOB.style.color = 'black';
|
||||
}
|
||||
else {
|
||||
var dateInput = [day, month, year].join('/');
|
||||
|
||||
var regExp = /^(\d{1,2})(\/|-)(\d{1,2})(\/|-)(\d{4})$/;
|
||||
var dateArray = dateInput.match(regExp);
|
||||
|
||||
if (dateArray == null){
|
||||
return false;
|
||||
}
|
||||
|
||||
month = dateArray[1];
|
||||
day= dateArray[3];
|
||||
year = dateArray[5];
|
||||
}
|
||||
}
|
||||
|
||||
<script>
|
||||
function TriggeredKey(e) {
|
||||
var keycode;
|
||||
if (window.event) keycode = window.event.keyCode;
|
||||
if (window.event.keyCode == 13 || window.event.keyCode == 27) return false;
|
||||
}
|
||||
</script>
|
||||
<script src="js/script.js" type="text/javascript"></script>
|
||||
<script src="js/script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,35 +1,37 @@
|
||||
$(function() {
|
||||
$.post('http://esx_identity/ready', JSON.stringify({}))
|
||||
$(document).ready(function () {
|
||||
$.post('http://esx_identity/ready', JSON.stringify({}));
|
||||
|
||||
window.addEventListener('message', function(event) {
|
||||
if (event.data.type === "enableui") {
|
||||
document.body.style.display = event.data.enable ? "block" : "none"
|
||||
}
|
||||
})
|
||||
window.addEventListener('message', function (event) {
|
||||
if (event.data.type === 'enableui') {
|
||||
event.data.enable ? $(document.body).show() : $(document.body).hide();
|
||||
}
|
||||
});
|
||||
|
||||
$("#register").submit(function(event) {
|
||||
event.preventDefault() // Prevent form from submitting
|
||||
|
||||
// Verify date
|
||||
var date = $("#dateofbirth").val()
|
||||
var dateCheck = new Date($("#dateofbirth").val())
|
||||
|
||||
if (dateCheck == "Invalid Date") {
|
||||
date == "invalid"
|
||||
} else {
|
||||
const ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(dateCheck)
|
||||
const mo = new Intl.DateTimeFormat('en', { month: '2-digit' }).format(dateCheck)
|
||||
const da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(dateCheck)
|
||||
|
||||
var formattedDate = `${da}/${mo}/${ye}`
|
||||
|
||||
$.post('http://esx_identity/register', JSON.stringify({
|
||||
firstname: $("#firstname").val(),
|
||||
lastname: $("#lastname").val(),
|
||||
dateofbirth: formattedDate,
|
||||
sex: $("input[type='radio'][name='sex']:checked").val(),
|
||||
height: $("#height").val()
|
||||
}))
|
||||
}
|
||||
})
|
||||
})
|
||||
$('#register').submit(function (event) {
|
||||
event.preventDefault();
|
||||
|
||||
const dofVal = $('#dateofbirth').val();
|
||||
if (!dofVal) return;
|
||||
|
||||
const dateCheck = new Date(dofVal);
|
||||
|
||||
const year = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(dateCheck);
|
||||
const month = new Intl.DateTimeFormat('en', { month: '2-digit' }).format(dateCheck);
|
||||
const day = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(dateCheck);
|
||||
|
||||
const formattedDate = `${day}/${month}/${year}`;
|
||||
|
||||
$.post(
|
||||
'http://esx_identity/register',
|
||||
JSON.stringify({
|
||||
firstname: $('#firstname').val(),
|
||||
lastname: $('#lastname').val(),
|
||||
dateofbirth: formattedDate,
|
||||
sex: $("input[type='radio'][name='sex']:checked").val(),
|
||||
height: $('#height').val(),
|
||||
})
|
||||
);
|
||||
|
||||
$('#register').trigger('reset');
|
||||
});
|
||||
});
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 943 KiB |
+245
-325
@@ -2,24 +2,6 @@ local playerIdentity = {}
|
||||
local alreadyRegistered = {}
|
||||
local multichar = ESX.GetConfig().Multichar
|
||||
|
||||
local function deleteIdentity(xPlayer)
|
||||
if alreadyRegistered[xPlayer.identifier] then
|
||||
xPlayer.setName(('%s %s'):format(nil, nil))
|
||||
xPlayer.set('firstName', nil)
|
||||
xPlayer.set('lastName', nil)
|
||||
xPlayer.set('dateofbirth', nil)
|
||||
xPlayer.set('sex', nil)
|
||||
xPlayer.set('height', nil)
|
||||
deleteIdentityFromDatabase(xPlayer)
|
||||
end
|
||||
end
|
||||
|
||||
local function saveIdentityToDatabase(identifier, identity)
|
||||
MySQL.update.await(
|
||||
'UPDATE users SET firstname = ?, lastname = ?, dateofbirth = ?, sex = ?, height = ? WHERE identifier = ?',
|
||||
{identity.firstName, identity.lastName, identity.dateOfBirth, identity.sex, identity.height, identifier})
|
||||
end
|
||||
|
||||
local function deleteIdentityFromDatabase(xPlayer)
|
||||
MySQL.query.await(
|
||||
'UPDATE users SET firstname = ?, lastname = ?, dateofbirth = ?, sex = ?, height = ?, skin = ? WHERE identifier = ?',
|
||||
@@ -34,45 +16,50 @@ local function deleteIdentityFromDatabase(xPlayer)
|
||||
end
|
||||
end
|
||||
|
||||
local function checkDate(str)
|
||||
if string.match(str, '(%d%d)/(%d%d)/(%d%d%d%d)') ~= nil then
|
||||
local d, m, y = string.match(str, '(%d+)/(%d+)/(%d+)')
|
||||
|
||||
m = tonumber(m)
|
||||
d = tonumber(d)
|
||||
y = tonumber(y)
|
||||
local function deleteIdentity(xPlayer)
|
||||
if not alreadyRegistered[xPlayer.identifier] then
|
||||
return
|
||||
end
|
||||
|
||||
if ((d <= 0) or (d > 31)) or ((m <= 0) or (m > 12)) or ((y <= Config.LowestYear) or (y > Config.HighestYear)) then
|
||||
return false
|
||||
elseif m == 4 or m == 6 or m == 9 or m == 11 then
|
||||
if d > 30 then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
elseif m == 2 then
|
||||
if y % 400 == 0 or (y % 100 ~= 0 and y % 4 == 0) then
|
||||
if d > 29 then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
else
|
||||
if d > 28 then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
xPlayer.setName(('%s %s'):format(nil, nil))
|
||||
xPlayer.set('firstName', nil)
|
||||
xPlayer.set('lastName', nil)
|
||||
xPlayer.set('dateofbirth', nil)
|
||||
xPlayer.set('sex', nil)
|
||||
xPlayer.set('height', nil)
|
||||
deleteIdentityFromDatabase(xPlayer)
|
||||
end
|
||||
|
||||
local function saveIdentityToDatabase(identifier, identity)
|
||||
MySQL.update.await(
|
||||
'UPDATE users SET firstname = ?, lastname = ?, dateofbirth = ?, sex = ?, height = ? WHERE identifier = ?',
|
||||
{identity.firstName, identity.lastName, identity.dateOfBirth, identity.sex, identity.height, identifier})
|
||||
end
|
||||
|
||||
local function checkDOBFormat(str)
|
||||
str = tostring(str)
|
||||
if not string.match(str, '(%d%d)/(%d%d)/(%d%d%d%d)') then
|
||||
return false
|
||||
end
|
||||
|
||||
local d, m, y = string.match(str, '(%d+)/(%d+)/(%d+)')
|
||||
|
||||
m = tonumber(m)
|
||||
d = tonumber(d)
|
||||
y = tonumber(y)
|
||||
|
||||
if ((d <= 0) or (d > 31)) or ((m <= 0) or (m > 12)) or ((y <= Config.LowestYear) or (y > Config.HighestYear)) then
|
||||
return false
|
||||
elseif m == 4 or m == 6 or m == 9 or m == 11 then
|
||||
return d < 30
|
||||
elseif m == 2 then
|
||||
if y % 400 == 0 or (y % 100 ~= 0 and y % 4 == 0) then
|
||||
return d < 29
|
||||
else
|
||||
if d > 31 then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
return d < 28
|
||||
end
|
||||
else
|
||||
return false
|
||||
return d < 31
|
||||
end
|
||||
end
|
||||
|
||||
@@ -98,47 +85,24 @@ local function checkForNumbers(str)
|
||||
end
|
||||
|
||||
local function checkNameFormat(name)
|
||||
if not checkAlphanumeric(name) then
|
||||
if not checkForNumbers(name) then
|
||||
local stringLength = string.len(name)
|
||||
if stringLength > 0 and stringLength < Config.MaxNameLength then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
return false
|
||||
if not checkAlphanumeric(name) and not checkForNumbers(name) then
|
||||
local stringLength = string.len(name)
|
||||
return stringLength > 0 and stringLength < Config.MaxNameLength
|
||||
end
|
||||
end
|
||||
|
||||
local function checkDOBFormat(dob)
|
||||
local date = tostring(dob)
|
||||
|
||||
if checkDate(date) then
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function checkSexFormat(sex)
|
||||
if sex == "m" or sex == "M" or sex == "f" or sex == "F" then
|
||||
return true
|
||||
else
|
||||
if not sex then
|
||||
return false
|
||||
end
|
||||
return sex == "m" or sex == "M" or sex == "f" or sex == "F"
|
||||
end
|
||||
|
||||
local function checkHeightFormat(height)
|
||||
local numHeight = tonumber(height)
|
||||
if numHeight < Config.MinHeight and numHeight > Config.MaxHeight then
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
local numHeight = tonumber(height) or 0
|
||||
return numHeight >= Config.MinHeight and numHeight <= Config.MaxHeight
|
||||
end
|
||||
|
||||
local function convertToLowerCase(str)
|
||||
@@ -151,8 +115,7 @@ end
|
||||
|
||||
local function formatName(name)
|
||||
local loweredName = convertToLowerCase(name)
|
||||
local formattedName = convertFirstLetterToUpper(loweredName)
|
||||
return formattedName
|
||||
return convertFirstLetterToUpper(loweredName)
|
||||
end
|
||||
|
||||
if Config.UseDeferrals then
|
||||
@@ -187,7 +150,7 @@ if Config.UseDeferrals then
|
||||
{"title":"Female","value":"f"}],"style":"expanded","id":"sex"}]},{"type": "ActionSet",
|
||||
"actions": [{"type":"Action.Submit","title":"Submit"}]}],
|
||||
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json","version":"1.0"}]==],
|
||||
function(data, rawData)
|
||||
function(data)
|
||||
if data.firstname == '' or data.lastname == '' or data.dateofbirth == '' or data.sex ==
|
||||
'' or data.height == '' then
|
||||
deferrals.done(TranslateCap('data_incorrect'))
|
||||
@@ -222,46 +185,36 @@ if Config.UseDeferrals then
|
||||
"placeholder":"Sex","choices":[{"title":"Male","value":"m"},{"title":"Female","value":"f"}],
|
||||
"style":"expanded","id":"sex"}]},{"type": "ActionSet","actions": [{"type":"Action.Submit",
|
||||
"title":"Submit"}]}],"$schema": "http://adaptivecards.io/schemas/adaptive-card.json","version":"1.0"}]==],
|
||||
function(data, rawData)
|
||||
if data.firstname == '' or data.lastname == '' or data.dateofbirth == '' or data.sex ==
|
||||
'' or data.height == '' then
|
||||
deferrals.done(TranslateCap('data_incorrect'))
|
||||
else
|
||||
if checkNameFormat(date.firstname) then
|
||||
if checkNameFormat(data.lastname) then
|
||||
if checkDOBFormat(data.dateofbirth) then
|
||||
if checkSexFormat(data.sex) then
|
||||
if checkHeightFormat(data.height) then
|
||||
local formattedFirstName = formatName(data.firstname)
|
||||
local formattedLastName = formatName(data.lastname)
|
||||
local formattedDate = formatDate(data.dateofbirth)
|
||||
|
||||
playerIdentity[identifier] = {
|
||||
firstName = formatName(data.firstname),
|
||||
lastName = formatName(data.lastname),
|
||||
dateOfBirth = data.dateofbirth,
|
||||
sex = data.sex,
|
||||
height = tonumber(data.height),
|
||||
saveToDatabase = true
|
||||
}
|
||||
|
||||
deferrals.done()
|
||||
else
|
||||
deferrals.done(TranslateCap('invalid_height_format'))
|
||||
end
|
||||
else
|
||||
deferrals.done(TranslateCap('invalid_sex_format'))
|
||||
end
|
||||
else
|
||||
deferrals.done(TranslateCap('invalid_dob_format'))
|
||||
end
|
||||
else
|
||||
deferrals.done(TranslateCap('invalid_lastname_format'))
|
||||
end
|
||||
else
|
||||
deferrals.done(TranslateCap('invalid_firstname_format'))
|
||||
end
|
||||
function(data)
|
||||
if data.firstname == '' or data.lastname == '' or data.dateofbirth == '' or data.sex == '' or data.height == '' then
|
||||
return deferrals.done(TranslateCap('data_incorrect'))
|
||||
end
|
||||
if not checkNameFormat(data.firstname) then
|
||||
return deferrals.done(TranslateCap('invalid_firstname_format'))
|
||||
end
|
||||
if not checkNameFormat(data.lastname) then
|
||||
return deferrals.done(TranslateCap('invalid_lastname_format'))
|
||||
end
|
||||
if not checkDOBFormat(data.dateofbirth) then
|
||||
return deferrals.done(TranslateCap('invalid_dob_format'))
|
||||
end
|
||||
if not checkSexFormat(data.sex) then
|
||||
return deferrals.done(TranslateCap('invalid_sex_format'))
|
||||
end
|
||||
if not checkHeightFormat(data.height) then
|
||||
return deferrals.done(TranslateCap('invalid_height_format'))
|
||||
end
|
||||
|
||||
playerIdentity[identifier] = {
|
||||
firstName = formatName(data.firstname),
|
||||
lastName = formatName(data.lastname),
|
||||
dateOfBirth = formatDate(data.dateofbirth),
|
||||
sex = data.sex,
|
||||
height = tonumber(data.height),
|
||||
saveToDatabase = true
|
||||
}
|
||||
|
||||
deferrals.done()
|
||||
end)
|
||||
end
|
||||
end)
|
||||
@@ -272,70 +225,71 @@ if Config.UseDeferrals then
|
||||
|
||||
RegisterNetEvent('esx:playerLoaded')
|
||||
AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
|
||||
if playerIdentity[xPlayer.identifier] then
|
||||
local currentIdentity = playerIdentity[xPlayer.identifier]
|
||||
xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
|
||||
xPlayer.set('firstName', currentIdentity.firstName)
|
||||
xPlayer.set('lastName', currentIdentity.lastName)
|
||||
xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
|
||||
xPlayer.set('sex', currentIdentity.sex)
|
||||
xPlayer.set('height', currentIdentity.height)
|
||||
if currentIdentity.saveToDatabase then
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
end
|
||||
|
||||
Wait(0)
|
||||
alreadyRegistered[xPlayer.identifier] = true
|
||||
TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source)
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
else
|
||||
xPlayer.kick(_('missing_identity'))
|
||||
if not playerIdentity[xPlayer.identifier] then
|
||||
return xPlayer.kick(_('missing_identity'))
|
||||
end
|
||||
|
||||
local currentIdentity = playerIdentity[xPlayer.identifier]
|
||||
xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
|
||||
xPlayer.set('firstName', currentIdentity.firstName)
|
||||
xPlayer.set('lastName', currentIdentity.lastName)
|
||||
xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
|
||||
xPlayer.set('sex', currentIdentity.sex)
|
||||
xPlayer.set('height', currentIdentity.height)
|
||||
if currentIdentity.saveToDatabase then
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
end
|
||||
|
||||
Wait(0)
|
||||
alreadyRegistered[xPlayer.identifier] = true
|
||||
TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source)
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
end)
|
||||
else
|
||||
local function checkIdentity(xPlayer)
|
||||
MySQL.single('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = ?',
|
||||
{xPlayer.identifier}, function(result)
|
||||
if result then
|
||||
if result.firstname then
|
||||
playerIdentity[xPlayer.identifier] = {
|
||||
firstName = result.firstname,
|
||||
lastName = result.lastname,
|
||||
dateOfBirth = result.dateofbirth,
|
||||
sex = result.sex,
|
||||
height = result.height
|
||||
}
|
||||
|
||||
alreadyRegistered[xPlayer.identifier] = true
|
||||
setIdentity(xPlayer)
|
||||
else
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
alreadyRegistered[xPlayer.identifier] = false
|
||||
TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
|
||||
end
|
||||
else
|
||||
TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
local function setIdentity(xPlayer)
|
||||
if alreadyRegistered[xPlayer.identifier] then
|
||||
local currentIdentity = playerIdentity[xPlayer.identifier]
|
||||
if not alreadyRegistered[xPlayer.identifier] then
|
||||
return
|
||||
end
|
||||
local currentIdentity = playerIdentity[xPlayer.identifier]
|
||||
|
||||
xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
|
||||
xPlayer.set('firstName', currentIdentity.firstName)
|
||||
xPlayer.set('lastName', currentIdentity.lastName)
|
||||
xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
|
||||
xPlayer.set('sex', currentIdentity.sex)
|
||||
xPlayer.set('height', currentIdentity.height)
|
||||
TriggerClientEvent('esx_identity:setPlayerData', xPlayer.source, currentIdentity)
|
||||
if currentIdentity.saveToDatabase then
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
end
|
||||
xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
|
||||
xPlayer.set('firstName', currentIdentity.firstName)
|
||||
xPlayer.set('lastName', currentIdentity.lastName)
|
||||
xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
|
||||
xPlayer.set('sex', currentIdentity.sex)
|
||||
xPlayer.set('height', currentIdentity.height)
|
||||
TriggerClientEvent('esx_identity:setPlayerData', xPlayer.source, currentIdentity)
|
||||
if currentIdentity.saveToDatabase then
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
end
|
||||
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
end
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
end
|
||||
|
||||
local function checkIdentity(xPlayer)
|
||||
MySQL.single('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = ?', {xPlayer.identifier},
|
||||
function(result)
|
||||
if not result then
|
||||
return TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
|
||||
end
|
||||
if not result.firstname then
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
alreadyRegistered[xPlayer.identifier] = false
|
||||
return TriggerClientEvent('esx_identity:showRegisterIdentity', xPlayer.source)
|
||||
end
|
||||
|
||||
playerIdentity[xPlayer.identifier] = {
|
||||
firstName = result.firstname,
|
||||
lastName = result.lastname,
|
||||
dateOfBirth = result.dateofbirth,
|
||||
sex = result.sex,
|
||||
height = result.height
|
||||
}
|
||||
|
||||
alreadyRegistered[xPlayer.identifier] = true
|
||||
setIdentity(xPlayer)
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
if not multichar then
|
||||
@@ -344,50 +298,49 @@ else
|
||||
local playerId, identifier = source, ESX.GetIdentifier(source)
|
||||
Wait(40)
|
||||
|
||||
if identifier then
|
||||
MySQL.single('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = ?',
|
||||
{identifier}, function(result)
|
||||
if result then
|
||||
if result.firstname then
|
||||
playerIdentity[identifier] = {
|
||||
firstName = result.firstname,
|
||||
lastName = result.lastname,
|
||||
dateOfBirth = result.dateofbirth,
|
||||
sex = result.sex,
|
||||
height = result.height
|
||||
}
|
||||
if not identifier then
|
||||
return deferrals.done(TranslateCap('no_identifier'))
|
||||
end
|
||||
MySQL.single('SELECT firstname, lastname, dateofbirth, sex, height FROM users WHERE identifier = ?', {identifier},
|
||||
function(result)
|
||||
if not result then
|
||||
playerIdentity[identifier] = nil
|
||||
alreadyRegistered[identifier] = false
|
||||
return deferrals.done()
|
||||
end
|
||||
if not result.firstname then
|
||||
playerIdentity[identifier] = nil
|
||||
alreadyRegistered[identifier] = false
|
||||
return deferrals.done()
|
||||
end
|
||||
|
||||
alreadyRegistered[identifier] = true
|
||||
playerIdentity[identifier] = {
|
||||
firstName = result.firstname,
|
||||
lastName = result.lastname,
|
||||
dateOfBirth = result.dateofbirth,
|
||||
sex = result.sex,
|
||||
height = result.height
|
||||
}
|
||||
|
||||
deferrals.done()
|
||||
else
|
||||
playerIdentity[identifier] = nil
|
||||
alreadyRegistered[identifier] = false
|
||||
deferrals.done()
|
||||
end
|
||||
else
|
||||
playerIdentity[identifier] = nil
|
||||
alreadyRegistered[identifier] = false
|
||||
deferrals.done()
|
||||
end
|
||||
end)
|
||||
else
|
||||
deferrals.done(TranslateCap('no_identifier'))
|
||||
end
|
||||
alreadyRegistered[identifier] = true
|
||||
|
||||
deferrals.done()
|
||||
end)
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
Wait(300)
|
||||
if resource ~= GetCurrentResourceName() then
|
||||
return
|
||||
end
|
||||
Wait(300)
|
||||
|
||||
while not ESX do Wait(0) end
|
||||
while not ESX do Wait(0) end
|
||||
|
||||
local xPlayers = ESX.GetExtendedPlayers()
|
||||
local xPlayers = ESX.GetExtendedPlayers()
|
||||
|
||||
for i=1, #(xPlayers) do
|
||||
if xPlayers[i] then
|
||||
checkIdentity(xPlayers[i])
|
||||
end
|
||||
for i=1, #(xPlayers) do
|
||||
if xPlayers[i] then
|
||||
checkIdentity(xPlayers[i])
|
||||
end
|
||||
end
|
||||
end)
|
||||
@@ -395,7 +348,7 @@ else
|
||||
RegisterNetEvent('esx:playerLoaded', function(playerId, xPlayer)
|
||||
local currentIdentity = playerIdentity[xPlayer.identifier]
|
||||
|
||||
if currentIdentity and alreadyRegistered[xPlayer.identifier] == true then
|
||||
if currentIdentity and alreadyRegistered[xPlayer.identifier] then
|
||||
xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
|
||||
xPlayer.set('firstName', currentIdentity.firstName)
|
||||
xPlayer.set('lastName', currentIdentity.lastName)
|
||||
@@ -421,112 +374,79 @@ else
|
||||
ESX.RegisterServerCallback('esx_identity:registerIdentity', function(source, cb, data)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
if not checkNameFormat(data.firstname) then
|
||||
xPlayer.showNotification(TranslateCap('invalid_firstname_format'), "error")
|
||||
return cb(false)
|
||||
end
|
||||
if not checkNameFormat(data.lastname) then
|
||||
xPlayer.showNotification(TranslateCap('invalid_lastname_format'), "error")
|
||||
return cb(false)
|
||||
end
|
||||
if not checkSexFormat(data.sex) then
|
||||
xPlayer.showNotification(TranslateCap('invalid_sex_format'), "error")
|
||||
return cb(false)
|
||||
end
|
||||
if not checkDOBFormat(data.dateofbirth) then
|
||||
xPlayer.showNotification(TranslateCap('invalid_dob_format'), "error")
|
||||
return cb(false)
|
||||
end
|
||||
if not checkHeightFormat(data.height) then
|
||||
xPlayer.showNotification(TranslateCap('invalid_height_format'), "error")
|
||||
return cb(false)
|
||||
end
|
||||
|
||||
if xPlayer then
|
||||
if not alreadyRegistered[xPlayer.identifier] then
|
||||
xPlayer.showNotification(TranslateCap('running'), "error")
|
||||
if checkNameFormat(data.firstname) then
|
||||
if checkNameFormat(data.lastname) then
|
||||
if checkSexFormat(data.sex) then
|
||||
if checkDOBFormat(data.dateofbirth) then
|
||||
if checkHeightFormat(data.height) then
|
||||
local formattedFirstName = formatName(data.firstname)
|
||||
local formattedLastName = formatName(data.lastname)
|
||||
local formattedDate = formatDate(data.dateofbirth)
|
||||
|
||||
playerIdentity[xPlayer.identifier] = {
|
||||
firstName = formattedFirstName,
|
||||
lastName = formattedLastName,
|
||||
dateOfBirth = formattedDate,
|
||||
sex = data.sex,
|
||||
height = data.height
|
||||
}
|
||||
|
||||
local currentIdentity = playerIdentity[xPlayer.identifier]
|
||||
|
||||
xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
|
||||
xPlayer.set('firstName', currentIdentity.firstName)
|
||||
xPlayer.set('lastName', currentIdentity.lastName)
|
||||
xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
|
||||
xPlayer.set('sex', currentIdentity.sex)
|
||||
xPlayer.set('height', currentIdentity.height)
|
||||
TriggerClientEvent('esx_identity:setPlayerData', xPlayer.source, currentIdentity)
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
alreadyRegistered[xPlayer.identifier] = true
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
cb(true)
|
||||
else
|
||||
xPlayer.showNotification(TranslateCap('invalid_height_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
xPlayer.showNotification(TranslateCap('invalid_dob_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
xPlayer.showNotification(TranslateCap('invalid_sex_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
xPlayer.showNotification(TranslateCap('invalid_lastname_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
xPlayer.showNotification(TranslateCap('invalid_firstname_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
if alreadyRegistered[xPlayer.identifier] then
|
||||
xPlayer.showNotification(TranslateCap('already_registered'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
if multichar then
|
||||
if checkNameFormat(data.firstname) then
|
||||
if checkNameFormat(data.lastname) then
|
||||
if checkSexFormat(data.sex) then
|
||||
if checkDOBFormat(data.dateofbirth) then
|
||||
local formattedFirstName = formatName(data.firstname)
|
||||
local formattedLastName = formatName(data.lastname)
|
||||
local formattedDate = formatDate(data.dateofbirth)
|
||||
|
||||
data.firstname = formattedFirstName
|
||||
data.lastname = formattedLastName
|
||||
data.dateofbirth = formattedDate
|
||||
if checkHeightFormat(data.height) then
|
||||
local Identity= {
|
||||
firstName = formattedFirstName,
|
||||
lastName = formattedLastName,
|
||||
dateOfBirth = formattedDate,
|
||||
sex = data.sex,
|
||||
height = data.height
|
||||
}
|
||||
TriggerEvent('esx_identity:completedRegistration', source, data)
|
||||
TriggerClientEvent('esx_identity:setPlayerData', source, Identity)
|
||||
cb(true)
|
||||
else
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_height_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_dob_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_sex_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_lastname_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_firstname_format'), "error")
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('data_incorrect'), "error")
|
||||
cb(false)
|
||||
end
|
||||
end
|
||||
return cb(false)
|
||||
end
|
||||
|
||||
playerIdentity[xPlayer.identifier] = {
|
||||
firstName = formatName(data.firstname),
|
||||
lastName = formatName(data.lastname),
|
||||
dateOfBirth = formatDate(data.dateofbirth),
|
||||
sex = data.sex,
|
||||
height = data.height
|
||||
}
|
||||
|
||||
local currentIdentity = playerIdentity[xPlayer.identifier]
|
||||
|
||||
xPlayer.setName(('%s %s'):format(currentIdentity.firstName, currentIdentity.lastName))
|
||||
xPlayer.set('firstName', currentIdentity.firstName)
|
||||
xPlayer.set('lastName', currentIdentity.lastName)
|
||||
xPlayer.set('dateofbirth', currentIdentity.dateOfBirth)
|
||||
xPlayer.set('sex', currentIdentity.sex)
|
||||
xPlayer.set('height', currentIdentity.height)
|
||||
TriggerClientEvent('esx_identity:setPlayerData', xPlayer.source, currentIdentity)
|
||||
saveIdentityToDatabase(xPlayer.identifier, currentIdentity)
|
||||
alreadyRegistered[xPlayer.identifier] = true
|
||||
playerIdentity[xPlayer.identifier] = nil
|
||||
return cb(true)
|
||||
end
|
||||
|
||||
if not multichar then
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('data_incorrect'), "error")
|
||||
return cb(false)
|
||||
end
|
||||
|
||||
local formattedFirstName = formatName(data.firstname)
|
||||
local formattedLastName = formatName(data.lastname)
|
||||
local formattedDate = formatDate(data.dateofbirth)
|
||||
|
||||
data.firstname = formattedFirstName
|
||||
data.lastname = formattedLastName
|
||||
data.dateofbirth = formattedDate
|
||||
local Identity = {
|
||||
firstName = formattedFirstName,
|
||||
lastName = formattedLastName,
|
||||
dateOfBirth = formattedDate,
|
||||
sex = data.sex,
|
||||
height = data.height
|
||||
}
|
||||
|
||||
TriggerEvent('esx_identity:completedRegistration', source, data)
|
||||
TriggerClientEvent('esx_identity:setPlayerData', source, Identity)
|
||||
cb(true)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@ if ESX.GetConfig().Multichar then
|
||||
if Characters[index] then
|
||||
local skin = Characters[index].skin or Config.Default
|
||||
if not Characters[index].model then
|
||||
if Characters[index].sex == _('female') then skin.sex = 1 else skin.sex = 0 end
|
||||
if Characters[index].sex == TranslateCap('female') then skin.sex = 1 else skin.sex = 0 end
|
||||
end
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
end
|
||||
@@ -142,14 +142,14 @@ if ESX.GetConfig().Multichar then
|
||||
end
|
||||
|
||||
function CharacterOptions(Characters, slots, SelectedCharacter)
|
||||
local elements = {{title = "Character: ".. Characters[SelectedCharacter.value].firstname .. " ".. Characters[SelectedCharacter.value].lastname,icon = "fa-regular fa-user", unselectable = true},
|
||||
{title = "Return", unselectable = false,icon = "fa-solid fa-arrow-left",description ="Return To Character Selection.", action = "return"}}
|
||||
local elements = {{title = TranslateCap('character', Characters[SelectedCharacter.value].firstname .. " ".. Characters[SelectedCharacter.value].lastname),icon = "fa-regular fa-user", unselectable = true},
|
||||
{title = TranslateCap('return'), unselectable = false,icon = "fa-solid fa-arrow-left",description = TranslateCap('return_description'), action = "return"}}
|
||||
if not Characters[SelectedCharacter.value].disabled then
|
||||
elements[3] = {title = _('char_play'), description ="Continue Into The City.", icon ="fa-solid fa-play",action = 'play', value = SelectedCharacter.value}
|
||||
elements[3] = {title = TranslateCap('char_play'), description = TranslateCap('char_play_description'), icon ="fa-solid fa-play",action = 'play', value = SelectedCharacter.value}
|
||||
else
|
||||
elements[3] = {title = _('char_disabled'), value = SelectedCharacter.value, icon ="fa-solid fa-xmark", description ="This Character Is Unusable.",}
|
||||
elements[3] = {title = TranslateCap('char_disabled'), value = SelectedCharacter.value, icon ="fa-solid fa-xmark", description = TranslateCap('char_disabled_description'),}
|
||||
end
|
||||
if Config.CanDelete then elements[4] = {title = _('char_delete'),icon ="fa-solid fa-xmark",description ="Permanently Remove This Character.", action = 'delete', value = SelectedCharacter.value} end
|
||||
if Config.CanDelete then elements[4] = {title = TranslateCap('char_delete'),icon ="fa-solid fa-xmark",description = TranslateCap('char_delete_description'), action = 'delete', value = SelectedCharacter.value} end
|
||||
ESX.OpenContext("left", elements, function(element, Action)
|
||||
if Action.action == "play" then
|
||||
SendNUIMessage({
|
||||
@@ -169,7 +169,7 @@ if ESX.GetConfig().Multichar then
|
||||
|
||||
function SelectCharacterMenu(Characters, slots)
|
||||
local Character = next(Characters)
|
||||
local elements = {{title = "Select A Character." , icon = "fa-solid fa-users", description = "Select a character to play as." , unselectable = true}}
|
||||
local elements = {{title = TranslateCap('select_char') , icon = "fa-solid fa-users", description = TranslateCap('select_char_description') , unselectable = true}}
|
||||
for k,v in pairs(Characters) do
|
||||
if not v.model and v.skin then
|
||||
if v.skin.model then v.model = v.skin.model elseif v.skin.sex == 1 then v.model = mp_f_freemode_01 else v.model = mp_m_freemode_01 end
|
||||
@@ -183,7 +183,7 @@ if ESX.GetConfig().Multichar then
|
||||
end
|
||||
end
|
||||
if #elements - 1 < slots then
|
||||
elements[#elements+1] = {title = _('create_char'), icon = "fa-solid fa-plus", value = (#elements+1), new = true}
|
||||
elements[#elements+1] = {title = TranslateCap('create_char'), icon = "fa-solid fa-plus", value = (#elements+1), new = true}
|
||||
end
|
||||
|
||||
ESX.OpenContext("left", elements, function(menu, SelectedCharacter)
|
||||
|
||||
@@ -1,25 +1,29 @@
|
||||
Locales['cs'] = {
|
||||
['male'] = "Muž",
|
||||
['female'] = "Žena",
|
||||
['delete_label'] = "Vymazat %s %s?",
|
||||
["male"] = "Muž",
|
||||
["female"] = "Žena",
|
||||
['select_char'] = "Zvolit Postavu",
|
||||
["select_char_description"] = "Zvol si postavu za kterou budeš hrát.",
|
||||
['create_char'] = "Vytvořit Novou Postavu",
|
||||
['char_play'] = "Hrát za postavu",
|
||||
["char_play_description"] = "Pokračovat do města.",
|
||||
['char_disabled'] = "Tato postava je zakázána!",
|
||||
["char_disabled_description"] = "Tuto postavu nemůžeš používat.",
|
||||
['char_delete'] = "Vymazat postavu",
|
||||
['cancel'] = "Zrušit",
|
||||
['confirm'] = "Potvrdit",
|
||||
['command_setslots'] = "Nastavit slot pro hráče v multicharacteru",
|
||||
['command_remslots'] = "Odebrat slot pro hráče v multicharacteru",
|
||||
['command_enablechar'] = "Povolit zovlený slot hráči",
|
||||
['command_disablechar'] = "Zakázat zvolený slot pro hračé",
|
||||
["char_delete_description"] = "Na vždy smazat tuto postavu.",
|
||||
["character"] = "Postava: %s",
|
||||
["return"] = "Zpět",
|
||||
["return_description"] = "Vrátit se na vybírání postav.",
|
||||
['command_setslots'] = "Nastavit sloty pro hráče v multicharacteru",
|
||||
['command_remslots'] = "Odebrat sloty pro hráče v multicharacteru",
|
||||
['command_enablechar'] = "Povolit zvolený slot hráči",
|
||||
['command_disablechar'] = "Zakázat zvolený slot pro hrače",
|
||||
['command_charslot'] = "Číslo slotu",
|
||||
['command_identifier'] = "Identifier hráče",
|
||||
['command_slots'] = "# ze slotu",
|
||||
['slotsadd'] = "Přidal slot %s hráči %s",
|
||||
['slotsedit'] = "Nastavil si slot %s hráči %s",
|
||||
['slotsrem'] = "Odebral si slot %s",
|
||||
['charenabled'] = "Povolol si postavu #%s z %s",
|
||||
['charenabled'] = "Povolil si postavu #%s z %s",
|
||||
['chardisabled'] = "Zakázal si postavu #%s z %s",
|
||||
['charnotfound'] = "Postava #%s z %s nebyla nalezena/neexistuje",
|
||||
}
|
||||
|
||||
@@ -1,14 +1,18 @@
|
||||
Locales["en"] = {
|
||||
["male"] = "Male",
|
||||
["female"] = "Female",
|
||||
["delete_label"] = "Delete %s %s?",
|
||||
["select_char"] = "Select Character",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
["create_char"] = "New Character",
|
||||
["char_play"] = "Play",
|
||||
["char_play_description"] = "Continue Into The City.",
|
||||
["char_disabled"] = "Disabled",
|
||||
["char_disabled_description"] = "This Character Is Unusable.",
|
||||
["char_delete"] = "Delete",
|
||||
["cancel"] = "Cancel",
|
||||
["confirm"] = "Confirm",
|
||||
["char_delete_description"] = "Permanently Remove This Character.",
|
||||
["character"] = "Character: %s",
|
||||
["return"] = "Return",
|
||||
["return_description"] = "Return To Character Selection.",
|
||||
["command_setslots"] = "Set multicharacter slots number of a player",
|
||||
["command_remslots"] = "Remove multicharacter slots number of a player",
|
||||
["command_enablechar"] = "Enable a given character of a player",
|
||||
|
||||
@@ -3,6 +3,7 @@ Locales["es"] = {
|
||||
["female"] = "Mujer",
|
||||
["delete_label"] = "¿Quieres borrar a %s %s?",
|
||||
["select_char"] = "Seleccionar personaje",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
["create_char"] = "Crear nuevo personaje",
|
||||
["char_play"] = "Jugar este personaje",
|
||||
["char_disabled"] = "Este personaje está deshabilitado",
|
||||
|
||||
@@ -3,6 +3,7 @@ Locales["fr"] = {
|
||||
["female"] = "Femme",
|
||||
["delete_label"] = "Supprimer %s %s?",
|
||||
["select_char"] = "Sélectionnez un personnage",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
["create_char"] = "Créer un nouveau personnage",
|
||||
["char_play"] = "Jouer ce personnage",
|
||||
["char_disabled"] = "Ce personnage est désactivé",
|
||||
|
||||
@@ -3,6 +3,7 @@ Locales["hu"] = {
|
||||
["female"] = "Nő",
|
||||
["delete_label"] = "Törlés %s %s?",
|
||||
["select_char"] = "Karakter kiválasztása",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
["create_char"] = "Új karakter létrehozása",
|
||||
["char_play"] = "Karakter kiválasztása",
|
||||
["char_disabled"] = "Karakter le van tiltva",
|
||||
|
||||
@@ -3,6 +3,7 @@ Locales['it'] = {
|
||||
['female'] = "Femmina",
|
||||
['delete_label'] = "Cancella %s %s?",
|
||||
['select_char'] = "Seleziona Personaggio",
|
||||
["select_char_description"] = "Selezione il personaggio con cui vuoi giocare.",
|
||||
['create_char'] = "Crea un nuovo personaggio",
|
||||
['char_play'] = "Gioca questo personaggio",
|
||||
['char_disabled'] = "Questo personaggio è disabilitato",
|
||||
|
||||
@@ -3,6 +3,7 @@ Locales["nl"] = {
|
||||
["female"] = "Vrouw",
|
||||
["delete_label"] = "Verwijder %s %s?",
|
||||
["select_char"] = "Kies Karakter",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
["create_char"] = "Creeër nieuw karakter",
|
||||
["char_play"] = "Speel dit karakter",
|
||||
["char_disabled"] = "Dit karakter is niet beschikbaar",
|
||||
|
||||
@@ -3,6 +3,7 @@ Locales['pt'] = {
|
||||
['female'] = "Feminino",
|
||||
['delete_label'] = "Excluir %s %s?",
|
||||
['select_char'] = "Selecionar personagem",
|
||||
["select_char_description"] = "Select a character to play as.",
|
||||
['create_char'] = "Criar novo personagem",
|
||||
['char_play'] = "Selecionar",
|
||||
['char_disabled'] = "Este personagem está desabilitado",
|
||||
|
||||
@@ -81,7 +81,7 @@ elseif ESX.GetConfig().Multichar == true then
|
||||
dateofbirth = v.dateofbirth,
|
||||
skin = v.skin and json.decode(v.skin) or {},
|
||||
disabled = v.disabled,
|
||||
sex = v.sex == 'm' and _('male') or _('female')
|
||||
sex = v.sex == 'm' and TranslateCap('male') or TranslateCap('female')
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,30 +11,14 @@ shared_script '@es_extended/imports.lua'
|
||||
server_scripts {
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
'@es_extended/locale.lua',
|
||||
'locales/de.lua',
|
||||
'locales/br.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fi.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/sv.lua',
|
||||
'locales/pl.lua',
|
||||
'locales/es.lua',
|
||||
'locales/tr.lua',
|
||||
'locales/*.lua',
|
||||
'config.lua',
|
||||
'server/main.lua'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'locales/de.lua',
|
||||
'locales/br.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fi.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/sv.lua',
|
||||
'locales/pl.lua',
|
||||
'locales/es.lua',
|
||||
'locales/tr.lua',
|
||||
'locales/*.lua',
|
||||
'config.lua',
|
||||
'client/main.lua'
|
||||
}
|
||||
|
||||
@@ -1,16 +1,21 @@
|
||||
Debug = ESX.GetConfig().EnableDebug
|
||||
|
||||
---@param message any
|
||||
---@param type string
|
||||
local IsShowing = false
|
||||
---@param message string
|
||||
---@param Type string
|
||||
local function TextUI(message, type)
|
||||
IsShowing = true
|
||||
SendNUIMessage({
|
||||
action = 'show',
|
||||
message = message or 'ESX-TextUI',
|
||||
type = type or 'info'
|
||||
message = message and message or 'ESX-TextUI',
|
||||
type = type == 0 and "info" or type
|
||||
})
|
||||
end
|
||||
|
||||
local function HideUI()
|
||||
if not IsShowing then
|
||||
return
|
||||
end
|
||||
IsShowing = false
|
||||
SendNUIMessage({
|
||||
action = 'hide'
|
||||
})
|
||||
|
||||
@@ -3,19 +3,16 @@ local LastZone, CurrentAction, CurrentActionMsg
|
||||
local CurrentActionData = {}
|
||||
|
||||
function OpenAccessoryMenu()
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'set_unset_accessory', {
|
||||
title = TranslateCap('set_unset'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = TranslateCap('helmet'), value = 'Helmet'},
|
||||
{label = TranslateCap('ears'), value = 'Ears'},
|
||||
{label = TranslateCap('mask'), value = 'Mask'},
|
||||
{label = TranslateCap('glasses'), value = 'Glasses'}
|
||||
}}, function(data, menu)
|
||||
menu.close()
|
||||
SetUnsetAccessory(data.current.value)
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
local elements = {
|
||||
{unselectable = true, icon = "fas fa-user", title = TranslateCap('set_unset')},
|
||||
{icon = "fas fa-hat-cowboy", title = TranslateCap("helmet"), value = "Helmet"},
|
||||
{icon = "fas fa-deaf", title = TranslateCap("ears"), value = "Ears"},
|
||||
{icon = "fas fa-mask", title = TranslateCap("mask"), value = "Mask"},
|
||||
{icon = "fas fa-glasses", title = TranslateCap("glasses"), value = "Glasses"}
|
||||
}
|
||||
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
SetUnsetAccessory(element.value)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -56,24 +53,24 @@ function OpenShopMenu(accessory)
|
||||
|
||||
TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu)
|
||||
|
||||
menu.close()
|
||||
menu.close()
|
||||
local elements = {
|
||||
{unselectable = true, icon = "fas fa-check-double", title = TranslateCap('valid_purchase')},
|
||||
{icon = "fas fa-check-circle", title = TranslateCap("yes", ESX.Math.GroupDigits(Config.Price)), value = "yes"},
|
||||
{icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"}
|
||||
}
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_confirm', {
|
||||
title = TranslateCap('valid_purchase'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = TranslateCap('no'), value = 'no'},
|
||||
{label = TranslateCap('yes', ESX.Math.GroupDigits(Config.Price)), value = 'yes'}
|
||||
}}, function(data, menu)
|
||||
menu.close()
|
||||
if data.current.value == 'yes' then
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
if element.value == "yes" then
|
||||
ESX.TriggerServerCallback('esx_accessories:checkMoney', function(hasEnoughMoney)
|
||||
if hasEnoughMoney then
|
||||
ESX.CloseContext()
|
||||
TriggerServerEvent('esx_accessories:pay')
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
TriggerServerEvent('esx_accessories:save', skin, accessory)
|
||||
end)
|
||||
else
|
||||
ESX.CloseContext()
|
||||
local player = PlayerPedId()
|
||||
TriggerEvent('esx_skin:getLastSkin', function(skin)
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
@@ -90,9 +87,7 @@ function OpenShopMenu(accessory)
|
||||
ESX.ShowNotification(TranslateCap('not_enough_money'))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
if data.current.value == 'no' then
|
||||
elseif element.value == "no" then
|
||||
local player = PlayerPedId()
|
||||
TriggerEvent('esx_skin:getLastSkin', function(skin)
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
@@ -106,12 +101,13 @@ function OpenShopMenu(accessory)
|
||||
elseif accessory == "Glasses" then
|
||||
SetPedPropIndex(player, 1, -1, 0, 0)
|
||||
end
|
||||
|
||||
ESX.CloseContext()
|
||||
end
|
||||
CurrentAction = 'shop_menu'
|
||||
CurrentActionMsg = TranslateCap('press_access')
|
||||
CurrentActionData = {}
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end, function(menu)
|
||||
CurrentAction = 'shop_menu'
|
||||
CurrentActionMsg = TranslateCap('press_access')
|
||||
CurrentActionData = {}
|
||||
@@ -131,7 +127,7 @@ AddEventHandler('esx_accessories:hasEnteredMarker', function(zone)
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_accessories:hasExitedMarker', function(zone)
|
||||
ESX.UI.Menu.CloseAll()
|
||||
ESX.CloseContext()
|
||||
CurrentAction = nil
|
||||
end)
|
||||
|
||||
@@ -235,4 +231,4 @@ if Config.EnableControls then
|
||||
end)
|
||||
|
||||
RegisterKeyMapping("accessory", "Open Accessory Menu", "keyboard", "k")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
Locales ['et'] = {
|
||||
['valid_purchase'] = 'Kinnita ost?',
|
||||
['yes'] = 'Jah (<span style="color: green;">$%s</span>)',
|
||||
['no'] = 'Ei',
|
||||
['helmet'] = 'Kiiver / Müts',
|
||||
['glasses'] = 'Prillid',
|
||||
['mask'] = 'Mask',
|
||||
['ears'] = 'Kõrvarõngad',
|
||||
['shop'] = '%s Pood',
|
||||
['set_unset'] = 'Pane selga / Võta seljast',
|
||||
['not_enough_money'] = 'Sul pole piisavalt raha',
|
||||
['press_access'] = 'Vajuta [E], et avada menüü',
|
||||
['accessories_blip'] = 'Aksessuaarid',
|
||||
['no_ears'] = 'Sul pole kõrvarõngaid',
|
||||
['no_glasses'] = 'Sul pole prille',
|
||||
['no_helmet'] = 'Sul pole kiivrit',
|
||||
['no_mask'] = 'Sul pole maski',
|
||||
['you_paid'] = 'Sa maksid $%s',
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
Locales['en'] = {
|
||||
['allowlist_check'] = 'Checking you are Allowlisted.',
|
||||
['allowlist_check'] = 'Checking if you are Allowlisted.',
|
||||
['not_allowlisted'] = 'You Must be Allowlisted to join this server!',
|
||||
['allowlist_empty'] = 'There Are no allowlists saved for this server.',
|
||||
['license_missing'] = 'Error: Your Identifier is missing!',
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Locales['et'] = {
|
||||
['allowlist_check'] = 'Kontrollime, kas te olete allowlistis.',
|
||||
['not_allowlisted'] = 'Sa pead olema Allowlistis, et ühineda serveriga!',
|
||||
['allowlist_empty'] = 'Ühtegi inimest pole allowlistis.',
|
||||
['license_missing'] = 'Viga: Sul puudub identifier!',
|
||||
['help_allowlist_add'] = 'Lisa inimene allowlisti',
|
||||
['help_allowlist_load'] = 'Lae allowlist uuesti',
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
Locales['hu'] = {
|
||||
['allowlist_check'] = 'Ellenőrzi, hogy fent vagy-e az engedélyezett listára.',
|
||||
['allowlist_check'] = 'Ellenőrizzük fent vagy-e a menők listáján.',
|
||||
['not_allowlisted'] = 'Engedélyezettnek kell lenned ahhoz, hogy csatlakozz ehhez a szerverhez!',
|
||||
['allowlist_empty'] = 'Ehhez a szerverhez nincsenek mentett engedélyezési listák.',
|
||||
['license_missing'] = 'Hiba: Te Identifier-ed hiányzik!',
|
||||
['help_allowlist_add'] = 'jétékos felvéltele a allowlist-re',
|
||||
['help_allowlist_load'] = 'allowlist újratöltése',
|
||||
['allowlist_empty'] = 'Ehhez a szerverhez nincsenek mentett engedélyezési lista.',
|
||||
['license_missing'] = 'Hiba: Te azonosítód hiányzik!',
|
||||
['help_allowlist_add'] = 'játékos felvétele az engedélyezettek listájára',
|
||||
['help_allowlist_load'] = 'engedélyezési lista újratöltése',
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Locales['nl'] = {
|
||||
['allowlist_check'] = 'Je toegangspas aan het controleren.',
|
||||
['not_allowlisted'] = 'Je moet een toegangspas hebben om op deze server te spelen!',
|
||||
['allowlist_empty'] = 'Er zijn geen toegangspassen uitgegeven.',
|
||||
['license_missing'] = 'Error: Je Identifier mist!',
|
||||
['help_allowlist_add'] = 'geef iemand een toegangspas',
|
||||
['help_allowlist_load'] = 'herlaad de toegangspassen',
|
||||
}
|
||||
@@ -50,9 +50,9 @@ function OpenVehicleSpawnerMenu(type, hospital, part, partNum)
|
||||
local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model))
|
||||
local label = ('%s - <span style="color:darkgoldenrod;">%s</span>: '):format(vehicleName, props.plate)
|
||||
|
||||
if v.stored then
|
||||
if v.stored == 1 then
|
||||
label = label .. ('<span style="color:green;">%s</span>'):format(TranslateCap('garage_stored'))
|
||||
else
|
||||
elseif v.stored == 0 then
|
||||
label = label .. ('<span style="color:darkred;">%s</span>'):format(TranslateCap('garage_notstored'))
|
||||
end
|
||||
|
||||
@@ -73,7 +73,7 @@ function OpenVehicleSpawnerMenu(type, hospital, part, partNum)
|
||||
align = 'top-left',
|
||||
elements = garage
|
||||
}, function(data2, menu2)
|
||||
if data2.current.stored then
|
||||
if data2.current.stored == 1 then
|
||||
local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(hospital, part, partNum)
|
||||
|
||||
if foundSpawn then
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
Locales['et'] = {
|
||||
-- Cloakroom
|
||||
['cloakroom'] = 'Riidekapp',
|
||||
['ems_clothes_civil'] = 'Tsiviili riided',
|
||||
['ems_clothes_ems'] = 'Kiirabi riided',
|
||||
-- Vehicles
|
||||
['ambulance'] = 'Kiirabi',
|
||||
['helicopter_prompt'] = 'Vajuta [E], et avada helikopteri garaaž.',
|
||||
['garage_prompt'] = 'Vajuta [E], et vaadata sõiduki tegevusi.',
|
||||
['garage_title'] = 'Sõiduki tegevus',
|
||||
['garage_stored'] = 'Pargitud',
|
||||
['garage_notstored'] = 'Pole garaažis',
|
||||
['garage_storing'] = 'Proovime eemaldada sõidukit, veenduge, et kedagi poleks ligiduses.',
|
||||
['garage_has_stored'] = 'Sõiduk on pargitud teie garaaži',
|
||||
['garage_has_notstored'] = 'Teie ligiduses pole ühtegi teie sõidukit',
|
||||
['garage_notavailable'] = 'Teie sõiduk pole garaažis.',
|
||||
['garage_blocked'] = 'Sõiduki jaoks pole siin ruumi!',
|
||||
['garage_empty'] = 'Sul pole ühtegi sõidukit garaažis.',
|
||||
['garage_released'] = 'Teie sõiduk on juba garaažist välja võetud.',
|
||||
['garage_store_nearby'] = 'Ühtegi sõidukit pole ligiduses.',
|
||||
['garage_storeditem'] = 'Ava garaaž',
|
||||
['garage_storeitem'] = 'Pargi sõiduk garaaži',
|
||||
['garage_buyitem'] = 'Auto pood',
|
||||
['shop_item'] = '$%s',
|
||||
['vehicleshop_title'] = 'Auto pood',
|
||||
['vehicleshop_confirm'] = 'Soovid osta seda sõidukit?',
|
||||
['vehicleshop_bought'] = 'Sa ostsid %s $%s eest',
|
||||
['vehicleshop_money'] = 'Sa ei saa lubada seda sõidukit endale',
|
||||
['vehicleshop_awaiting_model'] = 'Sõidukit hetkel laetakse',
|
||||
['confirm_no'] = 'Ei',
|
||||
['confirm_yes'] = 'Jah',
|
||||
-- Action Menu
|
||||
['revive_inprogress'] = 'Elustamine pooleli!',
|
||||
['revive_complete'] = 'Sa elustasid %s',
|
||||
['revive_complete_award'] = 'Sa elustasid %s ja teenisid $%s!',
|
||||
['revive_fail_offline'] = 'Isik pole enam linnas',
|
||||
['heal_inprogress'] = 'Sa paraned!',
|
||||
['heal_complete'] = 'Sa ravisid %s',
|
||||
['no_players'] = 'Isikuid pole läheduses',
|
||||
['player_not_unconscious'] = 'See isik pole teadvuseta!',
|
||||
['player_not_conscious'] = 'See isik pole teadvusel!',
|
||||
-- Boss Menu
|
||||
['boss_actions'] = 'Boss menüü',
|
||||
-- Misc
|
||||
['invalid_amount'] = 'Vale kogus',
|
||||
['actions_prompt'] = 'Vajuta [E], et avada kiirabi tegevused.',
|
||||
['deposit_amount'] = 'Pane firmaarvele raha',
|
||||
['money_withdraw'] = 'Võta firmaarvelt raha',
|
||||
['fast_travel'] = 'press [E] to fast travel.',
|
||||
['open_pharmacy'] = 'Vajuta [E], et avada apteek.',
|
||||
['pharmacy_menu_title'] = 'Apteek',
|
||||
['pharmacy_take'] = 'Võta <span style="color:blue;">%s</span>',
|
||||
['medikit'] = 'Esmaabikarp',
|
||||
['bandage'] = 'Sidemed',
|
||||
['max_item'] = 'Sa kannad piisavalt juba.',
|
||||
-- F6 Menu
|
||||
['ems_menu'] = 'Kiirabi',
|
||||
['ems_menu_title'] = 'Kiirabi',
|
||||
['ems_menu_revive'] = 'Elusta isikut',
|
||||
['ems_menu_putincar'] = 'Pane sõidukisse',
|
||||
['ems_menu_small'] = 'Ravi väikseid haavi',
|
||||
['ems_menu_big'] = 'Ravi tõsiseid haavu',
|
||||
['ems_menu_search'] = 'Patsienti ei leitud',
|
||||
-- Phone
|
||||
['alert_ambulance'] = 'Kiirabi teadaanded',
|
||||
-- Death
|
||||
['respawn_available_in'] = 'Sul on võimalik haiglas ärgata %s minuti ka %s sekundi pärast',
|
||||
['respawn_bleedout_in'] = 'Sa jooksed verest tühjak %s minuti ja %s sekundi pärast\n',
|
||||
['respawn_bleedout_prompt'] = 'Hoia [E] tähte all, et ärgata haiglas',
|
||||
['respawn_bleedout_fine'] = 'Hoia [E] tähte all, et ärgata haiglas $%s eest',
|
||||
['respawn_bleedout_fine_msg'] = 'Sa maksid $%s, et ärgata haiglas.',
|
||||
['distress_send'] = 'Vajuta [G] et saata abikutse kiirabile',
|
||||
['distress_sent'] = 'Abikutse on saadetud kõikidele kiirabidele kes on linnas!',
|
||||
-- Revive
|
||||
['revive_help'] = 'Elusta isikut',
|
||||
-- Item
|
||||
['used_medikit'] = 'Sa kasutasid ära 1x esmaabikarbi',
|
||||
['used_bandage'] = 'Sa kasutasid ära 1x sideme',
|
||||
['not_enough_medikit'] = 'Sul pole esmaabikarpe.',
|
||||
['not_enough_bandage'] = 'Sul pole sidemeid.',
|
||||
['healed'] = 'Teid on ravitud.',
|
||||
-- Blips
|
||||
['blip_hospital'] = 'Haigla',
|
||||
['blip_dead'] = 'Vigastatud isik',
|
||||
}
|
||||
@@ -18,20 +18,20 @@ function startScenario(anim)
|
||||
end
|
||||
|
||||
function OpenAnimationsMenu()
|
||||
local elements = {}
|
||||
local elements = {
|
||||
{unselectable = true, icon = "fas fa-smile", title = "Animations"}
|
||||
}
|
||||
|
||||
for i=1, #Config.Animations, 1 do
|
||||
table.insert(elements, {label = Config.Animations[i].label, value = Config.Animations[i].name})
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-smile",
|
||||
title = Config.Animations[i].label,
|
||||
value = Config.Animations[i].name
|
||||
}
|
||||
end
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'animations', {
|
||||
title = 'Animations',
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
}, function(data, menu)
|
||||
OpenAnimationsSubMenu(data.current.value)
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
OpenAnimationsSubMenu(element.value)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -40,30 +40,29 @@ function OpenAnimationsSubMenu(menu)
|
||||
local elements = {}
|
||||
|
||||
for i=1, #Config.Animations, 1 do
|
||||
elements = {
|
||||
{unselectable = true, icon = "fas fa-smile", title = Config.Animations[i].label}
|
||||
}
|
||||
|
||||
if Config.Animations[i].name == menu then
|
||||
title = Config.Animations[i].label
|
||||
|
||||
for j=1, #Config.Animations[i].items, 1 do
|
||||
table.insert(elements, {
|
||||
label = Config.Animations[i].items[j].label,
|
||||
type = Config.Animations[i].items[j].type,
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-smile",
|
||||
title = Config.Animations[i].items[j].label,
|
||||
type = Config.Animations[i].items[j].type,
|
||||
value = Config.Animations[i].items[j].data
|
||||
})
|
||||
}
|
||||
end
|
||||
|
||||
break
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'animations_sub', {
|
||||
title = title,
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
}, function(data, menu)
|
||||
local type = data.current.type
|
||||
local lib = data.current.value.lib
|
||||
local anim = data.current.value.anim
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
local type = element.type
|
||||
local lib = element.value.lib
|
||||
local anim = element.value.anim
|
||||
|
||||
if type == 'scenario' then
|
||||
startScenario(anim)
|
||||
@@ -72,8 +71,6 @@ function OpenAnimationsSubMenu(menu)
|
||||
elseif type == 'anim' then
|
||||
startAnim(lib, anim)
|
||||
end
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
Config = {}
|
||||
|
||||
Config.Animations = {
|
||||
|
||||
{
|
||||
name = 'festives',
|
||||
label = 'Feestelijk',
|
||||
items = {
|
||||
{label = "Roken", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}},
|
||||
{label = "Muzikant", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}},
|
||||
{label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}},
|
||||
{label = "Koffie", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}},
|
||||
{label = "Bier", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}},
|
||||
{label = "Lucht Gitaar", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}},
|
||||
{label = "Lucht Shagging", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}},
|
||||
{label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}},
|
||||
-- {label = "Fumer un joint", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}},
|
||||
{label = "Dronken houding", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}},
|
||||
{label = "Overgevem", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}},
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name = 'greetings',
|
||||
label = 'Ontmoetingen',
|
||||
items = {
|
||||
{label = "Hallo", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}},
|
||||
{label = "Zwaai", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}},
|
||||
{label = "Schud hand", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}},
|
||||
{label = "Knuffel", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}},
|
||||
{label = "Saluteer", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}},
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name = 'work',
|
||||
label = 'Werkzaamheden',
|
||||
items = {
|
||||
{label = "Verdachte : Geef over", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}},
|
||||
{label = "Vissen", type = "scenario", data = {anim = "world_human_stand_fishing"}},
|
||||
{label = "Politie : Onderzoek", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}},
|
||||
{label = "Politie : Gebruik radio", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}},
|
||||
{label = "Politie : Verkeer", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}},
|
||||
{label = "Politie : Verrekijker", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}},
|
||||
{label = "Boer : Planten", type = "scenario", data = {anim = "world_human_gardener_plant"}},
|
||||
{label = "Monteur : Repareer motor", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}},
|
||||
{label = "Arts : Kniel", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}},
|
||||
{label = "Taxi : Praat met klant", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}},
|
||||
{label = "Taxi : Geef factuur", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}},
|
||||
{label = "Cashier : Geef", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}},
|
||||
{label = "Barman : Geef een shot", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}},
|
||||
{label = "Journalist : Neem fotos", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}},
|
||||
{label = "Klembord", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}},
|
||||
{label = "Hamer", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}},
|
||||
{label = "Zwerver : Houd bord vast", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}},
|
||||
{label = "Zwerver : Menselijk beeld", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}},
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name = 'humors',
|
||||
label = 'Humor',
|
||||
items = {
|
||||
{label = "Juichen", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}},
|
||||
{label = "Super", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}},
|
||||
{label = "Wijs", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}},
|
||||
{label = "Kom hier", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}},
|
||||
{label = "Kom maar op", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}},
|
||||
{label = "Ik", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}},
|
||||
{label = "Ik wist het", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}},
|
||||
{label = "Uitgeput", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}},
|
||||
{label = "Ik ben de shit", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}},
|
||||
{label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}},
|
||||
{label = "Doe rustig", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}},
|
||||
{label = "Wat heb ik gedaan?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}},
|
||||
{label = "Bang", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}},
|
||||
{label = "Vechten?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}},
|
||||
{label = "Dat is onmogelijk!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}},
|
||||
{label = "Omhels", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}},
|
||||
{label = "Middelvinger", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}},
|
||||
{label = "Jij rukker", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}},
|
||||
{label = "Doodsbedreiging", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}},
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name = 'sports',
|
||||
label = 'Sport',
|
||||
items = {
|
||||
{label = "Flex spieren", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}},
|
||||
{label = "Gewichten heffen", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}},
|
||||
{label = "Push ups", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}},
|
||||
{label = "Sit ups", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}},
|
||||
{label = "Yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}},
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name = 'misc',
|
||||
label = 'Diverse',
|
||||
items = {
|
||||
{label = "Drink koffie", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}},
|
||||
{label = "Zit", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}},
|
||||
{label = "Leun tegen muur", type = "scenario", data = {anim = "world_human_leaning"}},
|
||||
{label = "Op je buik zonnen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}},
|
||||
{label = "Op je rug zonnen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}},
|
||||
{label = "Maak schoon", type = "scenario", data = {anim = "world_human_maid_clean"}},
|
||||
{label = "Barbeque", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}},
|
||||
{label = "Zoek", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}},
|
||||
{label = "Neem selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}},
|
||||
{label = "Luister aan muur/deur", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}},
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name = 'attitudem',
|
||||
label = 'Loop stijlen',
|
||||
items = {
|
||||
{label = "Normaal M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}},
|
||||
{label = "Normaal V", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}},
|
||||
{label = "Depressieve man", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}},
|
||||
{label = "Depressieve vrouw", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}},
|
||||
{label = "Zakelijk", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}},
|
||||
{label = "Vastberaden", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}},
|
||||
{label = "Normaal", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}},
|
||||
{label = "Te veel gegeten", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}},
|
||||
{label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}},
|
||||
{label = "Gewond", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}},
|
||||
{label = "In een haast", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}},
|
||||
{label = "Zwerver", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}},
|
||||
{label = "Verdrietig", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}},
|
||||
{label = "Patser", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}},
|
||||
{label = "Geschokkeerd", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}},
|
||||
{label = "Verdacht", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}},
|
||||
{label = "Gespannen", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}},
|
||||
{label = "Haast", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}},
|
||||
{label = "Trots", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}},
|
||||
{label = "Korte race", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}},
|
||||
{label = "Mannen verslinder", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}},
|
||||
{label = "Onbeschaamd", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}},
|
||||
{label = "Arrogant", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}},
|
||||
}
|
||||
},
|
||||
{
|
||||
name = 'porn',
|
||||
label = 'NSFW',
|
||||
items = {
|
||||
{label = "Man krijgt in de auto", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}},
|
||||
{label = "Vrouw geeft in de auto", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}},
|
||||
{label = "Man onder op in de auto", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}},
|
||||
{label = "Vrouw boven op in de auto", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}},
|
||||
{label = "Krab balzak", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}},
|
||||
{label = "Prostituée 1", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}},
|
||||
{label = "Prostituée 2", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}},
|
||||
{label = "Prostituée 3", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}},
|
||||
{label = "Strip Tease 1", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}},
|
||||
{label = "Strip Tease 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}},
|
||||
{label = "Stip Tease op knieën", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}},
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
@@ -12,53 +12,35 @@ end)
|
||||
|
||||
function OpenBankActionsMenu()
|
||||
local elements = {
|
||||
{label = TranslateCap('customers'), value = 'customers'},
|
||||
{label = TranslateCap('billing'), value = 'billing'}
|
||||
{unselectable = true, icon = "fas fa-bank", title = TranslateCap("bank")},
|
||||
{icon = "fas fa-users", title = TranslateCap("customers"), value = "customers"},
|
||||
{icon = "fas fa-scroll", title = TranslateCap("billing"), value = "billing"}
|
||||
}
|
||||
|
||||
if ESX.PlayerData.job.grade_name == 'boss' then
|
||||
table.insert(elements, { label = TranslateCap('boss_actions'), value = 'boss_actions' })
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-wallet",
|
||||
title = TranslateCap("boss_actions"),
|
||||
value = "boss_actions"
|
||||
}
|
||||
end
|
||||
|
||||
ESX.UI.Menu.CloseAll()
|
||||
ESX.CloseContext()
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'bank_actions', {
|
||||
title = TranslateCap('bank'),
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
}, function(data, menu)
|
||||
if data.current.value == 'customers' then
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
if element.value == "customers" then
|
||||
OpenCustomersMenu()
|
||||
elseif data.current.value == 'billing' then
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'billing', {
|
||||
title = TranslateCap('bill_amount')
|
||||
}, function(data, menu)
|
||||
local amount = tonumber(data.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(TranslateCap('invalid_amount'))
|
||||
else
|
||||
menu.close()
|
||||
|
||||
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
|
||||
|
||||
if closestPlayer == -1 or closestDistance > 5.0 then
|
||||
ESX.ShowNotification(TranslateCap('no_player_nearby'))
|
||||
else
|
||||
TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_banker', 'Banque', amount)
|
||||
end
|
||||
end
|
||||
end, function(data, menu)
|
||||
elseif element.value == "billing" then
|
||||
CreateBillingDialog()
|
||||
elseif element.value == "boss_actions" then
|
||||
TriggerEvent('esx_society:openBossMenu', 'banker', function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
elseif data.current.value == 'boss_actions' then
|
||||
TriggerEvent('esx_society:openBossMenu', 'banker', function (data, menu)
|
||||
menu.close()
|
||||
end, {wash = false})
|
||||
CurrentAction = 'bank_actions_menu'
|
||||
CurrentActionMsg = TranslateCap('press_input_context_to_open_menu')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
|
||||
end, function(menu)
|
||||
CurrentAction = 'bank_actions_menu'
|
||||
CurrentActionMsg = TranslateCap('press_input_context_to_open_menu')
|
||||
CurrentActionData = {}
|
||||
@@ -68,69 +50,101 @@ end
|
||||
function OpenCustomersMenu()
|
||||
ESX.TriggerServerCallback('esx_bankerjob:getCustomers', function(customers)
|
||||
local elements = {
|
||||
head = { TranslateCap('customer'), TranslateCap('balance'), TranslateCap('actions') },
|
||||
rows = {}
|
||||
{unselectable = true, icon = "fas fa-users", title = TranslateCap('customer')}
|
||||
}
|
||||
|
||||
for i=1, #customers do
|
||||
table.insert(elements.rows, {
|
||||
data = customers[i],
|
||||
cols = {
|
||||
customers[i].name,
|
||||
customers[i].bankSavings,
|
||||
'{{' .. TranslateCap('deposit') .. '|deposit}} {{' .. TranslateCap('withdraw') .. '|withdraw}}'
|
||||
}
|
||||
})
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-user",
|
||||
title = customers[i].name,
|
||||
bankSavings = customers[i].bankSavings,
|
||||
data = customers[i]
|
||||
}
|
||||
end
|
||||
|
||||
ESX.UI.Menu.Open('list', GetCurrentResourceName(), 'customers', elements, function(data, menu)
|
||||
local customer = data.data
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
local elements2 = {
|
||||
{unselectable = true, icon = "fas fa-user", title = element.title},
|
||||
{unselectable = true, icon = "fas fa-wallet", title = "$"..ESX.Math.GroupDigits(element.bankSavings)},
|
||||
{icon = "fas fa-wallet", title = TranslateCap('deposit'), value = "deposit"},
|
||||
{icon = "fas fa-wallet", title = TranslateCap('withdraw'), value = "withdraw"},
|
||||
}
|
||||
ESX.OpenContext("right", elements2, function(menu2,element2)
|
||||
local customer = element.data
|
||||
if element2.value == "deposit" then
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'customer_deposit_amount', {
|
||||
title = TranslateCap('amount')
|
||||
}, function(data2, menu2)
|
||||
local amount = tonumber(data2.value)
|
||||
|
||||
if data.value == 'deposit' then
|
||||
menu.close()
|
||||
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'customer_deposit_amount', {
|
||||
title = TranslateCap('amount')
|
||||
}, function(data2, menu2)
|
||||
local amount = tonumber(data2.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(TranslateCap('invalid_amount'))
|
||||
else
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(TranslateCap('invalid_amount'))
|
||||
else
|
||||
menu2.close()
|
||||
TriggerServerEvent('esx_bankerjob:customerDeposit', customer.source, amount)
|
||||
ESX.ShowNotification("You have deposited $"..amount.." into "..element.title.."s account.")
|
||||
OpenCustomersMenu()
|
||||
end
|
||||
end, function(data2, menu2)
|
||||
menu2.close()
|
||||
TriggerServerEvent('esx_bankerjob:customerDeposit', customer.source, amount)
|
||||
OpenCustomersMenu()
|
||||
end
|
||||
end, function(data2, menu2)
|
||||
menu2.close()
|
||||
OpenCustomersMenu()
|
||||
end)
|
||||
elseif data.value == 'withdraw' then
|
||||
menu.close()
|
||||
end)
|
||||
elseif element2.value == "withdraw" then
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'customer_withdraw_amount', {
|
||||
title = TranslateCap('amount')
|
||||
}, function(data2, menu2)
|
||||
local amount = tonumber(data2.value)
|
||||
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'customer_withdraw_amount', {
|
||||
title = TranslateCap('amount')
|
||||
}, function(data2, menu2)
|
||||
local amount = tonumber(data2.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(TranslateCap('invalid_amount'))
|
||||
else
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(TranslateCap('invalid_amount'))
|
||||
else
|
||||
menu2.close()
|
||||
TriggerServerEvent('esx_bankerjob:customerWithdraw', customer.source, amount)
|
||||
ESX.ShowNotification("You have withdrawn $"..amount.." from "..element.title.."s account.")
|
||||
OpenCustomersMenu()
|
||||
end
|
||||
end, function(data2, menu2)
|
||||
menu2.close()
|
||||
TriggerServerEvent('esx_bankerjob:customerWithdraw', customer.source, amount)
|
||||
OpenCustomersMenu()
|
||||
end
|
||||
end, function(data2, menu2)
|
||||
menu2.close()
|
||||
OpenCustomersMenu()
|
||||
end)
|
||||
end
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
end
|
||||
end, function(menu)
|
||||
CurrentAction = 'bank_actions_menu'
|
||||
CurrentActionMsg = TranslateCap('press_input_context_to_open_menu')
|
||||
CurrentActionData = {}
|
||||
end)
|
||||
end, function(menu)
|
||||
CurrentAction = 'bank_actions_menu'
|
||||
CurrentActionMsg = TranslateCap('press_input_context_to_open_menu')
|
||||
CurrentActionData = {}
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
function CreateBillingDialog()
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'billing', {
|
||||
title = TranslateCap('bill_amount')
|
||||
}, function(data, menu)
|
||||
local amount = tonumber(data.value)
|
||||
|
||||
if amount == nil then
|
||||
ESX.ShowNotification(TranslateCap('invalid_amount'))
|
||||
else
|
||||
menu.close()
|
||||
|
||||
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
|
||||
|
||||
if closestPlayer == -1 or closestDistance > 5.0 then
|
||||
ESX.ShowNotification(TranslateCap('no_player_nearby'))
|
||||
else
|
||||
TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_banker', 'Bank', amount)
|
||||
end
|
||||
end
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
end
|
||||
|
||||
AddEventHandler('esx_bankerjob:hasEnteredMarker', function (zone)
|
||||
if zone == 'BankActions' and ESX.PlayerData.job and ESX.PlayerData.job.name == 'banker' then
|
||||
CurrentAction = 'bank_actions_menu'
|
||||
@@ -141,7 +155,7 @@ end)
|
||||
|
||||
AddEventHandler('esx_bankerjob:hasExitedMarker', function (zone)
|
||||
CurrentAction = nil
|
||||
ESX.UI.Menu.CloseAll()
|
||||
ESX.CloseContext()
|
||||
end)
|
||||
|
||||
-- Create Blips
|
||||
@@ -228,4 +242,4 @@ AddEventHandler('esx_phone:loaded', function (phoneNumber, contacts)
|
||||
}
|
||||
|
||||
TriggerEvent('esx_phone:addSpecialContact', specialContact.name, specialContact.number, specialContact.base64Icon)
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
Locales['et'] = {
|
||||
['actions'] = 'Tegevused',
|
||||
['amount'] = 'Kogus',
|
||||
['balance'] = 'Saldo',
|
||||
['bank'] = 'Pank',
|
||||
['bill_amount'] = 'Arve suurus',
|
||||
['billing'] = 'Arve',
|
||||
['customer'] = 'Klient',
|
||||
['customers'] = 'Kliendid',
|
||||
['deposit'] = 'Sisesta',
|
||||
['invalid_amount'] = 'Vale kogus',
|
||||
['no_player_nearby'] = 'Ühtegi isikut pole ligidal',
|
||||
['press_input_context_to_open_menu'] = 'Vajuta [E], et avada panga menüü.',
|
||||
['withdraw'] = 'Võta välja',
|
||||
['boss_actions'] = 'Bossi tegevused',
|
||||
['phone_receive'] = 'Panga klient',
|
||||
['phone_label'] = 'Pank',
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
INSERT INTO `addon_account` (name, label, shared) VALUES
|
||||
('society_banker','Bank',1),
|
||||
('bank_savings','Spaarrekening',0)
|
||||
;
|
||||
|
||||
INSERT INTO `jobs` (name, label) VALUES
|
||||
('banker','Bankier')
|
||||
;
|
||||
|
||||
INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
|
||||
('banker',0,'advisor','Adviseur',10,'{}','{}'),
|
||||
('banker',1,'banker','Bankoer',20,'{}','{}'),
|
||||
('banker',2,'business_banker','Bedrijfs Bankier',30,'{}','{}'),
|
||||
('banker',3,'trader','Stocktrader',40,'{}','{}'),
|
||||
('banker',4,'boss','Hoofd Bankier',0,'{}','{}')
|
||||
;
|
||||
@@ -29,6 +29,17 @@ ensure esx_banking
|
||||
Run the banking.sql into your database. Done.
|
||||
```
|
||||
|
||||
# If you want to create a bank log in another script, you can do it this way! Only server side!
|
||||
```
|
||||
exports["esx_banking"]:logTransaction(source,logType,amount)
|
||||
|
||||
- First param: source - player source
|
||||
- Second param: logType - WITHDRAW,DEPOSIT,TRANSFER_RECEIVE you can only use these log types!
|
||||
- Third param: amount - The amount to be logged
|
||||
|
||||
For example: exports["esx_banking"]:logTransaction(source,"WITHDRAW",200)
|
||||
```
|
||||
|
||||
# Legal
|
||||
### License
|
||||
esx_banking - banking script for ESX
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
local PlayerData, ActivateBlips, Peds = {}, {}, {}
|
||||
local ActivateBlips = {}
|
||||
local PlayerLoaded = true
|
||||
local isInMarker, isInAtmMarker, isInMenu, isMarkerShowed = false, false, false, false
|
||||
local _GetEntityCoords, _PlayerPedId
|
||||
|
||||
-- Functions
|
||||
|
||||
-- Listen for keypress while player inside the marker
|
||||
local function Listen4Key()
|
||||
CreateThread(function()
|
||||
@@ -46,57 +47,6 @@ local function RemoveBlips()
|
||||
ActivateBlips = {}
|
||||
end
|
||||
|
||||
-- Ped Handler
|
||||
local function PedHandler(ids)
|
||||
local tmpPeds = {}
|
||||
|
||||
for _, id in pairs(ids) do
|
||||
if not Peds[id] then
|
||||
|
||||
if not HasModelLoaded(Config.Peds[id].Model) then
|
||||
RequestModel(Config.Peds[id].Model)
|
||||
Wait(100)
|
||||
while not HasModelLoaded(Config.Peds[id].Model) do
|
||||
Wait(10)
|
||||
end
|
||||
end
|
||||
|
||||
local npc = CreatePed(6, Config.Peds[id].Model, Config.Peds[id].Position + vector4(0, 0, -1, 0), false,
|
||||
false)
|
||||
TaskStartScenarioInPlace(npc, Config.Peds[id].Scenario, 0, true)
|
||||
SetEntityInvincible(npc, true)
|
||||
SetEntityProofs(npc, true, true, true, true, true, true, 1, true)
|
||||
SetBlockingOfNonTemporaryEvents(npc, true)
|
||||
FreezeEntityPosition(npc, true)
|
||||
SetPedDiesWhenInjured(npc, false)
|
||||
SetEntityCanBeDamaged(npc, false)
|
||||
SetPedCanRagdollFromPlayerImpact(npc, false)
|
||||
SetPedCanRagdoll(npc, false)
|
||||
SetEntityAsMissionEntity(npc, true, true)
|
||||
SetEntityDynamic(npc, false)
|
||||
Peds[id] = npc
|
||||
end
|
||||
end
|
||||
|
||||
for id, handle in pairs(Peds) do
|
||||
local del = true
|
||||
|
||||
for i = 1, #ids do
|
||||
|
||||
if ids[i] == id then
|
||||
del = false
|
||||
tmpPeds[id] = handle
|
||||
end
|
||||
end
|
||||
|
||||
if del then
|
||||
DeletePed(handle)
|
||||
end
|
||||
end
|
||||
|
||||
Peds = tmpPeds
|
||||
end
|
||||
|
||||
function OpenUi(atm)
|
||||
atm = atm or false
|
||||
isInMenu = true
|
||||
@@ -129,7 +79,7 @@ function OpenUi(atm)
|
||||
end
|
||||
|
||||
local function CloseUi()
|
||||
SetNuiFocus(false)
|
||||
SetNuiFocus(false, false)
|
||||
isInMenu = false
|
||||
SendNUIMessage({
|
||||
showMenu = false
|
||||
@@ -144,8 +94,7 @@ end
|
||||
local function ShowMarker(coord)
|
||||
CreateThread(function()
|
||||
while isMarkerShowed do
|
||||
DrawMarker(20, coord.x, coord.y, coord.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.2, 187, 255, 0, 255,
|
||||
false, true, 2, nil, nil, false)
|
||||
DrawMarker(20, coord.x, coord.y, coord.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.2, 187, 255, 0, 255, false, true, 2, false, nil, nil, false)
|
||||
Wait(0)
|
||||
end
|
||||
end)
|
||||
@@ -159,24 +108,11 @@ local function StartThread()
|
||||
_PlayerPedId = PlayerPedId()
|
||||
_GetEntityCoords = GetEntityCoords(_PlayerPedId)
|
||||
|
||||
if Config.EnablePeds then
|
||||
local closestPed = {}
|
||||
|
||||
for i = 1, #Config.Peds do
|
||||
local distance = #(_GetEntityCoords - Config.Peds[i].Position.xyz)
|
||||
if distance <= Config.DrawMarker then
|
||||
closestPed[#closestPed + 1] = i
|
||||
end
|
||||
end
|
||||
|
||||
PedHandler(closestPed)
|
||||
end
|
||||
|
||||
if not isInMenu and IsPedOnFoot(PlayerPedId()) then
|
||||
if IsPedOnFoot(PlayerPedId()) then
|
||||
local closestBank = {}
|
||||
|
||||
for i = 1, #Config.AtmModels do
|
||||
local atm = GetClosestObjectOfType(_GetEntityCoords, 3.0, Config.AtmModels[i], false)
|
||||
local atm = GetClosestObjectOfType(_GetEntityCoords, 8.0, Config.AtmModels[i], false)
|
||||
if atm ~= 0 then
|
||||
local atmOffset = GetOffsetFromEntityInWorldCoords(atm, 0.0, -0.7, 0.0)
|
||||
local atmHeading = GetEntityHeading(atm)
|
||||
@@ -261,6 +197,21 @@ RegisterNetEvent('esx_banking:closebanking', function()
|
||||
CloseUi()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_banking:PedHandler', function(netIdTable)
|
||||
local npc
|
||||
for i = 1, #netIdTable do
|
||||
npc = NetworkGetEntityFromNetworkId(netIdTable[i])
|
||||
TaskStartScenarioInPlace(npc, Config.Peds[i].Scenario, 0, true)
|
||||
SetEntityProofs(npc, true, true, true, true, true, true, true, true)
|
||||
SetBlockingOfNonTemporaryEvents(npc, true)
|
||||
FreezeEntityPosition(npc, true)
|
||||
SetPedCanRagdollFromPlayerImpact(npc, false)
|
||||
SetPedCanRagdoll(npc, false)
|
||||
SetEntityAsMissionEntity(npc, true, true)
|
||||
SetEntityDynamic(npc, false)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_banking:updateMoneyInUI')
|
||||
AddEventHandler('esx_banking:updateMoneyInUI', function(doingType, bankMoney, money)
|
||||
SendNUIMessage({
|
||||
@@ -275,23 +226,20 @@ end)
|
||||
|
||||
-- Resource starting
|
||||
AddEventHandler('onResourceStart', function(resource)
|
||||
if resource ~= GetCurrentResourceName() then
|
||||
return
|
||||
end
|
||||
if resource ~= GetCurrentResourceName() then return end
|
||||
StartThread()
|
||||
end)
|
||||
|
||||
-- Enables it on player loaded
|
||||
RegisterNetEvent('esx:playerLoaded', function()
|
||||
StartThread()
|
||||
end)
|
||||
end)
|
||||
|
||||
-- Resource stopping
|
||||
AddEventHandler('onResourceStop', function(resource)
|
||||
if resource ~= GetCurrentResourceName() then
|
||||
return
|
||||
end
|
||||
if resource ~= GetCurrentResourceName() then return end
|
||||
RemoveBlips()
|
||||
if isInMenu then
|
||||
CloseUi()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
@@ -1,8 +1,8 @@
|
||||
Config = {
|
||||
Debug = false,
|
||||
DrawMarker = 10,
|
||||
Locale = 'en',
|
||||
EnablePeds = true,
|
||||
Locale = GetConvar('esx:locale', 'en'),
|
||||
EnablePeds = true,
|
||||
AtmModels = {`prop_fleeca_atm`, `prop_atm_01`, `prop_atm_02`, `prop_atm_03`},
|
||||
Banks = {
|
||||
{
|
||||
|
||||
@@ -4,7 +4,7 @@ game 'gta5'
|
||||
|
||||
description 'ESX banking'
|
||||
lua54 'yes'
|
||||
version '1.8.5'
|
||||
version '1.8.6'
|
||||
|
||||
shared_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
|
||||
@@ -268,8 +268,8 @@
|
||||
"LAUNGAGE": {
|
||||
"your_money_title":"saldo",
|
||||
"your_money_desc":"qui puoi vedere il saldo attuale e contanti.",
|
||||
"your_money_cash":"i tuoi soldi",
|
||||
"your_money_bank":"il tuo saldo bancario",
|
||||
"your_money_cash_label":"i tuoi soldi",
|
||||
"your_money_bank_label":"il tuo saldo bancario",
|
||||
"withdraw":"RITIRARE",
|
||||
"deposit":"DEPOSITARE",
|
||||
"transfer":"TRASFERIMENTO",
|
||||
@@ -289,7 +289,7 @@
|
||||
"timeLabel":"tempo",
|
||||
"searchInputPlaceholder":"Cerca ...",
|
||||
"_comment": "tabella Opzioni complete della lingua: inglese, ungherese, italiana puoi trovare qui tutte le lingue: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/",
|
||||
"tableFullLanguage":"Italiano"
|
||||
"tableFullLanguage":"Italian"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -758,6 +758,7 @@ $(document).ready(function(){
|
||||
if(data.openATM){
|
||||
ATMRender()
|
||||
type = "ATM"
|
||||
transaction.setData(transData,languageText)
|
||||
}
|
||||
else{
|
||||
type = "BANK"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
Locales['et'] = {
|
||||
['invalid_amount'] = 'Tundmatu kogus raha',
|
||||
['deposit_money'] = 'Sa sisestasid $%s',
|
||||
['withdraw_money'] = 'Sa võtsid välja $%s',
|
||||
['pincode_money'] = 'Uus PIN kood: %s',
|
||||
['transfer_money'] = 'Sa tegid ülekande summas: $%s ID: %s',
|
||||
['receive_transfer'] = 'Sa said ülekande summas: $%s ID: %s',
|
||||
['press_e_banking'] = 'Vajuta [E], et avada pank',
|
||||
['access_bank'] = 'Ava pank',
|
||||
['banking_blip'] = 'Pank',
|
||||
['cant_do_it'] = "Ei saa seda teha!",
|
||||
['not_enough_money'] = "Pole piisavalt raha! Sul on vaja %s !",
|
||||
['pincode_not_found'] = "Vale PIN",
|
||||
['pincode_found'] = "Õige PIN...",
|
||||
['bank_name'] = "Fleeca Pank"
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
Locales['nl'] = {
|
||||
['invalid_amount'] = 'Ongeldigd bedrag',
|
||||
['deposit_money'] = 'Je hebt €%s gestort',
|
||||
['withdraw_money'] = 'Je hebt €%s opgenomen',
|
||||
['pincode_money'] = 'Je nieuwe pincode is %s',
|
||||
['transfer_money'] = 'Met succes €%s overgemaakt naar ID: %s',
|
||||
['receive_transfer'] = 'Je hebt €%s ontvangen van ID: %s',
|
||||
['press_e_banking'] = 'Klik op [E] om de bank te gebruiken',
|
||||
['access_bank'] = 'Geldautomaat',
|
||||
['banking_blip'] = 'Bank',
|
||||
['cant_do_it'] = "Kan dit niet doen!",
|
||||
['not_enough_money'] = "Niet genoeg geld! Je hebt nog %s nodig!",
|
||||
['pincode_not_found'] = "Onjuiste PIN",
|
||||
['pincode_found'] = "Een moment geduld...",
|
||||
['bank_name'] = "Fleeca Bank"
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
local spawnedPeds, netIdTable = {}, {}
|
||||
|
||||
-- get keys utils
|
||||
local function get_key(t)
|
||||
local key
|
||||
@@ -9,28 +11,34 @@ end
|
||||
|
||||
-- Resource starting
|
||||
AddEventHandler('onResourceStart', function(resourceName)
|
||||
if (GetCurrentResourceName() ~= resourceName) then
|
||||
return
|
||||
end
|
||||
if (GetCurrentResourceName() ~= resourceName) then return end
|
||||
if Config.EnablePeds then BANK.CreatePeds() end
|
||||
local twoMonthMs = (os.time() - 5259487) * 1000
|
||||
MySQL.Sync.fetchScalar('DELETE FROM banking WHERE time < ? ', {twoMonthMs})
|
||||
end)
|
||||
|
||||
AddEventHandler('onResourceStop', function(resourceName)
|
||||
if (GetCurrentResourceName() ~= resourceName) then return end
|
||||
if Config.EnablePeds then BANK.DeletePeds() end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:playerLoaded', function(playerId, xPlayer)
|
||||
if not Config.EnablePeds then return end
|
||||
TriggerClientEvent('esx_banking:PedHandler', playerId, netIdTable)
|
||||
end)
|
||||
|
||||
-- event
|
||||
RegisterServerEvent('esx_banking:doingType')
|
||||
AddEventHandler('esx_banking:doingType', function(typeData)
|
||||
if source == nil then
|
||||
return
|
||||
end
|
||||
if (typeData == nil) then
|
||||
return
|
||||
end
|
||||
if source == nil then return end
|
||||
if (typeData == nil) then return end
|
||||
|
||||
local source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local identifier = xPlayer.getIdentifier()
|
||||
local money = xPlayer.getAccount('money').money
|
||||
local bankMoney = xPlayer.getAccount('bank').money
|
||||
local amount
|
||||
|
||||
local key = get_key(typeData)
|
||||
if typeData.deposit then
|
||||
@@ -43,12 +51,10 @@ AddEventHandler('esx_banking:doingType', function(typeData)
|
||||
amount = tonumber(typeData.pincode)
|
||||
end
|
||||
|
||||
if not tonumber(amount) then
|
||||
return
|
||||
end
|
||||
if not tonumber(amount) then return end
|
||||
amount = ESX.Math.Round(amount)
|
||||
|
||||
if amount == nil or amount <= 0 then
|
||||
if amount == nil or (not typeData.pincode and amount <= 0) then
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_amount'), "error")
|
||||
else
|
||||
if typeData.deposit and amount <= money then
|
||||
@@ -79,7 +85,7 @@ AddEventHandler('esx_banking:doingType', function(typeData)
|
||||
TriggerClientEvent("esx:showNotification", source,
|
||||
TranslateCap(string.format('%s_money', key), amount, typeData.transfer.playerId), "success")
|
||||
else
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap(string.format('%s_money', key), amount), "success")
|
||||
TriggerClientEvent("esx:showNotification", source, TranslateCap(string.format('%s_money', key), typeData.pincode and (string.format("%04d", amount)) or amount), "success")
|
||||
end
|
||||
if not typeData.pincode then
|
||||
BANK.LogTransaction(source, string.upper(key), amount, bankMoney)
|
||||
@@ -114,8 +120,58 @@ ESX.RegisterServerCallback("esx_banking:checkPincode", function(source, cb, inpu
|
||||
cb(pincode > 0)
|
||||
end)
|
||||
|
||||
function logTransaction(targetSource,key,amount)
|
||||
if targetSource == nil then
|
||||
print("ERROR: TargetSource nil!")
|
||||
return
|
||||
end
|
||||
|
||||
if key == nil then
|
||||
print("ERROR: Do you need use these: WITHDRAW,DEPOSIT,TRANSFER_RECEIVE")
|
||||
return
|
||||
end
|
||||
|
||||
if type(key) ~= "string" or key == '' then
|
||||
print("ERROR: Do you need use these: WITHDRAW,DEPOSIT,TRANSFER_RECEIVE and can only be string type!")
|
||||
return
|
||||
end
|
||||
|
||||
if amount == nil then
|
||||
print("ERROR: Amount value is nil! Add some numeric value to the amount!")
|
||||
return
|
||||
end
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(tonumber(targetSource))
|
||||
|
||||
if xPlayer ~= nil then
|
||||
local bankCurrentMoney = xPlayer.getAccount('bank').money
|
||||
BANK.LogTransaction(targetSource, string.upper(key), amount, bankCurrentMoney)
|
||||
else
|
||||
print("ERROR: xPlayer is nil!")
|
||||
end
|
||||
end
|
||||
exports("logTransaction", logTransaction)
|
||||
|
||||
-- bank functions
|
||||
BANK = {
|
||||
CreatePeds = function()
|
||||
for i = 1, #Config.Peds do
|
||||
local model = Config.Peds[i].Model
|
||||
local coords = Config.Peds[i].Position
|
||||
spawnedPeds[i] = CreatePed(0, model, coords.x, coords.y, coords.z, coords.w, true, true)
|
||||
netIdTable[i] = NetworkGetNetworkIdFromEntity(spawnedPeds[i])
|
||||
while not DoesEntityExist(spawnedPeds[i]) do Wait(50) end
|
||||
end
|
||||
|
||||
Wait(100)
|
||||
TriggerClientEvent('esx_banking:PedHandler', -1, netIdTable)
|
||||
end,
|
||||
DeletePeds = function()
|
||||
for i = 1, #spawnedPeds do
|
||||
DeleteEntity(spawnedPeds[i])
|
||||
spawnedPeds[i] = nil
|
||||
end
|
||||
end,
|
||||
Withdraw = function(amount, xPlayer)
|
||||
xPlayer.addAccountMoney('money', amount)
|
||||
xPlayer.removeAccountMoney('bank', amount)
|
||||
@@ -132,7 +188,7 @@ BANK = {
|
||||
|
||||
xPlayer.removeAccountMoney('bank', amount)
|
||||
xTarget.addAccountMoney('bank', amount)
|
||||
bankMoney = xTarget.getAccount('bank').money
|
||||
local bankMoney = xTarget.getAccount('bank').money
|
||||
BANK.LogTransaction(xTarget.source, "TRANSFER_RECEIVE", amount, bankMoney)
|
||||
TriggerClientEvent("esx:showNotification", xTarget.source, TranslateCap('receive_transfer', amount, xPlayer.source),
|
||||
"success")
|
||||
@@ -143,7 +199,7 @@ BANK = {
|
||||
MySQL.update('UPDATE users SET pincode = ? WHERE identifier = ? ', {amount, identifier})
|
||||
end,
|
||||
LogTransaction = function(playerId, logType, amount, bankMoney)
|
||||
if source == nil then
|
||||
if playerId == nil then
|
||||
return
|
||||
end
|
||||
local xPlayer = ESX.GetPlayerFromId(playerId)
|
||||
@@ -151,5 +207,5 @@ BANK = {
|
||||
|
||||
MySQL.insert('INSERT INTO banking (identifier, type, amount, time, balance) VALUES (?, ?, ?, ?, ?)',
|
||||
{identifier, logType, amount, os.time() * 1000, bankMoney})
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
@@ -6,18 +6,17 @@ function OpenShopMenu()
|
||||
TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu)
|
||||
menu.close()
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_confirm', {
|
||||
title = TranslateCap('valid_purchase'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = TranslateCap('no'), value = 'no'},
|
||||
{label = TranslateCap('yes'), value = 'yes'}
|
||||
}}, function(data, menu)
|
||||
menu.close()
|
||||
local elements = {
|
||||
{unselectable = true, icon = "fas fa-check-double", title = TranslateCap("valid_purchase")},
|
||||
{icon = "fas fa-check-circle", title = TranslateCap("yes"), value = "yes"},
|
||||
{icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"},
|
||||
}
|
||||
|
||||
if data.current.value == 'yes' then
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
if element.value == "yes" then
|
||||
ESX.TriggerServerCallback('esx_barbershop:checkMoney', function(hasEnoughMoney)
|
||||
if hasEnoughMoney then
|
||||
ESX.CloseContext()
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
TriggerServerEvent('esx_skin:save', skin)
|
||||
end)
|
||||
@@ -25,6 +24,7 @@ function OpenShopMenu()
|
||||
TriggerServerEvent('esx_barbershop:pay')
|
||||
hasPaid = true
|
||||
else
|
||||
ESX.CloseContext()
|
||||
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
end)
|
||||
@@ -32,16 +32,15 @@ function OpenShopMenu()
|
||||
ESX.ShowNotification(TranslateCap('not_enough_money'))
|
||||
end
|
||||
end)
|
||||
elseif data.current.value == 'no' then
|
||||
elseif element.value == "no" then
|
||||
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
end)
|
||||
ESX.CloseContext()
|
||||
end
|
||||
|
||||
currentAction = 'shop_menu'
|
||||
currentActionMsg = TranslateCap('press_access')
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end, function(menu)
|
||||
currentAction = 'shop_menu'
|
||||
currentActionMsg = TranslateCap('press_access')
|
||||
end)
|
||||
@@ -82,7 +81,7 @@ AddEventHandler('esx_barbershop:hasEnteredMarker', function(zone)
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_barbershop:hasExitedMarker', function(zone)
|
||||
ESX.UI.Menu.CloseAll()
|
||||
ESX.CloseContext()
|
||||
currentAction = nil
|
||||
|
||||
if not hasPaid then
|
||||
@@ -161,4 +160,4 @@ CreateThread(function()
|
||||
Wait(500)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
Locales['et'] = {
|
||||
['valid_purchase'] = 'Kinnita ost?',
|
||||
['yes'] = 'Jah',
|
||||
['no'] = 'Ei',
|
||||
['not_enough_money'] = 'Sul pole piisavalt raha.',
|
||||
['press_access'] = 'Vajuta [E], et avada juuksuri menüü.',
|
||||
['barber_blip'] = 'Juuksur',
|
||||
['you_paid'] = 'Maksid $%s',
|
||||
}
|
||||
@@ -5,7 +5,7 @@ Config.Visible = true
|
||||
Config.Food = {
|
||||
["bread"] = {
|
||||
status = 200000,
|
||||
remove = false
|
||||
remove = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Locales['et'] = {
|
||||
['used_eat'] = 'Sõid 1x %s',
|
||||
['used_drink'] = 'Jõid 1x %s',
|
||||
}
|
||||
@@ -3,28 +3,22 @@ local isDead = false
|
||||
function ShowBillsMenu()
|
||||
ESX.TriggerServerCallback('esx_billing:getBills', function(bills)
|
||||
if #bills > 0 then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
local elements = {}
|
||||
local elements = {
|
||||
{unselectable = true, icon = "fas fa-scroll", title = TranslateCap('invoices')}
|
||||
}
|
||||
|
||||
for k,v in ipairs(bills) do
|
||||
table.insert(elements, {
|
||||
label = ('%s - <span style="color:red;">%s</span>'):format(v.label, TranslateCap('invoices_item', ESX.Math.GroupDigits(v.amount))),
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-scroll",
|
||||
title = ('%s - <span style="color:red;">%s</span>'):format(v.label, TranslateCap('invoices_item', ESX.Math.GroupDigits(v.amount))),
|
||||
billId = v.id
|
||||
})
|
||||
}
|
||||
end
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'billing', {
|
||||
title = TranslateCap('invoices'),
|
||||
align = 'bottom-right',
|
||||
elements = elements
|
||||
}, function(data, menu)
|
||||
menu.close()
|
||||
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
ESX.TriggerServerCallback('esx_billing:payBill', function()
|
||||
ShowBillsMenu()
|
||||
end, data.current.billId)
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end, element.billId)
|
||||
end)
|
||||
else
|
||||
ESX.ShowNotification(TranslateCap('no_invoices'))
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
Locales['et'] = {
|
||||
['invoices'] = 'Arved',
|
||||
['invoices_item'] = '$%s',
|
||||
['received_invoice'] = 'Sa said ~r~arve',
|
||||
['paid_invoice'] = 'Maksid arve maksumusega: ~r~$%s',
|
||||
['no_invoices'] = 'Sul pole hetkel arveid',
|
||||
['received_payment'] = 'Sa said makse summas: ~r~$%s',
|
||||
['player_not_online'] = 'See isik pole linnas',
|
||||
['no_money'] = 'Sul pole piisavalt raha, et maksta selle arve eest',
|
||||
['target_no_money'] = 'Isikul ~r~pole raha, et maksta seda arvet!',
|
||||
['keymap_showbills'] = 'Vaata arveid',
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
Locales['et'] = {
|
||||
-- shop
|
||||
['boat_shop'] = 'Paadi pood',
|
||||
['boat_shop_open'] = 'Vajuta [E], et avada paadi pood.',
|
||||
['boat_shop_confirm'] = 'Osta <span style="color: yellow;">%s</span> <span style="color: orange;">$%s</span> eest?',
|
||||
['boat_shop_bought'] = 'Sa ostsid %s $%s eest',
|
||||
['boat_shop_nomoney'] = 'Sa ei saa ~r~lubada endale seda paati!',
|
||||
['confirm_no'] = 'Ei',
|
||||
['confirm_yes'] = 'Jah',
|
||||
|
||||
-- garage
|
||||
['garage'] = 'Paadi garaaž',
|
||||
['garage_open'] = 'Vajuta [E], et avada paadi garaaž.',
|
||||
['garage_store'] = 'Vajuta [E], et parkida paat garaaži.',
|
||||
['garage_taken'] = 'Paat on väljastatud!',
|
||||
['garage_stored'] = 'Paat on pargitud teie garaaži!',
|
||||
['garage_noboats'] = 'Sul pole ühtegi paati, külasta paadi poodi.',
|
||||
['garage_blocked'] = 'Paati ei saa garaažist välja võtta, kuna miski blokeerib seda!',
|
||||
['garage_notowner'] = 'Sa ei oma seda paati!',
|
||||
|
||||
-- license
|
||||
['license_menu'] = 'Osta paadi load?',
|
||||
['license_buy_no'] = 'Ei',
|
||||
['license_buy_yes'] = 'Osta paadi load <span style="color: green;">$%s</span>',
|
||||
['license_bought'] = 'Sa ostsid paadi load $%s eest',
|
||||
['license_nomoney'] = 'Sa ei võimalda ~r~lubada endale paadi lubasid!',
|
||||
|
||||
-- blips
|
||||
['blip_garage'] = 'Paadi garaaž',
|
||||
['blip_shop'] = 'Paadi pood',
|
||||
}
|
||||
@@ -8,16 +8,14 @@ function OpenShopMenu()
|
||||
TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu)
|
||||
menu.close()
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_confirm', {
|
||||
title = TranslateCap('valid_this_purchase'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = TranslateCap('no'), value = 'no'},
|
||||
{label = TranslateCap('yes'), value = 'yes'}
|
||||
}}, function(data, menu)
|
||||
menu.close()
|
||||
local elements = {
|
||||
{unselectable = true, icon = "fas fa-check-double", title = TranslateCap("valid_this_purchase")},
|
||||
{icon = "fas fa-check-circle", title = TranslateCap("yes"), value = "yes"},
|
||||
{icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"},
|
||||
}
|
||||
|
||||
if data.current.value == 'yes' then
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
if element.value == "yes" then
|
||||
ESX.TriggerServerCallback('esx_clotheshop:buyClothes', function(bought)
|
||||
if bought then
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
@@ -25,56 +23,53 @@ function OpenShopMenu()
|
||||
end)
|
||||
|
||||
hasPaid = true
|
||||
|
||||
ESX.TriggerServerCallback('esx_clotheshop:checkPropertyDataStore', function(foundStore)
|
||||
if foundStore then
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'save_dressing', {
|
||||
title = TranslateCap('save_in_dressing'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = TranslateCap('no'), value = 'no'},
|
||||
{label = TranslateCap('yes'), value = 'yes'}
|
||||
}}, function(data2, menu2)
|
||||
menu2.close()
|
||||
local elements2 = {
|
||||
{unselectable = true, icon = "fas fa-check-double", title = TranslateCap('save_in_dressing')},
|
||||
{icon = "fas fa-check-circle", title = TranslateCap("yes"), value = "yes"},
|
||||
{icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"},
|
||||
}
|
||||
|
||||
if data2.current.value == 'yes' then
|
||||
ESX.OpenContext("right", elements2, function(menu2,element2)
|
||||
if element2.value == "yes" then
|
||||
ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'outfit_name', {
|
||||
title = TranslateCap('name_outfit')
|
||||
}, function(data3, menu3)
|
||||
menu3.close()
|
||||
|
||||
TriggerEvent('skinchanger:getSkin', function(skin)
|
||||
ESX.CloseContext()
|
||||
TriggerServerEvent('esx_clotheshop:saveOutfit', data3.value, skin)
|
||||
ESX.ShowNotification(TranslateCap('saved_outfit'))
|
||||
end)
|
||||
end, function(data3, menu3)
|
||||
menu3.close()
|
||||
end)
|
||||
elseif element2.value == "no" then
|
||||
ESX.CloseContext()
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
else
|
||||
ESX.CloseContext()
|
||||
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
end)
|
||||
|
||||
ESX.ShowNotification(TranslateCap('not_enough_money'))
|
||||
end
|
||||
end)
|
||||
elseif data.current.value == 'no' then
|
||||
elseif element.value == "no" then
|
||||
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin)
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
end)
|
||||
ESX.CloseContext()
|
||||
end
|
||||
|
||||
currentAction = 'shop_menu'
|
||||
currentActionMsg = TranslateCap('press_menu')
|
||||
currentActionData = {}
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
|
||||
end, function(menu)
|
||||
currentAction = 'shop_menu'
|
||||
currentActionMsg = TranslateCap('press_menu')
|
||||
currentActionData = {}
|
||||
@@ -107,7 +102,7 @@ AddEventHandler('esx_clotheshop:hasEnteredMarker', function(zone)
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_clotheshop:hasExitedMarker', function(zone)
|
||||
ESX.UI.Menu.CloseAll()
|
||||
ESX.CloseContext()
|
||||
currentAction = nil
|
||||
|
||||
if not hasPaid then
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
Locales['et'] = {
|
||||
['valid_this_purchase'] = 'Kinnita see ost?',
|
||||
['yes'] = 'jah',
|
||||
['no'] = 'Ei',
|
||||
['not_enough_money'] = 'Sul pole piisavalt raha',
|
||||
['press_menu'] = 'Vajuta [E], et avada riidepood.',
|
||||
['clothes'] = 'Riidepood',
|
||||
['you_paid'] = 'Sa maksid $%s',
|
||||
['save_in_dressing'] = 'Kas soovite sellist paari riideid ka enda korteri?',
|
||||
['name_outfit'] = 'Pane riietusele nimi',
|
||||
['saved_outfit'] = 'Riietus salvestatud!',
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
Locales['nl'] = {
|
||||
['activated'] = 'geactiveerd',
|
||||
['deactivated'] = 'gedeactiveerd',
|
||||
}
|
||||
@@ -92,70 +92,68 @@ function OpenDMVSchoolMenu()
|
||||
ownedLicenses[Licenses[i].type] = true
|
||||
end
|
||||
|
||||
local elements = {}
|
||||
local elements = {
|
||||
{unselectable = true, icon = "fas fa-car", title = TranslateCap("driving_school")}
|
||||
}
|
||||
|
||||
if not ownedLicenses['dmv'] then
|
||||
table.insert(elements, {
|
||||
label = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('theory_test'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['dmv'])))),
|
||||
value = 'theory_test'
|
||||
})
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-car",
|
||||
title = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('theory_test'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['dmv'])))),
|
||||
value = "theory_test"
|
||||
}
|
||||
end
|
||||
|
||||
if ownedLicenses['dmv'] then
|
||||
if not ownedLicenses['drive'] then
|
||||
table.insert(elements, {
|
||||
label = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('road_test_car'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive'])))),
|
||||
value = 'drive_test',
|
||||
type = 'drive'
|
||||
})
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-car",
|
||||
title = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('road_test_car'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive'])))),
|
||||
value = "drive_test",
|
||||
type = "drive"
|
||||
}
|
||||
end
|
||||
|
||||
if not ownedLicenses['drive_bike'] then
|
||||
table.insert(elements, {
|
||||
label = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('road_test_bike'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive_bike'])))),
|
||||
value = 'drive_test',
|
||||
type = 'drive_bike'
|
||||
})
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-car",
|
||||
title = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('road_test_bike'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive_bike'])))),
|
||||
value = "drive_test",
|
||||
type = "drive_bike"
|
||||
}
|
||||
end
|
||||
|
||||
if not ownedLicenses['drive_truck'] then
|
||||
table.insert(elements, {
|
||||
label = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('road_test_truck'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive_truck'])))),
|
||||
value = 'drive_test',
|
||||
type = 'drive_truck'
|
||||
})
|
||||
elements[#elements+1] = {
|
||||
icon = "fas fa-car",
|
||||
title = (('%s: <span style="color:green;">%s</span>'):format(TranslateCap('road_test_truck'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive_truck'])))),
|
||||
value = "drive_test",
|
||||
type = "drive_truck"
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
ESX.UI.Menu.CloseAll()
|
||||
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'dmvschool_actions', {
|
||||
title = TranslateCap('driving_school'),
|
||||
elements = elements,
|
||||
align = 'bottom-right'
|
||||
}, function(data, menu)
|
||||
if data.current.value == 'theory_test' then
|
||||
menu.close()
|
||||
ESX.OpenContext("right", elements, function(menu,element)
|
||||
if element.value == "theory_test" then
|
||||
ESX.TriggerServerCallback('esx_dmvschool:canYouPay', function(haveMoney)
|
||||
if haveMoney then
|
||||
ESX.CloseContext()
|
||||
StartTheoryTest()
|
||||
else
|
||||
ESX.ShowNotification(TranslateCap('not_enough_money'))
|
||||
end
|
||||
end, 'dmv')
|
||||
elseif data.current.value == 'drive_test' then
|
||||
menu.close()
|
||||
elseif element.value == "drive_test" then
|
||||
ESX.TriggerServerCallback('esx_dmvschool:canYouPay', function(haveMoney)
|
||||
if haveMoney then
|
||||
StartDriveTest(data.current.type)
|
||||
ESX.CloseContext()
|
||||
StartDriveTest(element.type)
|
||||
else
|
||||
ESX.ShowNotification(TranslateCap('not_enough_money'))
|
||||
end
|
||||
end, data.current.type)
|
||||
end, element.type)
|
||||
end
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
|
||||
end, function(menu)
|
||||
CurrentAction = 'dmvschool_menu'
|
||||
CurrentActionMsg = TranslateCap('press_open_menu')
|
||||
CurrentActionData = {}
|
||||
@@ -190,7 +188,7 @@ end)
|
||||
|
||||
AddEventHandler('esx_dmvschool:hasExitedMarker', function(zone)
|
||||
CurrentAction = nil
|
||||
ESX.UI.Menu.CloseAll()
|
||||
ESX.CloseContext()
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_dmvschool:loadLicenses')
|
||||
@@ -286,8 +284,8 @@ CreateThread(function()
|
||||
ESX.ShowHelpNotification(CurrentActionMsg)
|
||||
|
||||
if (IsControlJustReleased(0, 38)) and (CurrentAction == 'dmvschool_menu') then
|
||||
OpenDMVSchoolMenu()
|
||||
CurrentAction = nil
|
||||
OpenDMVSchoolMenu()
|
||||
CurrentAction = nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
var tableauQuestion = [
|
||||
{
|
||||
question: "Als je 80 km/h gaat, en je nadert een woonwijk dan moet je:",
|
||||
propositionA: "Je geeft gas bij",
|
||||
propositionB: "Je behoudt je snelheid, zo lang je niemand inhaalt",
|
||||
propositionC: "Je behoudt je snelheid",
|
||||
propositionD: "Je remt af",
|
||||
reponse: "D"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Als je rechts gaat bij een stoplicht, maar dan ziet iemand oversteken wat doe je dan:",
|
||||
propositionA: "Je wacht totdat de voetganger is overgestoken",
|
||||
propositionB: "Je passeert de voetganger",
|
||||
propositionC: "Je kijkt of er geen voertuigen om je heen zijn",
|
||||
propositionD: "Je rijdt de voetganger aan en maakt dat je weg komt",
|
||||
reponse: "A"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Zonder enige indicatie, de snelheid in een woonwijk is: __ km/h",
|
||||
propositionA: "30 km/u",
|
||||
propositionB: "50 km/u",
|
||||
propositionC: "40 km/u",
|
||||
propositionD: "60 km/u",
|
||||
reponse: "A"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Voordat je van rijstrook veranderd moet je:",
|
||||
propositionA: "Kijk in je spiegels",
|
||||
propositionB: "Kijk in je blinde hoek",
|
||||
propositionC: "Gebruik je knipperlicht naar de correcte rijbaan",
|
||||
propositionD: "Alles hierboven",
|
||||
reponse: "D"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Wat bloed alcohol level word gezien als rijden onder invloed?",
|
||||
propositionA: "0.05%",
|
||||
propositionB: "0.18%",
|
||||
propositionC: "0.08%",
|
||||
propositionD: "0.06%",
|
||||
reponse: "C"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Wanneer kan je doorrijden bij een verkeerslicht?",
|
||||
propositionA: "Wanneer het groen is",
|
||||
propositionB: "Wanneer er niemand bij het kruispunt is",
|
||||
propositionC: "Als je in een school zone bent",
|
||||
propositionD: "Als je boven de 100km/u rijdt.",
|
||||
reponse: "A"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Een voetganger heeft een rood licht om over te steken",
|
||||
propositionA: "Je laat diegene passeren",
|
||||
propositionB: "Je observeert wat diegene doet en gaat vervolgens door omdat het groen is.",
|
||||
propositionC: "Je signaleert diegene om over te steken",
|
||||
propositionD: "Je gaat door want je hebt groen licht.",
|
||||
reponse: "D"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Wat is toegestaan als je een voertuig inhaalt",
|
||||
propositionA: "Je gaat bumper kleven om sneller voorbij te gaan",
|
||||
propositionB: "Je paseert zonder de weg te verlaten",
|
||||
propositionC: "Je rijdt aan de andere kant van de weg om in te halen",
|
||||
propositionD: "Je gaat te snel rijden.",
|
||||
reponse: "C"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Je rijdt op de snelweg wat een maxiumum snelheid van 120 km/u hanteert maar iedereen rijdt gemiddeld 125 km/u, hoe hard mag je maximaal gaan:",
|
||||
propositionA: "120 km/u",
|
||||
propositionB: "125 km/u",
|
||||
propositionC: "130 km/u",
|
||||
propositionD: "110 km/u",
|
||||
reponse: "A"
|
||||
},
|
||||
|
||||
{
|
||||
question: "Wanneer je word ingehaald door een ander voertuig is het belangrijk NIET te:",
|
||||
propositionA: "Verslomen",
|
||||
propositionB: "Je spiegels bekijken",
|
||||
propositionC: "Andere bestuurders bekijken",
|
||||
propositionD: "Snelheid te verhogen",
|
||||
reponse: "D"
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,29 @@
|
||||
Locales['nl'] = {
|
||||
['you_paid'] = 'je betaalde €%s aan het CBR',
|
||||
['go_next_point'] = 'ga naar het volgende punt!',
|
||||
['in_town_speed'] = 'We zitten in de stad, let op je snelheid! Snelheids limiet: %s km/h',
|
||||
['next_point_speed'] = 'Ga naar het volgende punt! Snelheids limiet: %s km/h',
|
||||
['stop_for_ped'] = '~r~Stop voor de overstekende voetganger',
|
||||
['good_lets_cont'] = 'Goed, ga verder.',
|
||||
['stop_look_left'] = '~r~Stop en kijk naar links Snelheids limiet: %s km/h',
|
||||
['good_turn_right'] = 'Goed, ga naar rechts en volg de weg.',
|
||||
['watch_traffic_lightson'] = 'Let op het verkeer en zet je lichten aan!',
|
||||
['stop_for_passing'] = '~r~Stop voor passerende voertuigen!',
|
||||
['hway_time'] = 'Het is tijd om op de snelweg te rijden! Snelheids limiet: %s km/h',
|
||||
['gratz_stay_alert'] = 'Ik ben onder de indruk, vergeet tijdens het rijden niet om ~r~alert te blijven!',
|
||||
['passed_test'] = 'je bent geslaagd, gefeliciteerd!',
|
||||
['failed_test'] = 'je bent ~r~gezakt~s~, volgende keer beter!',
|
||||
['theory_test'] = 'Theorie examen',
|
||||
['road_test_car'] = 'Praktijk examen',
|
||||
['road_test_bike'] = 'Motor examen',
|
||||
['road_test_truck'] = 'Vrachtwagen examen',
|
||||
['school_item'] = '€%s',
|
||||
['driving_school'] = 'CBR',
|
||||
['press_open_menu'] = 'klik op [E] om het menu te openen',
|
||||
['driving_school_blip'] = 'CBR',
|
||||
['driving_test_complete'] = 'Praktijk examen gedaan',
|
||||
['driving_too_fast'] = '~r~Je rijd te snel! De snelheids limiet is: %s km/h!',
|
||||
['errors'] = 'Fouten: ~r~%s/%s',
|
||||
['you_damaged_veh'] = 'Je hebt het voertuig beschadigd',
|
||||
['not_enough_money'] = 'Je hebt niet genoeg geld',
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
INSERT INTO `licenses` (`type`, `label`) VALUES
|
||||
('dmv', 'Theorie examen'),
|
||||
('drive', 'Rijbewijs B'),
|
||||
('drive_bike', 'Motor Rijbewijs'),
|
||||
('drive_truck', 'Vrachtwagen Rijbewijs')
|
||||
;
|
||||
@@ -0,0 +1,31 @@
|
||||
Locales ['et'] = {
|
||||
-- weed
|
||||
['weed_pickupprompt'] = 'Vajuta [E], et korjata kanepitaime.',
|
||||
['weed_quitprocess'] = 'Vajuta [E], et katkestada kanepitaimede töötlemine.',
|
||||
['weed_inventoryfull'] = 'Sul pole rohkem ruumi kanepitaimede jaoks.',
|
||||
['weed_processprompt'] = 'Vajuta [E], et töödelda kanepitaimesid.',
|
||||
['weed_processingstarted'] = 'Kanepitaimede töötlemine kanepiks...',
|
||||
['weed_processingfull'] = 'Töötlemine ~r~katkestatud, kuna sul pole rohkem ruumi!',
|
||||
['weed_processingenough'] = 'Sul peab olema vähemalt 3x kanepitaime, et töödelda.',
|
||||
['weed_processed'] = 'Sa töötlesid 3x kanepitaime 1x kanepiks',
|
||||
['weed_processingtoofar'] = 'Töötlemine ~r~katkestatud, kuna lahkusid alast.',
|
||||
|
||||
-- drug dealer
|
||||
['dealer_prompt'] = 'Vajuta [E], et rääkida ~r~Narko Diileriga.',
|
||||
['dealer_title'] = 'Narko diiler',
|
||||
['dealer_item'] = '$%s',
|
||||
['dealer_notenough'] = 'Sul pole seda piisavalt, et müüa!',
|
||||
['dealer_sold'] = 'Sa müüsid %sx %s $%s eest',
|
||||
|
||||
-- license
|
||||
['license_title'] = 'Sul peab olema töötlemis litsents,et seda teha, seda saab ostas siit.',
|
||||
['license_no'] = 'ei',
|
||||
['license_bought'] = 'Sa ostsid %s ~r~$%s eest',
|
||||
['license_bought_fail'] = 'Sul pole piisavalt raha, et osta%s!',
|
||||
['license_weed'] = 'Kanepi töötlemis litsents',
|
||||
|
||||
-- blips
|
||||
['blip_weedfield'] = 'Kanepi põld',
|
||||
['blip_weedprocessing'] = 'Kanepi töötlemine',
|
||||
['blip_drugdealer'] = 'Narko diiler',
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES
|
||||
('cannabis', 'Onvewerkte Wiet', 3, 0, 1),
|
||||
('marijuana', 'Wiet', 2, 0, 1)
|
||||
;
|
||||
|
||||
INSERT INTO `licenses` (`type`, `label`) VALUES
|
||||
('weed_processing', 'Wiet Processing Vergunning')
|
||||
;
|
||||
@@ -0,0 +1,25 @@
|
||||
Locales["et"] = {
|
||||
["parking_blip_name"] = 'Garaaž',
|
||||
["Impound_blip_name"] = 'Sõiduk konfiskeeritud',
|
||||
["access_parking"] = 'Vajuta [E], et avada garaaž.',
|
||||
["access_Impound"] = 'Vajuta [E], et avada konfiskeeritud sõidukite garaaž.',
|
||||
["park_veh"] = 'Vajuta [E], et parkida see sõiduk.',
|
||||
["not_owning_veh"] = 'Sa ei oma seda sõidukit!',
|
||||
['veh_released'] = 'Sõiduk edukalt pargitud.',
|
||||
['veh_Impound_released'] = 'Sõiduk edukalt välja ostetud.',
|
||||
['veh_stored'] = 'Sõiduk edukalt pargitud',
|
||||
['veh_impounded'] = 'Sõiduk on konfiskeeritud sõidukite parklas',
|
||||
['no_veh_parking'] = 'ÜHtegi autot pole siin garaažis',
|
||||
['no_veh_impounded'] = 'Ühtegi autot pole konfiskeeritud.',
|
||||
['no_veh_Impound'] = 'Sul pole ühtegi konfiskeeritud sõidukit.',
|
||||
['veh_model'] = 'Mudel',
|
||||
['veh_plate'] = 'Numbrimärk',
|
||||
['veh_condition'] = 'Konditsioon',
|
||||
['veh_action'] = 'Tegevus',
|
||||
['impound_action'] = 'Konfiskeeritud sõidukid',
|
||||
['veh_exit'] = 'Väljasta sõiduk',
|
||||
['pay_impound'] = 'Maksa trahv',
|
||||
['veh_block'] = 'Sõidukit ei saanud väljastada, miski blokeerib.',
|
||||
['pay_Impound_bill'] = 'Edukalt makstud ~g~$%s~s~.',
|
||||
['missing_money'] = 'Sul pole piisavalt raha.'
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
Locales["it"] = {
|
||||
["parking_blip_name"] = 'Garage',
|
||||
["Impound_blip_name"] = 'sequestro',
|
||||
["access_parking"] = 'premi [E] per accedere al parcheggio.',
|
||||
["access_Impound"] = 'premi [E] per accedere al sequestro.',
|
||||
["park_veh"] = 'premi [E] per parcheggiare il veicolo.',
|
||||
["not_owning_veh"] = 'non possiedi questo veicolo!',
|
||||
['veh_released' ] = ' Veicolo recuperato con successo. ' ,
|
||||
['veh_Impound_released'] = ' Veicolo recuperato con successo dal sequestro. ' ,
|
||||
['veh_stored'] = ' Veicolo depositato con successo ' ,
|
||||
['veh_impounded'] = ' Veicolo sequestrato ' ,
|
||||
['no_veh_parking'] = ' Nessun veicolo immagazzinato qui. ' ,
|
||||
['no_veh_impounded'] = ' Nessun veicolo sequestrato. ' ,
|
||||
['no_veh_Impound'] = ' non hai veicoli sequestrati. ' ,
|
||||
['veh_model'] = ' Modello ' ,
|
||||
['veh_plate'] = ' targa ' ,
|
||||
['veh_condition'] = ' Condizione ' ,
|
||||
['veh_action ' ] = ' Azione ' ,
|
||||
['impound_action' ] = ' Sequestro ' ,
|
||||
['veh_exit' ] = ' Ritira veicolo ' ,
|
||||
['pay_impound' ] = ' Paga sequestro ' ,
|
||||
['veh_block' ] = ' Impossibile recuperare il veicolo, la posizione di spawn è bloccata. ' ,
|
||||
['pay_Impound_bill' ] = 'hai pagato ~g~$%s~s~ al sequestro. ' ,
|
||||
['missing_money' ] = ' Non hai abbastanza soldi. '
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
Locales["nl"] = {
|
||||
["parking_blip_name"] = 'Garage',
|
||||
["Impound_blip_name"] = 'In beslag genomen',
|
||||
["access_parking"] = 'klik op [E] om je garage te gebruiken.',
|
||||
["access_Impound"] = 'klik op [E] om je in beslag genomen voertuigen te krijgen.',
|
||||
["park_veh"] = 'klik op [E] om je voertuig te parkeren.',
|
||||
["not_owning_veh"] = 'Dit is niet jou voertuig!',
|
||||
['veh_released'] = 'Succesvol je voertuig opgehaald.',
|
||||
['veh_Impound_released'] = 'Succesvol je voertuig terug gekregen van de politie.',
|
||||
['veh_stored'] = 'Succesvol je voertuig geparkeerd',
|
||||
['veh_impounded'] = 'In beslag genomen voertuig',
|
||||
['no_veh_parking'] = 'Er staan hier geen voertuigen.',
|
||||
['no_veh_impounded'] = 'Geen in beslag genomen voertuigen.',
|
||||
['no_veh_Impound'] = 'Er zijn geen voertuigen in beslag genomen.',
|
||||
['veh_model'] = 'Model',
|
||||
['veh_plate'] = 'Kenteken',
|
||||
['veh_condition'] = 'Conditie',
|
||||
['veh_action'] = 'Actie',
|
||||
['impound_action'] = 'Neem in beslag',
|
||||
['veh_exit'] = 'Haal voertuig op',
|
||||
['pay_impound'] = 'Betaal boete',
|
||||
['veh_block'] = 'Kan het voertuig niet ophalen, iets blokkeert de uitgang.',
|
||||
['pay_Impound_bill'] = 'Succesvol ~g~€%s~s~ betaald aan de politie.',
|
||||
['missing_money'] = 'Je hebt niet genoeg geld.'
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
Locales['et'] = {
|
||||
['shop_robbery'] = 'Poe rööv',
|
||||
['press_to_rob'] = 'Vajuta [E], et ~o~röövida %s',
|
||||
['robbery_timer'] = 'Poe vargus: ~r~%s sekundit jäänud',
|
||||
['recently_robbed'] = 'Seda poodi on juba röövitud. Palun oota %s sekundit, et seda poodi röövida uuesti',
|
||||
['rob_in_prog'] = '~r~Toimumas poe rööv asukohas: %s',
|
||||
['started_to_rob'] = 'Sa alustasid %s röövimisega',
|
||||
['alarm_triggered'] = 'Alarm on käivitatud',
|
||||
['robbery_complete'] = '~r~Rööv edukas, sa ~o~varastasid $%s',
|
||||
['robbery_complete_at'] = '~r~Edukas rööv asukohas %s',
|
||||
['robbery_cancelled'] = 'Poe rööv katkestatud!',
|
||||
['robbery_cancelled_at'] = '~r~Rööv asukohas: %s on katkestatud!',
|
||||
['min_police'] = 'Linnas peab olema vähemalt %s politseiniku ,et röövida poodi.',
|
||||
['robbery_already'] = '~r~Keegi juba röövib kusagil poodi.',
|
||||
['no_threat'] = 'Sa ei kujuta poepidajale ohtu',
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
Locales['et'] = {
|
||||
['new_job'] = 'Uus töökoht: ~b~%s~s~ !',
|
||||
['access_job_center'] = 'Vajuta ~b~[E]~s~, et avada töötukassa menüü.',
|
||||
['job_center'] = 'Vali töökoht.',
|
||||
["blip_text"] = "Töötukassa"
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
Locales['hu'] = {
|
||||
['new_job'] = 'Felvetted a munkát!',
|
||||
['access_job_center'] = 'Nyomj ~INPUT_PICKUP~ hogy megnézd a munkákat',
|
||||
['access_job_center'] = 'Nyomj ~b~[E]~s~ hogy megnézd a munkákat',
|
||||
['job_center'] = 'Munkaügyi központ',
|
||||
}
|
||||
|
||||
@@ -14,6 +14,12 @@ ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb)
|
||||
cb(jobs)
|
||||
end)
|
||||
|
||||
function IsJobAvailable(job)
|
||||
local jobs = ESX.GetJobs()
|
||||
local JobToCheck = jobs[job]
|
||||
return not JobToCheck.whitelisted
|
||||
end
|
||||
|
||||
function IsNearCentre(player)
|
||||
local Ped = GetPlayerPed(player)
|
||||
local PedCoords = GetEntityCoords(Ped)
|
||||
@@ -37,11 +43,13 @@ AddEventHandler('esx_joblisting:setJob', function(job)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local jobs = getJobs()
|
||||
|
||||
if xPlayer and IsNearCentre(source) then
|
||||
if xPlayer and IsNearCentre(source) and IsJobAvailable(job) then
|
||||
if ESX.DoesJobExist(job, 0) then
|
||||
xPlayer.setJob(job, 0)
|
||||
else
|
||||
print("[^1ERROR^7] Tried Setting User ^5".. source .. "^7 To Invalid Job - ^5"..job .."^7!")
|
||||
end
|
||||
else
|
||||
print("[^3WARNING^7] User ^5".. source .. "^7 Attempted to Exploit ^5`esx_joblisting:setJob`^7!")
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -4,14 +4,16 @@ Locales['es'] = {
|
||||
['cloak_change'] = 'presiona ~INPUT_PICKUP~ para cambiarte la ropa.',
|
||||
['citizen_wear'] = 'ropa de civil',
|
||||
['job_wear'] = 'ropa de trabajo',
|
||||
['bank_deposit_returned'] = 'un deposito de seguro de $%s se te devolvió.',
|
||||
['bank_deposit_taken'] = 'un deposito de seguro de ~r~$%s se te tomó.',
|
||||
['bank_deposit_returned'] = 'El deposito de seguro te ha devuelto $%s',
|
||||
['bank_deposit_taken'] = 'El deposito te ha tomado ~r~$%s por el seguro del vehiculo',
|
||||
['caution_afford'] = 'no puedes pagar el deposito de seguro de $%s',
|
||||
['foot_work'] = 'debes estar en pie para trabajar.',
|
||||
['next_point'] = 've al siguiente punto tras terminar este.',
|
||||
['not_your_vehicle'] = 'no eres el conductor.',
|
||||
['in_vehicle'] = 'debes estar en un vehiculo.',
|
||||
['wrong_point'] = 'no estas en el punto correcto de entrega.',
|
||||
['onduty'] = "Estás en servicio!",
|
||||
['offduty'] = "Estás fuera de servicio!",
|
||||
['max_limit'] = 'no puedes llevar mas %s',
|
||||
['not_enough'] = 'no tienes suficientes %s para continuar esta tarea.',
|
||||
['spawn_veh'] = 'spawnear vehiculo',
|
||||
@@ -91,7 +93,7 @@ Locales['es'] = {
|
||||
|
||||
-- Slaughterer
|
||||
['s_slaughter_locker'] = 'guardarropas',
|
||||
['s_hen'] = 'gGallinero',
|
||||
['s_hen'] = 'Gallinero',
|
||||
['s_alive_chicken'] = 'pollos vivos',
|
||||
['s_catch_hen'] = 'presiona ~INPUT_PICKUP~ para agarrar pollos vivos.',
|
||||
['s_slaughtered_chicken'] = 'pollo listo para empaquetar',
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
Config = {}
|
||||
|
||||
Config.allowedJobs = {
|
||||
['police'] = true
|
||||
}
|
||||
@@ -9,5 +9,6 @@ version '1.8.5'
|
||||
server_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
'@oxmysql/lib/MySQL.lua',
|
||||
'config.lua',
|
||||
'server/main.lua'
|
||||
}
|
||||
|
||||
@@ -1,113 +1,155 @@
|
||||
function AddLicense(target, type, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
local licenses = {}
|
||||
|
||||
if xPlayer then
|
||||
MySQL.insert('INSERT INTO user_licenses (type, owner) VALUES (?, ?)', {type, xPlayer.identifier},
|
||||
function(rowsChanged)
|
||||
if cb then
|
||||
cb()
|
||||
end
|
||||
end)
|
||||
else
|
||||
MySQL.ready(function()
|
||||
local p = promise.new()
|
||||
MySQL.query('SELECT type, label FROM licenses', function(result)
|
||||
licenses = result
|
||||
p:resolve(true)
|
||||
end)
|
||||
Citizen.Await(p)
|
||||
ESX.Trace('[esx_license] : ' .. #licenses .. ' Loaded.')
|
||||
end)
|
||||
|
||||
---@param identifier target identifier
|
||||
---@param licenseType license type
|
||||
---@param cb callback function
|
||||
local function AddLicense(identifier, licenseType, cb)
|
||||
MySQL.insert('INSERT INTO user_licenses (type, owner) VALUES (?, ?)', {licenseType, identifier}, function(rowsChanged)
|
||||
if cb then
|
||||
cb()
|
||||
cb(rowsChanged)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function RemoveLicense(target, type, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
|
||||
if xPlayer then
|
||||
MySQL.update('DELETE FROM user_licenses WHERE type = ? AND owner = ?', {type, xPlayer.identifier},
|
||||
function(rowsChanged)
|
||||
if cb then
|
||||
cb()
|
||||
end
|
||||
end)
|
||||
else
|
||||
if cb then
|
||||
cb()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function GetLicense(type, cb)
|
||||
MySQL.scalar('SELECT label FROM licenses WHERE type = ?', {type},
|
||||
function(result)
|
||||
cb({type = type, label = result})
|
||||
end)
|
||||
end
|
||||
|
||||
function GetLicenses(target, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
|
||||
MySQL.query('SELECT user_licenses.type, licenses.label FROM user_licenses LEFT JOIN licenses ON user_licenses.type = licenses.type WHERE owner = ?', {xPlayer.identifier},
|
||||
function(result)
|
||||
cb(result)
|
||||
---@param identifier target identifier
|
||||
---@param licenseType license type
|
||||
---@param cb callback function
|
||||
local function RemoveLicense(identifier, licenseType, cb)
|
||||
MySQL.update('DELETE FROM user_licenses WHERE type = ? AND owner = ?', {licenseType, identifier}, function(rowsChanged)
|
||||
if cb then
|
||||
cb(rowsChanged)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function CheckLicense(target, type, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
---@param licenseType license type
|
||||
---@param cb callback function
|
||||
local function GetLicense(licenseType, cb)
|
||||
MySQL.scalar('SELECT label FROM licenses WHERE type = ?', {licenseType}, function(result)
|
||||
if cb then
|
||||
cb({type = licenseType, label = result})
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
if xPlayer then
|
||||
MySQL.scalar('SELECT type FROM user_licenses WHERE type = ? AND owner = ?', {type, xPlayer.identifier},
|
||||
function(result)
|
||||
---@param identifier target identifier
|
||||
---@param cb callback function
|
||||
local function GetLicenses(identifier, cb)
|
||||
MySQL.query('SELECT user_licenses.type, licenses.label FROM user_licenses LEFT JOIN licenses ON user_licenses.type = licenses.type WHERE owner = ?', {identifier},
|
||||
function(result)
|
||||
if cb then
|
||||
cb(result)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
---@param identifier target identifier
|
||||
---@param licenseType license type
|
||||
---@param cb callback function
|
||||
local function CheckLicense(identifier, licenseType, cb)
|
||||
MySQL.scalar('SELECT type FROM user_licenses WHERE type = ? AND owner = ?', {licenseType, identifier}, function(result)
|
||||
if cb then
|
||||
if result then
|
||||
cb(true)
|
||||
else
|
||||
cb(false)
|
||||
end
|
||||
end)
|
||||
else
|
||||
cb(false)
|
||||
end
|
||||
end
|
||||
|
||||
function GetLicensesList(cb)
|
||||
MySQL.query('SELECT type, label FROM licenses',
|
||||
function(result)
|
||||
cb(result)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterNetEvent('esx_license:addLicense')
|
||||
AddEventHandler('esx_license:addLicense', function(target, type, cb)
|
||||
AddLicense(target, type, cb)
|
||||
local function GetLicensesList(cb)
|
||||
cb(licenses)
|
||||
end
|
||||
|
||||
local function isValidLicense(licenseType)
|
||||
local flag = false
|
||||
for i=1,#licenses do
|
||||
if licenses[i].type == licenseType then
|
||||
flag = true
|
||||
break
|
||||
end
|
||||
end
|
||||
return flag
|
||||
end
|
||||
|
||||
AddEventHandler('esx_license:addLicense', function(target, licenseType, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
if xPlayer then
|
||||
if isValidLicense(licenseType) then
|
||||
AddLicense(xPlayer.getIdentifier(), licenseType, cb)
|
||||
else
|
||||
print('[esx_license] : missing license type in db ' .. licenseType .. ' or someone try to use lua executor id : ' .. target)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_license:removeLicense')
|
||||
AddEventHandler('esx_license:removeLicense', function(target, type, cb)
|
||||
RemoveLicense(target, type, cb)
|
||||
AddEventHandler('esx_license:removeLicense', function(target, licenseType, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
if xPlayer then
|
||||
if Config.allowedJobs[xPlayer.getJob().name] then
|
||||
local xTarget = ESX.GetPlayerFromId(target)
|
||||
if xTarget then
|
||||
RemoveLicense(xTarget.getIdentifier(), licenseType, cb)
|
||||
end
|
||||
else
|
||||
xPlayer.showNotification('Your job is not allowed to remove the license', 'error', 3000)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_license:getLicense', function(type, cb)
|
||||
GetLicense(type, cb)
|
||||
AddEventHandler('esx_license:getLicense', function(licenseType, cb)
|
||||
GetLicense(licenseType, cb)
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_license:getLicenses', function(target, cb)
|
||||
GetLicenses(target, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
if xPlayer then
|
||||
GetLicenses(xPlayer.getIdentifier(), cb)
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_license:checkLicense', function(target, type, cb)
|
||||
CheckLicense(target, type, cb)
|
||||
AddEventHandler('esx_license:checkLicense', function(target, licenseType, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
if xPlayer then
|
||||
CheckLicense(xPlayer.getIdentifier(), licenseType, cb)
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_license:getLicensesList', function(cb)
|
||||
GetLicensesList(cb)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_license:getLicense', function(source, cb, type)
|
||||
GetLicense(type, cb)
|
||||
ESX.RegisterServerCallback('esx_license:getLicense', function(source, cb, licenseType)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
if xPlayer then
|
||||
GetLicense(licenseType, cb)
|
||||
end
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_license:getLicenses', function(source, cb, target)
|
||||
GetLicenses(target, cb)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
if xPlayer then
|
||||
GetLicenses(xPlayer.getIdentifier(), cb)
|
||||
end
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_license:checkLicense', function(source, cb, target, type)
|
||||
CheckLicense(target, type, cb)
|
||||
ESX.RegisterServerCallback('esx_license:checkLicense', function(source, cb, target, licenseType)
|
||||
local xPlayer = ESX.GetPlayerFromId(target)
|
||||
if xPlayer then
|
||||
CheckLicense(xPlayer.getIdentifier(), licenseType, cb)
|
||||
end
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_license:getLicensesList', function(source, cb)
|
||||
|
||||
@@ -17,6 +17,15 @@ AddEventHandler('esx_lscustom:installMod', function()
|
||||
TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_lscustom:restoreMods', function(netId, props)
|
||||
local xVehicle = NetworkGetEntityFromNetworkId(netId)
|
||||
if props ~= nil then
|
||||
if DoesEntityExist(xVehicle) then
|
||||
ESX.Game.SetVehicleProperties(xVehicle, props)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_lscustom:cancelInstallMod')
|
||||
AddEventHandler('esx_lscustom:cancelInstallMod', function()
|
||||
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
|
||||
@@ -51,7 +60,6 @@ AddEventHandler('onResourceStop', function(resource)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
function OpenLSMenu(elems, menuName, menuTitle, parent)
|
||||
ESX.UI.Menu.Open('default', GetCurrentResourceName(), menuName, {
|
||||
title = menuTitle,
|
||||
@@ -82,7 +90,7 @@ function OpenLSMenu(elems, menuName, menuTitle, parent)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
if isRimMod then
|
||||
price = math.floor(vehiclePrice * data.current.price / 100)
|
||||
TriggerServerEvent('esx_lscustom:buyMod', price)
|
||||
@@ -120,6 +128,7 @@ function OpenLSMenu(elems, menuName, menuTitle, parent)
|
||||
lsMenuIsShowed = false
|
||||
local vehicle = GetVehiclePedIsIn(PlayerPedId(), false)
|
||||
FreezeEntityPosition(vehicle, false)
|
||||
TriggerServerEvent('esx_lscustom:stopModing', myCar.plate)
|
||||
myCar = {}
|
||||
end
|
||||
end, function(data, menu) -- on change
|
||||
@@ -154,6 +163,14 @@ function UpdateMods(data)
|
||||
props['modSmokeEnabled'] = true
|
||||
ESX.Game.SetVehicleProperties(vehicle, props)
|
||||
props = {}
|
||||
elseif data.modType == 'xenonColor' then
|
||||
if data.modNum then
|
||||
props['modXenon'] = true
|
||||
else
|
||||
props['modXenon'] = false
|
||||
end
|
||||
ESX.Game.SetVehicleProperties(vehicle, props)
|
||||
props = {}
|
||||
end
|
||||
|
||||
props[data.modType] = data.modNum
|
||||
@@ -170,7 +187,6 @@ function GetAction(data)
|
||||
local playerPed = PlayerPedId()
|
||||
local vehicle = GetVehiclePedIsIn(playerPed, false)
|
||||
local currentMods = ESX.Game.GetVehicleProperties(vehicle)
|
||||
|
||||
if data.value == 'modSpeakers' or data.value == 'modTrunk' or data.value == 'modHydrolic' or data.value ==
|
||||
'modEngineBlock' or data.value == 'modAirFilter' or data.value == 'modStruts' or data.value == 'modTank' then
|
||||
SetVehicleDoorOpen(vehicle, 4, false)
|
||||
@@ -203,7 +219,7 @@ function GetAction(data)
|
||||
|
||||
if v.modType then
|
||||
|
||||
if v.modType == 22 then
|
||||
if v.modType == 22 or v.modType == 'xenonColor' then
|
||||
table.insert(elements, {
|
||||
label = " " .. TranslateCap('by_default'),
|
||||
modType = k,
|
||||
@@ -229,6 +245,14 @@ function GetAction(data)
|
||||
modType = k,
|
||||
modNum = false
|
||||
})
|
||||
elseif v.modType == 23 then
|
||||
table.insert(elements, {
|
||||
label = " " .. TranslateCap('by_default'),
|
||||
modType = "modFrontWheels",
|
||||
modNum = -1,
|
||||
wheelType = -1,
|
||||
price = Config.DefaultWheelsPriceMultiplier
|
||||
})
|
||||
else
|
||||
table.insert(elements, {
|
||||
label = " " .. TranslateCap('by_default'),
|
||||
@@ -282,6 +306,16 @@ function GetAction(data)
|
||||
modType = k,
|
||||
modNum = true
|
||||
})
|
||||
elseif v.modType == 'xenonColor' then -- XENON COLOR
|
||||
local xenonColors = GetXenonColors()
|
||||
price = math.floor(vehiclePrice * v.price / 100)
|
||||
for i = 1, #xenonColors, 1 do
|
||||
table.insert(elements, {
|
||||
label = xenonColors[i].label .. ' - <span style="color:green;">$' .. price .. '</span>',
|
||||
modType = k,
|
||||
modNum = xenonColors[i].index
|
||||
})
|
||||
end
|
||||
elseif v.modType == 'neonColor' or v.modType == 'tyreSmokeColor' then -- NEON & SMOKE COLOR
|
||||
local neons = GetNeons()
|
||||
price = math.floor(vehiclePrice * v.price / 100)
|
||||
@@ -503,6 +537,9 @@ CreateThread(function()
|
||||
local vehicle = GetVehiclePedIsIn(playerPed, false)
|
||||
FreezeEntityPosition(vehicle, true)
|
||||
myCar = ESX.Game.GetVehicleProperties(vehicle)
|
||||
|
||||
local netId = NetworkGetNetworkIdFromEntity(vehicle)
|
||||
TriggerServerEvent('esx_lscustom:startModing', myCar, netId)
|
||||
|
||||
ESX.UI.Menu.CloseAll()
|
||||
GetAction({
|
||||
@@ -524,7 +561,7 @@ CreateThread(function()
|
||||
DisableControlAction(0, 75, true) -- Disable exit vehicle
|
||||
DisableControlAction(27, 75, true) -- Disable exit vehicle
|
||||
end
|
||||
Wait(0)
|
||||
Wait(Sleep)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -68,6 +68,8 @@ Config.Colors = {
|
||||
{label = TranslateCap('gold'), value = 'gold'}
|
||||
}
|
||||
|
||||
Config.DefaultWheelsPriceMultiplier = 2
|
||||
|
||||
function GetColors(color)
|
||||
local colors = {}
|
||||
if color == 'black' then
|
||||
@@ -425,6 +427,27 @@ function GetNeons()
|
||||
return neons
|
||||
end
|
||||
|
||||
function GetXenonColors()
|
||||
local xenonColors = {
|
||||
{label = TranslateCap('neon'), index = -1},
|
||||
{label = TranslateCap('white'), index = 0},
|
||||
{label = TranslateCap('blue'), index = 1},
|
||||
{label = TranslateCap('electric_blue'), index = 2},
|
||||
{label = TranslateCap('mintgreen'), index = 3},
|
||||
{label = TranslateCap('lime_green'), index = 4},
|
||||
{label = TranslateCap('yellow'), index = 5},
|
||||
{label = TranslateCap('goldenshower'), index = 6},
|
||||
{label = TranslateCap('orange'), index = 7},
|
||||
{label = TranslateCap('red'), index = 8},
|
||||
{label = TranslateCap('ponypink'), index = 9},
|
||||
{label = TranslateCap('hotpink'), index = 10},
|
||||
{label = TranslateCap('purple'), index = 11},
|
||||
{label = TranslateCap('blacklight'), index = 11},
|
||||
}
|
||||
|
||||
return xenonColors
|
||||
end
|
||||
|
||||
function GetPlatesName(index)
|
||||
if (index == 0) then
|
||||
return TranslateCap('blue_on_white_1')
|
||||
@@ -500,7 +523,8 @@ Config.Menus = {
|
||||
modHorns = TranslateCap('horns'),
|
||||
neonColor = TranslateCap('neons'),
|
||||
resprays = TranslateCap('respray'),
|
||||
modXenon = TranslateCap('headlights'),
|
||||
-- modXenon = TranslateCap('headlights'),
|
||||
xenonColor = TranslateCap('headlights'),
|
||||
plateIndex = TranslateCap('licenseplates'),
|
||||
wheels = TranslateCap('wheels'),
|
||||
modPlateHolder = TranslateCap('modplateholder'),
|
||||
@@ -801,6 +825,12 @@ Config.Menus = {
|
||||
modType = 22,
|
||||
price = 3.72
|
||||
},
|
||||
xenonColor = {
|
||||
label = TranslateCap('headlights'),
|
||||
parent = 'cosmetics',
|
||||
modType = 'xenonColor',
|
||||
price = 3.72
|
||||
},
|
||||
bodyparts = {
|
||||
label = TranslateCap('bodyparts'),
|
||||
parent = 'cosmetics',
|
||||
|
||||
@@ -266,4 +266,11 @@ Locales['br'] = {
|
||||
['fuel_tank'] = 'tanque de combustível',
|
||||
['windows'] = 'janelas',
|
||||
['stickers'] = 'autocolantes',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -266,4 +266,11 @@ Locales['de'] = {
|
||||
['fuel_tank'] = 'Treibstofftank',
|
||||
['windows'] = 'Fenster',
|
||||
['stickers'] = 'Designs',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -266,4 +266,11 @@ Locales['en'] = {
|
||||
['fuel_tank'] = 'fuel tank',
|
||||
['windows'] = 'windows',
|
||||
['stickers'] = 'Livery',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -266,4 +266,11 @@ Locales['es'] = {
|
||||
['fuel_tank'] = 'depósito de combustible',
|
||||
['windows'] = 'ventanas',
|
||||
['stickers'] = 'calcomanías',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -0,0 +1,269 @@
|
||||
Locales['et'] = {
|
||||
['by_default'] = 'Tavaline',
|
||||
['installed'] = 'Lisatud',
|
||||
['already_own'] = 'Sa juba omad seda: ~b~%s~s~',
|
||||
['not_enough_money'] = 'Sa ei saa seda modi lisada kuna sul pole piisavalt raha!',
|
||||
['purchased'] = 'Sa ostsid modi!',
|
||||
['press_custom'] = 'Vajuta ~g~[E]~s~, et tuunida sõidukit.',
|
||||
['level'] = 'Level %s',
|
||||
['neon'] = 'Neoon',
|
||||
['blip_name'] = 'Mehaanik',
|
||||
-- Värvid
|
||||
-- Must
|
||||
['black'] = 'Must',
|
||||
['graphite'] = 'Grafiit',
|
||||
['black_metallic'] = 'Metallne Must',
|
||||
['caststeel'] = 'Valatud Teras',
|
||||
['black_anth'] = 'Antratsiitmust',
|
||||
['matteblack'] = 'Mattmust',
|
||||
['darknight'] = 'Must Öö',
|
||||
['deepblack'] = 'Sügav Must',
|
||||
['oil'] = 'Oil must',
|
||||
['carbon'] = 'Süsinik must',
|
||||
-- Valge
|
||||
['white'] = 'Valge',
|
||||
['vanilla'] = 'Vanilla',
|
||||
['creme'] = 'Kreem valge',
|
||||
['polarwhite'] = 'Polaar valge',
|
||||
['beige'] = 'Beez',
|
||||
['mattewhite'] = 'Matt valge',
|
||||
['snow'] = 'Lumivalge',
|
||||
['cotton'] = 'Puuvill',
|
||||
['alabaster'] = 'Alabaster valge',
|
||||
['purewhite'] = 'Puhas valge',
|
||||
-- Hall
|
||||
['grey'] = 'Hall',
|
||||
['silver'] = 'Hõbe',
|
||||
['metallicgrey'] = 'Metallne Hall',
|
||||
['laminatedsteel'] = 'Lamineeritud Teras',
|
||||
['darkgray'] = 'Tumehall',
|
||||
['rockygray'] = 'Kivine Hall',
|
||||
['graynight'] = 'Öö Hall',
|
||||
['aluminum'] = 'Alumiinium Hall',
|
||||
['graymat'] = 'Matthall',
|
||||
['lightgrey'] = 'Helehall',
|
||||
['asphaltgray'] = 'Asfalt Hall',
|
||||
['grayconcrete'] = 'Hall Betoon',
|
||||
['darksilver'] = 'Tume Hõbe',
|
||||
['magnesite'] = 'Magnesiit Hall',
|
||||
['nickel'] = 'Nikli Hall',
|
||||
['zinc'] = 'Tsink Hall',
|
||||
['dolomite'] = 'Dolomiit Hall',
|
||||
['bluesilver'] = 'Sinine Hõbe',
|
||||
['titanium'] = 'Titaanium',
|
||||
['steelblue'] = 'Sini-hall Teras',
|
||||
['champagne'] = 'Šampuse Hall',
|
||||
['grayhunter'] = 'Küttija Hall',
|
||||
-- Punane
|
||||
['red'] = 'Punane',
|
||||
['torino_red'] = 'Torino Punane',
|
||||
['poppy'] = 'Mooni Punane',
|
||||
['copper_red'] = 'Vask Punane',
|
||||
['cardinal'] = 'Kardinal Punane',
|
||||
['brick'] = 'Telliskivi Punane',
|
||||
['garnet'] = 'Granaat Punane',
|
||||
['cabernet'] = 'Cabernet Punane',
|
||||
['candy'] = 'Kommi Punane',
|
||||
['matte_red'] = 'Mattpunane',
|
||||
['dark_red'] = 'Tumepunane',
|
||||
['red_pulp'] = 'Liha Punane',
|
||||
['bril_red'] = 'Briljant Punane',
|
||||
['pale_red'] = 'Kahvatu Punane',
|
||||
['wine_red'] = 'Veini Punane',
|
||||
['volcano'] = 'Vulkaani Punane',
|
||||
-- Roosa
|
||||
['pink'] = 'Roosa',
|
||||
['electricpink'] = 'Elektri roosa',
|
||||
['brightpink'] = 'Erkroosa',
|
||||
['salmon'] = 'Lõhe Roosa',
|
||||
['sugarplum'] = 'Magus Ploom',
|
||||
-- Sinine
|
||||
['blue'] = 'Sinine',
|
||||
['topaz'] = 'Topaas Sinine',
|
||||
['light_blue'] = 'Helesinine',
|
||||
['galaxy_blue'] = 'Galaktika Sinine',
|
||||
['dark_blue'] = 'Tumesinine',
|
||||
['azure'] = 'Taevasina Sinine',
|
||||
['navy_blue'] = 'Mereväe Sinine',
|
||||
['lapis'] = 'Lapis Sinine',
|
||||
['blue_diamond'] = 'Sinine Teemant',
|
||||
['surfer'] = 'Surfari Sinine',
|
||||
['pastel_blue'] = 'Pastell Sinine',
|
||||
['celeste_blue'] = 'Celeste Sinine',
|
||||
['rally_blue'] = 'Ralli Sinine',
|
||||
['blue_paradise'] = 'Sinine Paradiis',
|
||||
['blue_night'] = 'Öö Sinine',
|
||||
['cyan_blue'] = 'Tsuaansinine',
|
||||
['cobalt'] = 'Kobalt Sinine',
|
||||
['electric_blue'] = 'Elektri Sinine',
|
||||
['horizon_blue'] = 'Horisondi Sinine',
|
||||
['metallic_blue'] = 'Metallne Sinine',
|
||||
['aquamarine'] = 'Akvamariin Sinine',
|
||||
['blue_agathe'] = 'Agathe Sinine',
|
||||
['zirconium'] = 'Tsirkoonium Sinine',
|
||||
['spinel'] = 'Spinell Sinine',
|
||||
['tourmaline'] = 'Turmaliin Sinine',
|
||||
['paradise'] = 'Paradiisi Sinine',
|
||||
['bubble_gum'] = 'Nätsu Sinine',
|
||||
['midnight_blue'] = 'Kesköö Sinine',
|
||||
['forbidden_blue'] = 'Keelatud Sinine',
|
||||
['glacier_blue'] = 'Liustiku Sinine',
|
||||
-- Kollane
|
||||
['yellow'] = 'Kollane',
|
||||
['wheat'] = 'Nisukollane',
|
||||
['raceyellow'] = 'Ralli Kollane',
|
||||
['paleyellow'] = 'Kahvatu Kollane',
|
||||
['lightyellow'] = 'Helekollane',
|
||||
-- Green
|
||||
['green'] = 'Roheline',
|
||||
['met_dark_green'] = 'Tumeroheline Metall',
|
||||
['rally_green'] = 'Ralli Roheline',
|
||||
['pine_green'] = 'Kuuse Roheline',
|
||||
['olive_green'] = 'Oliivi Roheline',
|
||||
['light_green'] = 'Hele Roheline',
|
||||
['lime_green'] = 'Laimi Roheline',
|
||||
['forest_green'] = 'Metsa Roheline',
|
||||
['lawn_green'] = 'Muru Roheline',
|
||||
['imperial_green'] = 'Keiserlik Roheline',
|
||||
['green_bottle'] = 'Klaaspudeli Roheline',
|
||||
['citrus_green'] = 'Tsitruse Roheline',
|
||||
['green_anis'] = 'Roheline Aniis',
|
||||
['khaki'] = 'Khaki Roheline',
|
||||
['army_green'] = 'Sõjaväe Roheline',
|
||||
['dark_green'] = 'Tumeroheline',
|
||||
['hunter_green'] = 'Jahi Roheline',
|
||||
['matte_foilage_green'] = 'Matt Lehestiku Roheline',
|
||||
-- Orange
|
||||
['orange'] = 'Oranž',
|
||||
['tangerine'] = 'Mandariini Oranž',
|
||||
['matteorange'] = 'Mattoranž',
|
||||
['lightorange'] = 'Heleoranž',
|
||||
['peach'] = 'Virsiku Oranž',
|
||||
['pumpkin'] = 'Kõrvitsa Oranž',
|
||||
['orangelambo'] = 'Oranž Lamborghini',
|
||||
-- Brown
|
||||
['brown'] = 'Pruun',
|
||||
['copper'] = 'Vask',
|
||||
['lightbrown'] = 'Helepruun',
|
||||
['darkbrown'] = 'Tumepruun',
|
||||
['bronze'] = 'Pronks',
|
||||
['brownmetallic'] = 'Pruun Metall',
|
||||
['espresso'] = 'Espresso Pruun',
|
||||
['chocolate'] = 'Šokolaadi Pruun',
|
||||
['terracotta'] = 'Terrakota Pruun',
|
||||
['marble'] = 'Pruun Marmor',
|
||||
['sand'] = 'Pruun Liiv',
|
||||
['sepia'] = 'Pruun Seepia',
|
||||
['bison'] = 'Piisoni Pruun',
|
||||
['palm'] = 'Pruun Palm',
|
||||
['caramel'] = 'Pruun Karamell',
|
||||
['rust'] = 'Pruun Rooste',
|
||||
['chestnut'] = 'Pruun Kastan',
|
||||
['hazelnut'] = 'Pruun Sarapuupähkel',
|
||||
['shell'] = 'Pruun Karp',
|
||||
['mahogany'] = 'Pruun Mahagon',
|
||||
['cauldron'] = 'Pruun Kastrul',
|
||||
['blond'] = 'Blond',
|
||||
['gravel'] = 'Kruus',
|
||||
['darkearth'] = 'Tume Maa',
|
||||
['desert'] = 'Kõrb',
|
||||
-- Purple
|
||||
['purple'] = 'Lilla',
|
||||
['indigo'] = 'Indigo',
|
||||
['deeppurple'] = 'Sügav Lilla',
|
||||
['darkviolet'] = 'Tume Violett',
|
||||
['amethyst'] = 'Ametüst',
|
||||
['mysticalviolet'] = 'Müstiline Violett',
|
||||
['purplemetallic'] = 'Lilla Metall',
|
||||
['matteviolet'] = 'Mattviolett',
|
||||
['mattedeeppurple'] = 'Matt Sügav Lilla',
|
||||
-- Chrome
|
||||
['chrome'] = 'Kroom',
|
||||
['brushedchrome'] = 'Harjatud Kroom',
|
||||
['blackchrome'] = 'Must Kroom',
|
||||
['brushedaluminum'] = 'Harjatud Alumiinium',
|
||||
-- Metal
|
||||
['gold'] = 'Kuld',
|
||||
['puregold'] = 'Puhas Kuld',
|
||||
['brushedgold'] = 'Harjatud Kuld',
|
||||
['lightgold'] = 'Õrn Kuld',
|
||||
-- License Plates
|
||||
['blue_on_white_1'] = 'Sinine Valge peal 1',
|
||||
['yellow_on_black'] = 'Kollane Musta peal',
|
||||
['yellow_blue'] = 'Kollane Sinise peal',
|
||||
['blue_on_white_2'] = 'Sinine Valge peal 2',
|
||||
['blue_on_white_3'] = 'Sinine Valge peal 3',
|
||||
-- Upgrades
|
||||
['upgrades'] = 'Uuendused',
|
||||
['engine'] = 'Mootor',
|
||||
['brakes'] = 'Pidurid',
|
||||
['transmission'] = 'Käigukast',
|
||||
['suspension'] = 'Vedrustus',
|
||||
['armor'] = 'Kere',
|
||||
['turbo'] = 'Turbo',
|
||||
['no_turbo'] = 'Turbo eemaldatud',
|
||||
-- Cosmetics
|
||||
['cosmetics'] = 'Kosmeetikud',
|
||||
-- Body Parts
|
||||
['bodyparts'] = 'Auto osad',
|
||||
['leftfender'] = 'Vasakpoolne Poritiib',
|
||||
['rightfender'] = 'Parempoolne Poritiib',
|
||||
['spoilers'] = 'Spoilerid',
|
||||
['sideskirt'] = 'Küljekarbid',
|
||||
['cage'] = 'Puur',
|
||||
['hood'] = 'Kapott',
|
||||
['grille'] = 'Võre',
|
||||
['rearbumper'] = 'Taga Stange',
|
||||
['frontbumper'] = 'Esi Stange',
|
||||
['exhaust'] = 'Summuti',
|
||||
['roof'] = 'Katus',
|
||||
-- Paint
|
||||
['respray'] = 'Ülevärvimine/Värv',
|
||||
['primary'] = 'Esmane',
|
||||
['secondary'] = 'Sekundaarne',
|
||||
['pearlescent'] = 'Läige',
|
||||
-- Misc
|
||||
['headlights'] = 'Esituled',
|
||||
['licenseplates'] = 'Numbrimärk',
|
||||
['windowtint'] = 'Toonaknad',
|
||||
['horns'] = 'Signaal',
|
||||
-- Neon
|
||||
['neons'] = 'Neoonid/Ledid',
|
||||
-- Wheels
|
||||
['wheels'] = 'Rattad',
|
||||
['tiresmoke'] = 'Rehvi Toss',
|
||||
['wheel_type'] = 'Ratta Tüüp',
|
||||
['wheel_color'] = 'Ratta Värv',
|
||||
['sport'] = 'Sport',
|
||||
['muscle'] = 'Muskel',
|
||||
['lowrider'] = 'lowrider',
|
||||
['suv'] = 'SUV',
|
||||
['allterrain'] = 'Igal Maastikul',
|
||||
['tuning'] = 'Tuuner',
|
||||
['motorcycle'] = 'Mootorrattad',
|
||||
['highend'] = 'Tipptasemel',
|
||||
|
||||
['modplateholder'] = 'Numbrimärk - Taga',
|
||||
['modvanityplate'] = 'Numbrimärk - Ees',
|
||||
['interior'] = 'Sisustus',
|
||||
['trim'] = 'Polstrid',
|
||||
['dashboard'] = 'Armatuur',
|
||||
['speedometer'] = 'Spidomeeter',
|
||||
['door_speakers'] = 'Ukse Kõlarid',
|
||||
['seats'] = 'Istmed',
|
||||
['steering_wheel'] = 'Rool',
|
||||
['gear_lever'] = 'Käigukang',
|
||||
['quarter_deck'] = 'Sõiduki Kast',
|
||||
['speakers'] = 'Kõlarid',
|
||||
['trunk'] = 'Bagasnik',
|
||||
['hydraulic'] = 'Hüdraulika',
|
||||
['engine_block'] = 'Mootoriplokk',
|
||||
['air_filter'] = 'Õhu Filtrid',
|
||||
['struts'] = 'Tugipostid',
|
||||
['arch_cover'] = 'Kaare kate',
|
||||
['aerials'] = 'Areaalid',
|
||||
['wings'] = 'Tiivad',
|
||||
['fuel_tank'] = 'Tankimispaak',
|
||||
['windows'] = 'Aknad',
|
||||
['stickers'] = 'Kleepsud',
|
||||
}
|
||||
@@ -266,4 +266,11 @@ Locales['fr'] = {
|
||||
['fuel_tank'] = 'bouchon du réservoir',
|
||||
['windows'] = 'fenêtres',
|
||||
['stickers'] = 'autocollants',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -266,4 +266,11 @@ Locales['hu'] = {
|
||||
['fuel_tank'] = 'üzemanyag tartály',
|
||||
['windows'] = 'ablakok',
|
||||
['stickers'] = 'matricák',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
Locales['it'] = {
|
||||
['by_default'] = 'default',
|
||||
['installed'] = 'installato',
|
||||
['already_own'] = 'possiedi già: %s',
|
||||
['not_enough_money'] = 'non puoi permetterti questa mod!',
|
||||
['purchased'] = 'hai acquistato la mod!',
|
||||
['press_custom'] = 'premi ~b~[E]~s~ per personalizzare il tuo veicolo',
|
||||
['level'] = 'livello %s',
|
||||
['neon'] = 'neon',
|
||||
['blip_name'] = 'los Santos Customs',
|
||||
-- Paint Colors
|
||||
-- Black
|
||||
['black'] = 'nero',
|
||||
['graphite'] = 'grafite',
|
||||
['black_metallic'] = 'nero metallico',
|
||||
['caststeel'] = 'acciaio fuso',
|
||||
['black_anth'] = 'nero antacite',
|
||||
['matteblack'] = 'nero opaco',
|
||||
['darknight'] = 'notte oscura',
|
||||
['deepblack'] = 'nero profondo',
|
||||
['oil'] = 'olio',
|
||||
['carbon'] = 'carbonio',
|
||||
-- White
|
||||
['white'] = 'bianco',
|
||||
['vanilla'] = 'vaniglia',
|
||||
['creme'] = 'crema',
|
||||
['polarwhite'] = 'bianco polare',
|
||||
['beige'] = 'beige',
|
||||
['mattewhite'] = 'bianco opaco',
|
||||
['snow'] = 'neve',
|
||||
['cotton'] = 'cotone',
|
||||
['alabaster'] = 'alabastro',
|
||||
['purewhite'] = 'bianco puro',
|
||||
-- Grey
|
||||
['grey'] = 'grigio',
|
||||
['silver'] = 'argento',
|
||||
['metallicgrey'] = 'grigio metallico',
|
||||
['laminatedsteel'] = 'acciaio laminato',
|
||||
['darkgray'] = 'grigio scuro',
|
||||
['rockygray'] = 'grigio roccioso',
|
||||
['graynight'] = 'grigio notte',
|
||||
['aluminum'] = 'alluminio',
|
||||
['graymat'] = 'grigio opaco',
|
||||
['lightgrey'] = 'grigio chiaro',
|
||||
['asphaltgray'] = 'grigio asfalto',
|
||||
['grayconcrete'] = 'grigio cemento',
|
||||
['darksilver'] = 'argento scuro',
|
||||
['magnesite'] = 'magnesite',
|
||||
['nickel'] = 'nickel',
|
||||
['zinc'] = 'zinco',
|
||||
['dolomite'] = 'dolomite',
|
||||
['bluesilver'] = 'argento blu',
|
||||
['titanium'] = 'titanio',
|
||||
['steelblue'] = 'blu acciaio',
|
||||
['champagne'] = 'champagne',
|
||||
['grayhunter'] = 'grigio cacciatore',
|
||||
-- Red
|
||||
['red'] = 'rosso',
|
||||
['torino_red'] = 'rosso torino',
|
||||
['poppy'] = 'papavero',
|
||||
['copper_red'] = 'rosso rame',
|
||||
['cardinal'] = 'rosso cardinale',
|
||||
['brick'] = 'rosso mattone',
|
||||
['garnet'] = 'Granato',
|
||||
['cabernet'] = 'rosso cabernet',
|
||||
['candy'] = 'caramella rossa',
|
||||
['matte_red'] = 'rosso opaco',
|
||||
['dark_red'] = 'rosso scuro',
|
||||
['red_pulp'] = 'polpa rossa',
|
||||
['bril_red'] = 'rosso brillante',
|
||||
['pale_red'] = 'rosso pallido',
|
||||
['wine_red'] = 'vino rosso',
|
||||
['volcano'] = 'vulcano',
|
||||
-- Pink
|
||||
['pink'] = 'rosa',
|
||||
['electricpink'] = 'rosa elettrico',
|
||||
['brightpink'] = 'rosa brillante',
|
||||
['salmon'] = 'rosa salmone',
|
||||
['sugarplum'] = 'rosa prugna',
|
||||
-- Blue
|
||||
['blue'] = 'blu',
|
||||
['topaz'] = 'blu topazio',
|
||||
['light_blue'] = 'azzurro',
|
||||
['galaxy_blue'] = 'blu galassia',
|
||||
['dark_blue'] = 'blu scuro',
|
||||
['azure'] = 'azzurro',
|
||||
['navy_blue'] = 'blu marino',
|
||||
['lapis'] = 'blu lapislazzulo',
|
||||
['blue_diamond'] = 'blu diamante',
|
||||
['surfer'] = 'surfista',
|
||||
['pastel_blue'] = 'blu pastello',
|
||||
['celeste_blue'] = 'blu celeste',
|
||||
['rally_blue'] = 'rally Blue',
|
||||
['blue_paradise'] = 'blu Paradiso',
|
||||
['blue_night'] = 'blu notte',
|
||||
['cyan_blue'] = 'blu ciano',
|
||||
['cobalt'] = 'cobalto',
|
||||
['electric_blue'] = 'blue elettrico',
|
||||
['horizon_blue'] = 'blu orizzonte',
|
||||
['metallic_blue'] = 'blu metallico',
|
||||
['aquamarine'] = 'acquamarina',
|
||||
['blue_agathe'] = 'blu agata',
|
||||
['zirconium'] = 'zirconio',
|
||||
['spinel'] = 'spinello',
|
||||
['tourmaline'] = 'tormalina',
|
||||
['paradise'] = 'paradiso',
|
||||
['bubble_gum'] = 'blu gomma',
|
||||
['midnight_blue'] = 'blu mezzanotte',
|
||||
['forbidden_blue'] = 'blu proibito',
|
||||
['glacier_blue'] = 'blu glaciale',
|
||||
-- Yellow
|
||||
['yellow'] = 'giallo',
|
||||
['wheat'] = 'giallo grano',
|
||||
['raceyellow'] = 'giallo gara',
|
||||
['paleyellow'] = 'giallo pallido',
|
||||
['lightyellow'] = 'giallo chiaro',
|
||||
-- Green
|
||||
['green'] = 'verde',
|
||||
['met_dark_green'] = 'verde scuro metallico',
|
||||
['rally_green'] = 'verde Rally',
|
||||
['pine_green'] = 'verde pino',
|
||||
['olive_green'] = 'verde oliva',
|
||||
['light_green'] = 'verde chiaro',
|
||||
['lime_green'] = 'verde lime',
|
||||
['forest_green'] = 'verde foresta',
|
||||
['lawn_green'] = 'verde prato',
|
||||
['imperial_green'] = 'verde imperiale',
|
||||
['green_bottle'] = 'verde bottiglia',
|
||||
['citrus_green'] = 'verde agrumi',
|
||||
['green_anis'] = 'verde anici',
|
||||
['khaki'] = 'cachi',
|
||||
['army_green'] = 'verde militare',
|
||||
['dark_green'] = 'verde scuro',
|
||||
['hunter_green'] = 'verde cacciatore',
|
||||
['matte_foilage_green'] = 'verde foglia',
|
||||
-- Orange
|
||||
['orange'] = 'arancione',
|
||||
['tangerine'] = 'mandarino',
|
||||
['matteorange'] = 'arancio opaco',
|
||||
['lightorange'] = 'arancione chiaro',
|
||||
['peach'] = 'pesca',
|
||||
['pumpkin'] = 'zucca',
|
||||
['orangelambo'] = 'arancione Lambo',
|
||||
-- Brown
|
||||
['brown'] = 'marrone',
|
||||
['copper'] = 'rame',
|
||||
['lightbrown'] = 'marrone chiaro',
|
||||
['darkbrown'] = 'marrone scuro',
|
||||
['bronze'] = 'Bronzo',
|
||||
['brownmetallic'] = 'marrone metallico',
|
||||
['expresso'] = 'Espresso',
|
||||
['chocolate'] = 'cioccolato',
|
||||
['terracotta'] = 'Terracotta',
|
||||
['marble'] = 'Marmo',
|
||||
['sand'] = 'Sabbia',
|
||||
['sepia'] = 'Seppia',
|
||||
['bison'] = 'Bisonte',
|
||||
['palm'] = 'Palmo',
|
||||
['caramel'] = 'Caramello',
|
||||
['rust'] = 'Ruggine',
|
||||
['chestnut'] = 'Castagna',
|
||||
['hazelnut'] = 'nocciola',
|
||||
['shell'] = 'guscio',
|
||||
['mahogany'] = 'Mogano',
|
||||
['cauldron'] = 'marrone calderone',
|
||||
['blond'] = 'marrone biondo',
|
||||
['gravel'] = 'marrone ghiaia',
|
||||
['darkearth'] = 'marrone terra scura',
|
||||
['desert'] = 'deserto',
|
||||
-- Purple
|
||||
['purple'] = 'viola',
|
||||
['indigo'] = 'Indaco',
|
||||
['deeppurple'] = 'viola intenso',
|
||||
['darkviolet'] = 'viola scuro',
|
||||
['amethyst'] = 'emetista',
|
||||
['mysticalviolet'] = 'viola mistico',
|
||||
['purplemetallic'] = 'viola metallico',
|
||||
['matteviolet'] = 'viola opaco',
|
||||
['mattedeeppurple'] = 'viola intenso opaco',
|
||||
-- Chrome
|
||||
['chrome'] = 'cromato',
|
||||
['brushedchrome'] = 'cromato spazzolato',
|
||||
['blackchrome'] = 'nero gromato',
|
||||
['brushedaluminum'] = 'alluminio spazzolato',
|
||||
-- Metal
|
||||
['gold'] = 'oro',
|
||||
['puregold'] = 'oro puro',
|
||||
['brushedgold'] = 'oro spazzolato',
|
||||
['lightgold'] = 'oro chiaro',
|
||||
-- License Plates
|
||||
['blue_on_white_1'] = 'blu su bianco 1',
|
||||
['yellow_on_black'] = 'giallo su nero',
|
||||
['yellow_blue'] = 'giallo su blu',
|
||||
['blue_on_white_2'] = 'blu su bianco 2',
|
||||
['blue_on_white_3'] = 'blu su bianco 3',
|
||||
-- Upgrades
|
||||
['upgrades'] = 'aggiornamenti',
|
||||
['engine'] = 'motore',
|
||||
['brakes'] = 'freni',
|
||||
['transmission'] = 'trasmissione',
|
||||
['suspension'] = 'ssospensione',
|
||||
['armor'] = 'armatura',
|
||||
['turbo'] = 'turbo',
|
||||
['no_turbo'] = 'no turbo',
|
||||
-- Cosmetics
|
||||
['cosmetics'] = 'cosmetici',
|
||||
-- Body Parts
|
||||
['bodyparts'] = 'parti del corpo',
|
||||
['leftfender'] = 'parafango sinistro',
|
||||
['rightfender'] = 'parafango destro',
|
||||
['spoilers'] = 'spoiler',
|
||||
['sideskirt'] = 'gonna laterale',
|
||||
['cage'] = 'gabbia',
|
||||
['hood'] = 'cappuccio',
|
||||
['grille'] = 'griglia',
|
||||
['rearbumper'] = 'paraurti posteriore',
|
||||
['frontbumper'] = 'paraurti anteriore',
|
||||
['exhaust'] = 'scarico',
|
||||
['roof'] = 'tetto',
|
||||
-- Paint
|
||||
['respray'] = 'verici',
|
||||
['primary'] = 'primaria',
|
||||
['secondary'] = 'secondaria',
|
||||
['pearlescent'] = 'perlescente',
|
||||
-- Misc
|
||||
['headlights'] = 'fari',
|
||||
['licenseplates'] = 'targa',
|
||||
['windowtint'] = 'tinta finestrino',
|
||||
['horns'] = 'clacson',
|
||||
-- Neon
|
||||
['neons'] = 'neons',
|
||||
-- Wheels
|
||||
['wheels'] = 'ruote',
|
||||
['tiresmoke'] = 'fumo pneumatici',
|
||||
['wheel_type'] = 'tipo di ruota',
|
||||
['wheel_color'] = 'colore cerchione',
|
||||
['sport'] = 'sport',
|
||||
['muscle'] = 'muscle',
|
||||
['lowrider'] = 'lowrider',
|
||||
['suv'] = 'SUV',
|
||||
['allterrain'] = 'tutti i terreni',
|
||||
['tuning'] = 'tuning',
|
||||
['motorcycle'] = 'moto',
|
||||
['highend'] = 'fascia alta',
|
||||
|
||||
['modplateholder'] = 'targa - posteriore',
|
||||
['modvanityplate'] = 'targa - anteriore',
|
||||
['interior'] = 'interni',
|
||||
['trim'] = 'trim',
|
||||
['dashboard'] = 'cruscotto',
|
||||
['speedometer'] = 'tachimetro',
|
||||
['door_speakers'] = 'casse audio',
|
||||
['seats'] = 'sedili',
|
||||
['steering_wheel'] = 'volante',
|
||||
['gear_lever'] = 'leva del cambio',
|
||||
['quarter_deck'] = 'quarter-deck',
|
||||
['speakers'] = 'altoparlanti',
|
||||
['trunk'] = 'tronco',
|
||||
['hydraulic'] = 'idraulica',
|
||||
['engine_block'] = 'blocco motore',
|
||||
['air_filter'] = 'filtro aria',
|
||||
['struts'] = 'puntoni',
|
||||
['arch_cover'] = 'cover',
|
||||
['aerials'] = 'antenne',
|
||||
['wings'] = 'ali',
|
||||
['fuel_tank'] = 'serbatoio carburante',
|
||||
['windows'] = 'finestrini',
|
||||
['stickers'] = 'Livrea',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
@@ -266,4 +266,11 @@ Locales['pl'] = {
|
||||
['fuel_tank'] = 'zbiornik paliwa',
|
||||
['windows'] = 'okna',
|
||||
['stickers'] = 'naklejki',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -266,4 +266,11 @@ Locales['si'] = {
|
||||
['fuel_tank'] = 'rezervoar za gorivo',
|
||||
['windows'] = 'okna',
|
||||
['stickers'] = 'nalepke',
|
||||
|
||||
-- Xenon Colors
|
||||
['mintgreen'] = 'Mint Green',
|
||||
['goldenshower'] = 'Golden Shower',
|
||||
['ponypink'] = 'Pony Pink',
|
||||
['hotpink'] = 'Hot Pink',
|
||||
['blacklight'] = 'Blacklight',
|
||||
}
|
||||
|
||||
@@ -1,4 +1,40 @@
|
||||
local Vehicles
|
||||
local Customs = {}
|
||||
|
||||
RegisterNetEvent('esx_lscustom:startModing', function(props, netId)
|
||||
local src = tostring(source)
|
||||
if Customs[src] then
|
||||
Customs[src][props.plate] = {props = props, netId = netId}
|
||||
else
|
||||
Customs[src] = {}
|
||||
Customs[src][props.plate] = {props = props, netId = netId}
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_lscustom:stopModing', function(plate)
|
||||
local src = tostring(source)
|
||||
if Customs[src] then
|
||||
Customs[src][tostring(plate)] = nil
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:playerDropped', function(src)
|
||||
src = tostring(src)
|
||||
local playersCount = #ESX.GetExtendedPlayers()
|
||||
if Customs[src] then
|
||||
for k,v in pairs(Customs[src]) do
|
||||
local entity = NetworkGetEntityFromNetworkId(v.netId)
|
||||
if DoesEntityExist(entity) then
|
||||
if playersCount > 0 then
|
||||
TriggerClientEvent('esx_lscustom:restoreMods', -1, v.netId, v.props)
|
||||
else
|
||||
DeleteEntity(entity)
|
||||
end
|
||||
end
|
||||
end
|
||||
Customs[src] = nil
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_lscustom:buyMod')
|
||||
AddEventHandler('esx_lscustom:buyMod', function(price)
|
||||
@@ -41,9 +77,9 @@ AddEventHandler('esx_lscustom:refreshOwnedVehicle', function(vehicleProps)
|
||||
function(result)
|
||||
if result then
|
||||
local vehicle = json.decode(result.vehicle)
|
||||
|
||||
if vehicleProps.model == vehicle.model then
|
||||
MySQL.update('UPDATE owned_vehicles SET vehicle = ? WHERE plate = ?', {json.encode(vehicleProps), vehicleProps.plate})
|
||||
Customs[tostring(source)][tostring(vehicleProps.plate)].props = vehicleProps
|
||||
else
|
||||
print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source))
|
||||
end
|
||||
@@ -56,4 +92,4 @@ ESX.RegisterServerCallback('esx_lscustom:getVehiclesPrices', function(source, cb
|
||||
Vehicles = MySQL.query.await('SELECT model, price FROM vehicles')
|
||||
end
|
||||
cb(Vehicles)
|
||||
end)
|
||||
end)
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
Locales['et'] = {
|
||||
['mechanic'] = 'Mehaanik',
|
||||
['drive_to_indicated'] = 'Sõida ettenähtud kohta.',
|
||||
['mission_canceled'] = 'Töö katkestatud',
|
||||
['vehicle_list'] = 'Sõidukite list',
|
||||
['work_wear'] = 'Töö riided',
|
||||
['civ_wear'] = 'Tava riided',
|
||||
['deposit_stock'] = 'deposit Stock',
|
||||
['withdraw_stock'] = 'withdraw Stock',
|
||||
['boss_actions'] = 'Bossi menüü',
|
||||
['service_vehicle'] = 'Teenindussõiduk',
|
||||
['flat_bed'] = 'Pardaauto',
|
||||
['tow_truck'] = 'Puksiirauto',
|
||||
['service_full'] = 'Täis teenus: ',
|
||||
['open_actions'] = 'Vajuta [E], et avada menüü.',
|
||||
['harvest'] = 'Korja',
|
||||
['harvest_menu'] = 'Vajuta [E], et avada korjamis menüü.',
|
||||
['not_experienced_enough'] = 'Sa pole piisavalt kogenud, et seda teha.',
|
||||
['gas_can'] = 'Bensiini kanister',
|
||||
['repair_tools'] = 'Parandus tööriistad',
|
||||
['body_work_tools'] = 'Kere tööriistad',
|
||||
['blowtorch'] = 'keevitaja',
|
||||
['repair_kit'] = 'Parandus komplekt',
|
||||
['body_kit'] = 'Kere',
|
||||
['craft'] = 'Meisterda',
|
||||
['craft_menu'] = 'Vajuta [E], et avada menüü.',
|
||||
['billing'] = 'Arved',
|
||||
['hijack'] = 'Varasta',
|
||||
['repair'] = 'Paranda',
|
||||
['clean'] = 'Puhasta',
|
||||
['imp_veh'] = 'Aresti',
|
||||
['place_objects'] = 'Aseta objekt',
|
||||
['invoice_amount'] = 'Arve',
|
||||
['amount_invalid'] = 'Vale kogus',
|
||||
['no_players_nearby'] = 'Ligiduses pole ühtegi isikut',
|
||||
['no_vehicle_nearby'] = 'Ligiduses pole ühtegi sõidukit',
|
||||
['inside_vehicle'] = 'Sa ei saa seda teha autost seest!',
|
||||
['vehicle_unlocked'] = 'Auto on lukust lahti',
|
||||
['vehicle_repaired'] = 'Auto on parandatud',
|
||||
['vehicle_cleaned'] = 'Auto on pestud',
|
||||
['vehicle_impounded'] = 'Auto on arreteeritud',
|
||||
['must_seat_driver'] = 'Sa pead olema juhi istmel!',
|
||||
['must_near'] = 'Sa pead olema auto ligidal, et seda arreteerida.',
|
||||
['vehicle_success_attached'] = 'sõiduk edukalt ühendatud',
|
||||
['please_drop_off'] = 'Palun viige sõiduk garaaži',
|
||||
['cant_attach_own_tt'] = 'Sa ei saa teist puksiiri puksiirida',
|
||||
['no_veh_att'] = 'Ühtegi sõidukit pole ligidal millega ühendada',
|
||||
['not_right_veh'] = 'See pole õige sõiduk',
|
||||
['not_right_place'] = 'See pole õige koht',
|
||||
['veh_det_succ'] = 'Sõiduk edukalt lahti tehtud!',
|
||||
['imp_flatbed'] = 'Sa ei saa seda teha! Sul on selle jaoks vaja pardaautot',
|
||||
['objects'] = 'objekt',
|
||||
['roadcone'] = 'Koonus',
|
||||
['toolbox'] = 'Tööriista komplekt',
|
||||
['mechanic_stock'] = 'mechanic Stock',
|
||||
['quantity'] = 'Kogus',
|
||||
['invalid_quantity'] = 'iVale kogus',
|
||||
['inventory'] = 'Kapp',
|
||||
['veh_unlocked'] = 'Auto lukust lahti tehtud',
|
||||
['hijack_failed'] = 'Ukse muukimine ebaõnnestus',
|
||||
['body_repaired'] = 'Kere parandatud',
|
||||
['veh_repaired'] = 'Sõiduk parandatud',
|
||||
['veh_stored'] = 'Vajuta [E], et hoistada ese.',
|
||||
['press_remove_obj'] = 'Vajuta [E], et võtta ese.',
|
||||
['please_tow'] = 'Palun puksiiri see sõiduk',
|
||||
['wait_five'] = 'Sa pead ootama 5 minutit',
|
||||
['must_in_flatbed'] = 'Sul peab olema pardaauto, et alustada tööga.',
|
||||
['mechanic_customer'] = 'Mehaaniku klient',
|
||||
['you_do_not_room'] = 'Sul pole rohkem ruumi',
|
||||
['recovery_gas_can'] = 'Bensiini kanistri tagastamine...',
|
||||
['recovery_repair_tools'] = 'Parandus tööriistade tagastamine...',
|
||||
['recovery_body_tools'] = 'Kere tööriistade tagastamine...',
|
||||
['not_enough_gas_can'] = 'Sul pole piisavalt bensiini kanistreid.',
|
||||
['assembling_blowtorch'] = 'Paned keevitajat kokku...',
|
||||
['not_enough_repair_tools'] = 'Sul pole piisavalt parandus tööriistu.',
|
||||
['assembling_repair_kit'] = 'Paned paranduskomplekti kokku...',
|
||||
['not_enough_body_tools'] = 'Sul pole piisavalt kere tööriistu.',
|
||||
['assembling_body_kit'] = 'Valmistad kere...',
|
||||
['your_comp_earned'] = 'Teie firma teenis $',
|
||||
['you_used_blowtorch'] = 'Sa kasutasid keevitaja',
|
||||
['you_used_repair_kit'] = 'Sa kasutasid paranduskomplekti',
|
||||
['you_used_body_kit'] = 'Sa kasutasid kere',
|
||||
['have_withdrawn'] = 'Sa võtsid firma arvelt x%s %s',
|
||||
['have_deposited'] = 'Sa panid firma arvele x%s %s',
|
||||
['player_cannot_hold'] = 'Sul pole piisavalt ruumi seljakotis!',
|
||||
}
|
||||
@@ -59,9 +59,9 @@ function OpenVehicleSpawnerMenu(type, station, part, partNum)
|
||||
local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model))
|
||||
local label = ('%s - <span style="color:darkgoldenrod;">%s</span>: '):format(vehicleName, props.plate)
|
||||
|
||||
if v.stored then
|
||||
if v.stored == 1 then
|
||||
label = label .. ('<span style="color:green;">%s</span>'):format(TranslateCap('garage_stored'))
|
||||
else
|
||||
elseif v.stored == 0 then
|
||||
label = label .. ('<span style="color:darkred;">%s</span>'):format(TranslateCap('garage_notstored'))
|
||||
end
|
||||
|
||||
@@ -82,7 +82,7 @@ function OpenVehicleSpawnerMenu(type, station, part, partNum)
|
||||
align = 'top-left',
|
||||
elements = garage
|
||||
}, function(data2, menu2)
|
||||
if data2.current.stored then
|
||||
if data2.current.stored == 1 then
|
||||
local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(station, part, partNum)
|
||||
|
||||
if foundSpawn then
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
Locales['et'] = {
|
||||
-- Cloakroom
|
||||
['cloakroom'] = 'Riidekapp',
|
||||
['citizen_wear'] = 'Tsiviiliriietus',
|
||||
['police_wear'] = 'Politsei riietus',
|
||||
['gilet_wear'] = 'Oranž helkurjope',
|
||||
['bullet_wear'] = 'Kuulivest',
|
||||
['no_outfit'] = 'Ükski riietus ei sobi sinule!',
|
||||
['open_cloackroom'] = 'Vajuta ~INPUT_CONTEXT~ ,et vahetada ~y~riideid~s~.',
|
||||
-- Armory
|
||||
['remove_object'] = 'Asjade väljastamine',
|
||||
['deposit_object'] = 'Asjade asetamine kappi',
|
||||
['get_weapon'] = 'Relvade väljastamine relvakapist',
|
||||
['put_weapon'] = 'Relvade hoiustamine relvakappi',
|
||||
['buy_weapons'] = 'Osta tulirelv',
|
||||
['armory'] = 'Asjadekapp/Relvakapp',
|
||||
['open_armory'] = 'Vajuta ~INPUT_CONTEXT~ ,et avada ~y~Asjadekapp/Relvakapp~s~.',
|
||||
['armory_owned'] = 'Omatud',
|
||||
['armory_free'] = 'Tasuta',
|
||||
['armory_item'] = '$%s',
|
||||
['armory_weapontitle'] = 'Relvakapp - Osta relv',
|
||||
['armory_componenttitle'] = 'Relvakapp - Relva Lisad',
|
||||
['armory_bought'] = 'Sa ostsid ~y~%s~s~ ~g~$%s~s~ eest',
|
||||
['armory_money'] = 'Sul pole piisavalt raha, et seda relva osta.',
|
||||
['armory_hascomponent'] = 'Sul on juba see relva lisa küljes!',
|
||||
['get_weapon_menu'] = 'Relva väljastamine relvakapist',
|
||||
['put_weapon_menu'] = 'Relva hoiustamine relvakappi',
|
||||
-- Vehicles
|
||||
['vehicle_menu'] = 'Sõiduk',
|
||||
['vehicle_blocked'] = 'Miski blokeerib garaaži!',
|
||||
['garage_prompt'] = 'Vajuta ~INPUT_CONTEXT~ ,et kuvada ~y~sõidukeid~s~.',
|
||||
['garage_title'] = 'Sõidukid',
|
||||
['garage_stored'] = 'Pargitud',
|
||||
['garage_notstored'] = 'Pole garaažis',
|
||||
['garage_storing'] = 'Auto parkimine garaaži, vaata, et kedagi ligiduses poleks.',
|
||||
['garage_has_stored'] = 'Sõiduk on pargitud teie garaaži',
|
||||
['garage_has_notstored'] = 'Ühtegi omatud sõidukit ei leitud.',
|
||||
['garage_notavailable'] = 'Teie sõiduk pole pargitud garaaži.',
|
||||
['garage_blocked'] = 'Miski blokeerib garaaži!',
|
||||
['garage_empty'] = 'Teil pole ühtegi sõidukit garaažis.',
|
||||
['garage_released'] = 'Teie sõiduk on garaažist juba väljastatud.',
|
||||
['garage_store_nearby'] = 'Ligiduses pole ühtegi sõidukit.',
|
||||
['garage_storeditem'] = 'Vaata garaaži',
|
||||
['garage_storeitem'] = 'Pargi sõiduk garaaži',
|
||||
['garage_buyitem'] = 'Sõiduki pood',
|
||||
['helicopter_prompt'] = 'Vajuta ~INPUT_CONTEXT~ ,et kuvada ~y~Koptereid~s~.',
|
||||
['helicopter_notauthorized'] = 'Sul pole õiguseid osta kopterit.',
|
||||
['shop_item'] = '$%s',
|
||||
['vehicleshop_title'] = 'Sõiduki pood',
|
||||
['vehicleshop_confirm'] = 'Kas sa soovid seda sõidukit osta?',
|
||||
['vehicleshop_bought'] = 'Sa ostsid ~y~%s~s~ ~r~$%s~s~ eest',
|
||||
['vehicleshop_money'] = 'Sul pole piisavalt raha, et seda sõidukit osta.',
|
||||
['vehicleshop_awaiting_model'] = 'Sõidukit hetkel ~g~Laetakse~s~ Palun oodake',
|
||||
['confirm_no'] = 'ei',
|
||||
['confirm_yes'] = 'jah',
|
||||
-- Service
|
||||
['service_max'] = 'Sa ei saa end tööle registreerida, maksimaalne arv ohvitsere: %s/%s',
|
||||
['service_not'] = 'Sa ei saa end tööle kirjutada! Sa pead enne riided ära vahetama.',
|
||||
['service_anonunce'] = 'Teenistuse informatsioon',
|
||||
['service_in'] = 'Kirjutasite end tööle, Edu!',
|
||||
['service_in_announce'] = 'Ohvitser ~y~%s~s~ tuli tööle!',
|
||||
['service_out'] = 'Lahkusid töölt',
|
||||
['service_out_announce'] = 'Ohvitser ~y~%s~s~ lahkus töölt.',
|
||||
-- Action Menu
|
||||
['citizen_interaction'] = 'Isikuga tegelemine',
|
||||
['vehicle_interaction'] = 'Sõidukiga tegelemine',
|
||||
['object_spawner'] = 'Asjade asetamine',
|
||||
|
||||
['id_card'] = 'ID Kaart',
|
||||
['search'] = 'Otsi läbi',
|
||||
['hardcuff'] = 'Seo käed kinni',
|
||||
['handcuff'] = 'Pane isik raudu / tee raudadest lahti',
|
||||
['uncuff'] = 'Tee isiku rauad lahti',
|
||||
['drag'] = 'Eskort',
|
||||
['put_in_vehicle'] = 'Pane isik autosse',
|
||||
['out_the_vehicle'] = 'Võta isik autost välja',
|
||||
['fine'] = 'Tee trahv',
|
||||
['unpaid_bills'] = 'Vaata isiku maksmata arveid',
|
||||
['license_check'] = 'Vaata isiku lube',
|
||||
['license_revoke'] = 'Võta luba ära',
|
||||
['license_revoked'] = 'Sinu ~b~%s~s~ luba ~y~on ära võetud~s~!',
|
||||
['licence_you_revoked'] = 'Sa võtsid ~b~%s~s~ load isikult: ~y~%s~s~',
|
||||
['no_players_nearby'] = 'Läheduses pole ühtegi isikut!',
|
||||
['being_searched'] = 'Sind ~y~otsitakse läbi~s~ ~b~Politsei~s~ poolt.',
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'Sõiduki informatsioon',
|
||||
['pick_lock'] = 'Keevita sõiduki uks lahti',
|
||||
['vehicle_unlocked'] = 'Sõiduk on ~g~Lahti Keevitatud~s~',
|
||||
['no_vehicles_nearby'] = 'Läheduses pole ühtegi sõidukit',
|
||||
['impound'] = 'Puksiiri sõiduk ära',
|
||||
['impound_prompt'] = 'Vajuta ~INPUT_CONTEXT~ et lõpetada ~y~puksiirimine~s~',
|
||||
['impound_canceled'] = 'Sa lõpetasid puksiirimise',
|
||||
['impound_canceled_moved'] = 'Puksiirimine lõpetati kuna sõiduk liikus',
|
||||
['impound_successful'] = 'Sa puksiirisid sõiduki ära!',
|
||||
['search_database'] = 'Otsi sõidukit numbrimärgi järgi',
|
||||
['search_database_title'] = 'Otsi sõidukit numbrimärgi järgi',
|
||||
['search_database_error_invalid'] = 'See ei ole ~r~registris~s~ olev ~y~sõiduk~s~',
|
||||
['search_database_error_not_found'] = 'See ei ole ~r~registris~s~ olev ~y~sõiduk~s~',
|
||||
['search_database_found'] = 'See sõiduk ~y~kuulub~s~: ~b~%s~s~',
|
||||
-- Traffic interaction
|
||||
['traffic_interaction'] = 'Asjade asetamine',
|
||||
['cone'] = 'Koonus',
|
||||
['barrier'] = 'Tõke',
|
||||
['spikestrips'] = 'Siilid',
|
||||
['box'] = 'Kast',
|
||||
['cash'] = 'Kast raha',
|
||||
-- ID Card Menu
|
||||
['name'] = 'Nimi: %s',
|
||||
['job'] = 'Töökoht: %s',
|
||||
['sex'] = 'Sugu: %s',
|
||||
['dob'] = 'Sünniaeg: %s',
|
||||
['height'] = 'Pikkus: %s',
|
||||
['id'] = 'Hüüdnimi: %s',
|
||||
['bac'] = 'Alkoholi sisaldus veres: %s',
|
||||
['unknown'] = 'Tundmatu',
|
||||
['male'] = 'Mees',
|
||||
['female'] = 'Naine',
|
||||
-- Body Search Menu
|
||||
['guns_label'] = '--- Relvad ---',
|
||||
['inventory_label'] = '--- Kott/taskud ---',
|
||||
['license_label'] = ' --- Load ---',
|
||||
['confiscate'] = 'Konfiskeeritud %s',
|
||||
['confiscate_weapon'] = 'Konfiskeeri %s koos %s padruniga',
|
||||
['confiscate_inv'] = 'Konfiskeeri %sx %s',
|
||||
['confiscate_dirty'] = 'Konfiskeeri musta raha: <span style="color:red;">$%s</span>',
|
||||
['you_confiscated'] = 'Sa konfiskeerisid ~y~%sx~s~ ~b~%s~s~ isikult: ~b~%s~s~',
|
||||
['got_confiscated'] = '~y~%sx~s~ ~b~%s~s~ konfiskeeriti ~y~%s~s~ poolt',
|
||||
['you_confiscated_account'] = 'Sa konfiskeerisid ~g~$%s~s~ (%s) isikult: ~b~%s~s~',
|
||||
['got_confiscated_account'] = '~g~$%s~s~ (%s) konfiskeeriti ~y~%s~s~ poolt',
|
||||
['you_confiscated_weapon'] = 'Sa konfiskeerisid ~b~%s~s~ isikult ~b~%s~s~ koos ~o~%s~s~ padruniga',
|
||||
['got_confiscated_weapon'] = 'Sinu ~b~%s~s~ koos ~o~%s~s~ padruniga konfiskeeriti ~y~%s~s~ poolt',
|
||||
['traffic_offense'] = 'Liiklusrikkumine',
|
||||
['minor_offense'] = 'Väike kuritegu',
|
||||
['average_offense'] = 'Keskmine kuritegu',
|
||||
['major_offense'] = 'Suur kuritegu',
|
||||
['fine_total'] = 'Trahv: %s',
|
||||
-- Vehicle Info Menu
|
||||
['plate'] = 'Numbrimärk: %s',
|
||||
['owner_unknown'] = 'Sõiduki omanik: Puudub',
|
||||
['owner'] = 'Omanik: %s',
|
||||
-- Boss Menu
|
||||
['open_bossmenu'] = 'Vajuta ~INPUT_CONTEXT~ et avada boss menüü',
|
||||
['quantity_invalid'] = 'Kehtetu kogus',
|
||||
['have_withdrawn'] = 'Sa võtsid firmaarvelt välja ~y~%sx~s~ ~b~%s~s~',
|
||||
['have_deposited'] = 'Sa panid firmaarvele ~y~%sx~s~ ~b~%s~s~',
|
||||
['quantity'] = 'Kogus',
|
||||
['inventory'] = 'Inventuur',
|
||||
['police_stock'] = 'Politsei aktsia',
|
||||
-- Misc
|
||||
['remove_prop'] = 'Vajuta ~INPUT_CONTEXT~ et kustutada asi sinu ees.',
|
||||
['map_blip'] = 'Politseijaoskond',
|
||||
['unrestrained_timer'] = 'Sa tunned, kuidas käerauad libisevad kätelt.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'Politsei teavitus',
|
||||
['phone_police'] = 'Politsei',
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
]]
|
||||
]]
|
||||
function CCTV(PropertyID)
|
||||
DoScreenFadeOut(500)
|
||||
Wait(500)
|
||||
@@ -70,7 +70,7 @@ function CCTV(PropertyID)
|
||||
PushScaleformMovieFunctionParameterInt(4)
|
||||
N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomOut, true))
|
||||
N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomIn, true))
|
||||
InstructionButtonMessage(TranslateCap("Zoom"))
|
||||
InstructionButtonMessage(TranslateCap("zoom"))
|
||||
PopScaleformMovieFunctionVoid()
|
||||
|
||||
PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
|
||||
|
||||
@@ -103,14 +103,14 @@ if Config.Furniture.Enabled then
|
||||
PushScaleformMovieFunctionParameterInt(5)
|
||||
N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.Up, true))
|
||||
N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.Down, true))
|
||||
InstructionButtonMessage(TranslateCap("Height"))
|
||||
InstructionButtonMessage(TranslateCap("height"))
|
||||
PopScaleformMovieFunctionVoid()
|
||||
|
||||
PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
|
||||
PushScaleformMovieFunctionParameterInt(7)
|
||||
N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.RotateLeft, true))
|
||||
N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.RotateRight, true))
|
||||
InstructionButtonMessage(TranslateCap("Rotation"))
|
||||
InstructionButtonMessage(TranslateCap("rotate"))
|
||||
PopScaleformMovieFunctionVoid()
|
||||
|
||||
PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT")
|
||||
|
||||
@@ -281,7 +281,7 @@ function PropertyMenuElements(PropertyId)
|
||||
value = 'property_wardrobe'})
|
||||
end
|
||||
table.insert(elements,
|
||||
{title = TranslateCap("Furniture_title"), description = TranslateCap("Furniture_desc"), icon = "fas fa-boxes-stacked", value = 'property_furniture'})
|
||||
{title = TranslateCap("furniture_title"), description = TranslateCap("furniture_desc"), icon = "fas fa-boxes-stacked", value = 'property_furniture'})
|
||||
end
|
||||
end
|
||||
if (not Property.Locked or Config.OwnerCanAlwaysEnter and ESX.PlayerData.identifier == Property.Owner) and not InProperty then
|
||||
@@ -454,7 +454,7 @@ function OpenPropertyMenu(PropertyId)
|
||||
local eles = PropertyMenuElements(PropertyId)
|
||||
exports["esx_context"]:Refresh(eles)
|
||||
else
|
||||
ESX.ShowNotification(TranslateCap("cannot_Sell"), "error")
|
||||
ESX.ShowNotification(TranslateCap("cannot_sell"), "error")
|
||||
end
|
||||
end, PropertyId, element.value)
|
||||
end
|
||||
@@ -476,7 +476,7 @@ function OpenPropertyMenu(PropertyId)
|
||||
local eles = PropertyMenuElements(PropertyId)
|
||||
exports["esx_context"]:Refresh(eles)
|
||||
else
|
||||
ESX.ShowNotification(TranslateCap("cannot_Sell"), "error")
|
||||
ESX.ShowNotification(TranslateCap("cannot_sell"), "error")
|
||||
end
|
||||
end, PropertyId)
|
||||
end
|
||||
|
||||
@@ -4,8 +4,8 @@ Locales['en'] = {
|
||||
["take_picture"] = "Take Picture",
|
||||
["rot_left_right"] = "Left/Right",
|
||||
["rot_up_down"] = "Up/Down",
|
||||
["Zoom"] = "Zoom In/Out",
|
||||
["Zoom_level"] = "Zoom Level: %s %",
|
||||
["zoom"] = "Zoom In/Out",
|
||||
["zoom_level"] = "Zoom Level: %s %%",
|
||||
["night_vision"] = "Toggle Night Vision",
|
||||
["clipboard"] = "Link Copied To ~b~Cipboard",
|
||||
["picture_taken"] = "Picture Taken!",
|
||||
@@ -14,7 +14,7 @@ Locales['en'] = {
|
||||
|
||||
--- Furniture Strings ------
|
||||
|
||||
["Height"] = "Height",
|
||||
["height"] = "Height",
|
||||
["rotate"] = "Rotation",
|
||||
["place"] = "Place Furniture",
|
||||
["delete_furni"] = "Delete",
|
||||
@@ -41,7 +41,7 @@ Locales['en'] = {
|
||||
["menu_edit"] = "Edit",
|
||||
["menu_edit_desc"] = "Move and/or Delete furniture items",
|
||||
["furni_command"] = "furniture",
|
||||
["furni_Command_desc"] = "(ESX Property) Open Furniture Menu",
|
||||
["furni_command_desc"] = "(ESX Property) Open Furniture Menu",
|
||||
["furni_command_permission"] = "You ~r~Cannot~s~ Access This Menu!",
|
||||
["furni_reset_success"] = "Furniture Reset!",
|
||||
["furni_cannot_afford"] = "You Cannot Afford Todo this!",
|
||||
@@ -113,8 +113,8 @@ Locales['en'] = {
|
||||
["inventory_desc"] = "Change Position of Property Storage.",
|
||||
["wardrobe_title"] = "Wardrobe",
|
||||
["wardrobe_desc"] = "Change Position of Property Wardrobe.",
|
||||
["Furniture_title"] = "Furniture",
|
||||
["Furniture_desc"] = "Change Position of Property Furniture.",
|
||||
["furniture_title"] = "Furniture",
|
||||
["furniture_desc"] = "Change Position of Property Furniture.",
|
||||
["enter_title"] = "Enter",
|
||||
["knock_title"] = "Knock On Door",
|
||||
["buy_title"] = "Buy",
|
||||
@@ -139,11 +139,11 @@ Locales['en'] = {
|
||||
["please_finish"] = "Please Finish Setting ~b~%s~s~ Position",
|
||||
["cannot_afford"] = "You Cannot Purchase This Property!",
|
||||
["select_player"] = "Select Player",
|
||||
["cannot_Sell"] = "Cannot Sell To This Player!",
|
||||
["cannot_sell"] = "Cannot Sell To This Player!",
|
||||
["knock_on_door"] = "Knocking On Door...",
|
||||
["nobody_home"] = "It Seems Nobody is home...",
|
||||
|
||||
---------- General Strings ----------------
|
||||
---------- General Strings ----------------
|
||||
|
||||
["enabled"] = "Enabled",
|
||||
["disabled"] = "Disabled",
|
||||
@@ -166,7 +166,7 @@ Locales['en'] = {
|
||||
["cannot_access_property"] = 'You ~r~Cannot~s~ Access this property.',
|
||||
|
||||
|
||||
----------------- Creation Menu Strings ----------------
|
||||
----------------- Creation Menu Strings ----------------
|
||||
|
||||
["menu_title"] = "Property Creation",
|
||||
["element_title1"] = "Street Number",
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user