mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Implemented impounding vehicles (beta), endless i18n fixes, tab indents
This commit is contained in:
+305
-295
@@ -26,6 +26,7 @@ local CopPed = 0
|
||||
local hasAlreadyJoined = false
|
||||
local blipsCops = {}
|
||||
local isDead = false
|
||||
CurrentTask = {}
|
||||
|
||||
ESX = nil
|
||||
GUI.Time = 0
|
||||
@@ -433,204 +434,198 @@ function OpenVehicleSpawnerMenu(station, partNum)
|
||||
end
|
||||
|
||||
function OpenPoliceActionsMenu()
|
||||
ESX.UI.Menu.CloseAll()
|
||||
|
||||
ESX.UI.Menu.CloseAll()
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'police_actions',
|
||||
{
|
||||
title = 'Police',
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = _U('citizen_interaction'), value = 'citizen_interaction'},
|
||||
{label = _U('vehicle_interaction'), value = 'vehicle_interaction'},
|
||||
{label = _U('object_spawner'), value = 'object_spawner'},
|
||||
}
|
||||
}, function(data, menu)
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'police_actions',
|
||||
{
|
||||
title = 'Police',
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = _U('citizen_interaction'), value = 'citizen_interaction'},
|
||||
{label = _U('vehicle_interaction'), value = 'vehicle_interaction'},
|
||||
{label = _U('object_spawner'), value = 'object_spawner'},
|
||||
},
|
||||
},
|
||||
function(data, menu)
|
||||
if data.current.value == 'citizen_interaction' then
|
||||
local elements = {
|
||||
{label = _U('id_card'), value = 'identity_card'},
|
||||
{label = _U('search'), value = 'body_search'},
|
||||
{label = _U('handcuff'), value = 'handcuff'},
|
||||
{label = _U('drag'), value = 'drag'},
|
||||
{label = _U('put_in_vehicle'), value = 'put_in_vehicle'},
|
||||
{label = _U('out_the_vehicle'), value = 'out_the_vehicle'},
|
||||
{label = _U('fine'), value = 'fine'}
|
||||
}
|
||||
|
||||
if Config.EnableLicenses then
|
||||
table.insert(elements, { label = _U('license_check'), value = 'license' })
|
||||
end
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'citizen_interaction',
|
||||
{
|
||||
title = _U('citizen_interaction'),
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
}, function(data2, menu2)
|
||||
local player, distance = ESX.Game.GetClosestPlayer()
|
||||
if distance ~= -1 and distance <= 3.0 then
|
||||
local action = data2.current.value
|
||||
|
||||
if data.current.value == 'citizen_interaction' then
|
||||
local elements = {
|
||||
{label = _U('id_card'), value = 'identity_card'},
|
||||
{label = _U('search'), value = 'body_search'},
|
||||
{label = _U('handcuff'), value = 'handcuff'},
|
||||
{label = _U('drag'), value = 'drag'},
|
||||
{label = _U('put_in_vehicle'), value = 'put_in_vehicle'},
|
||||
{label = _U('out_the_vehicle'), value = 'out_the_vehicle'},
|
||||
{label = _U('fine'), value = 'fine'}
|
||||
}
|
||||
|
||||
if Config.EnableLicenses then
|
||||
table.insert(elements, { label = _U('license_check'), value = 'license' })
|
||||
end
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'citizen_interaction',
|
||||
{
|
||||
title = _U('citizen_interaction'),
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
},
|
||||
function(data2, menu2)
|
||||
if action == 'identity_card' then
|
||||
OpenIdentityCardMenu(player)
|
||||
elseif action == 'body_search' then
|
||||
OpenBodySearchMenu(player)
|
||||
elseif action == 'handcuff' then
|
||||
TriggerServerEvent('esx_policejob:handcuff', GetPlayerServerId(player))
|
||||
elseif action == 'drag' then
|
||||
TriggerServerEvent('esx_policejob:drag', GetPlayerServerId(player))
|
||||
elseif action == 'put_in_vehicle' then
|
||||
TriggerServerEvent('esx_policejob:putInVehicle', GetPlayerServerId(player))
|
||||
elseif action == 'out_the_vehicle' then
|
||||
TriggerServerEvent('esx_policejob:OutVehicle', GetPlayerServerId(player))
|
||||
elseif action == 'fine' then
|
||||
OpenFineMenu(player)
|
||||
elseif action == 'license' then
|
||||
ShowPlayerLicense(player)
|
||||
end
|
||||
|
||||
local player, distance = ESX.Game.GetClosestPlayer()
|
||||
else
|
||||
ESX.ShowNotification(_U('no_players_nearby'))
|
||||
end
|
||||
end, function(data2, menu2)
|
||||
menu2.close()
|
||||
end)
|
||||
elseif data.current.value == 'vehicle_interaction' then
|
||||
local elements = {}
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
local vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71)
|
||||
|
||||
if DoesEntityExist(vehicle) then
|
||||
table.insert(elements, {label = _U('vehicle_info'), value = 'vehicle_infos'})
|
||||
table.insert(elements, {label = _U('pick_lock'), value = 'hijack_vehicle'})
|
||||
table.insert(elements, {label = _U('impound'), value = 'impound'})
|
||||
end
|
||||
|
||||
--table.insert(elements, {label = _U('search_database'), value = 'search_database'})
|
||||
|
||||
if distance ~= -1 and distance <= 3.0 then
|
||||
local action = data2.current.value
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'vehicle_interaction',
|
||||
{
|
||||
title = _U('vehicle_interaction'),
|
||||
align = 'top-left',
|
||||
elements = elements
|
||||
}, function(data2, menu2)
|
||||
coords = GetEntityCoords(playerPed)
|
||||
vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71)
|
||||
action = data2.current.value
|
||||
|
||||
if action == 'search_database' then
|
||||
LookupVehicle()
|
||||
elseif DoesEntityExist(vehicle) then
|
||||
local vehicleData = ESX.Game.GetVehicleProperties(vehicle)
|
||||
if action == 'vehicle_infos' then
|
||||
OpenVehicleInfosMenu(vehicleData)
|
||||
|
||||
elseif action == 'hijack_vehicle' then
|
||||
if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 3.0) then
|
||||
TaskStartScenarioInPlace(playerPed, "WORLD_HUMAN_WELDING", 0, true)
|
||||
Citizen.Wait(20000)
|
||||
ClearPedTasksImmediately(playerPed)
|
||||
|
||||
if action == 'identity_card' then
|
||||
OpenIdentityCardMenu(player)
|
||||
elseif action == 'body_search' then
|
||||
OpenBodySearchMenu(player)
|
||||
elseif action == 'handcuff' then
|
||||
TriggerServerEvent('esx_policejob:handcuff', GetPlayerServerId(player))
|
||||
elseif action == 'drag' then
|
||||
TriggerServerEvent('esx_policejob:drag', GetPlayerServerId(player))
|
||||
elseif action == 'put_in_vehicle' then
|
||||
TriggerServerEvent('esx_policejob:putInVehicle', GetPlayerServerId(player))
|
||||
elseif action == 'out_the_vehicle' then
|
||||
TriggerServerEvent('esx_policejob:OutVehicle', GetPlayerServerId(player))
|
||||
elseif action == 'fine' then
|
||||
OpenFineMenu(player)
|
||||
elseif action == 'license' then
|
||||
ShowPlayerLicense(player)
|
||||
end
|
||||
SetVehicleDoorsLocked(vehicle, 1)
|
||||
SetVehicleDoorsLockedForAllPlayers(vehicle, false)
|
||||
ESX.ShowNotification(_U('vehicle_unlocked'))
|
||||
end
|
||||
elseif action == 'impound' then
|
||||
|
||||
-- is the script busy?
|
||||
if CurrentTask.Busy then
|
||||
return
|
||||
end
|
||||
|
||||
SetTextComponentFormat('STRING')
|
||||
AddTextComponentString(_U('impound_prompt')) --press ~INPUT_CONTEXT~ to cancel the impound
|
||||
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
|
||||
|
||||
TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true)
|
||||
|
||||
CurrentTask.Busy = true
|
||||
CurrentTask.Task = ESX.SetTimeout(10000, function()
|
||||
ClearPedTasks(playerPed)
|
||||
ImpoundVehicle(vehicle)
|
||||
Citizen.Wait(100) -- sleep the entire script to let stuff sink back to reality
|
||||
end)
|
||||
|
||||
-- keep track of that vehicle!
|
||||
Citizen.CreateThread(function()
|
||||
while CurrentTask.Busy do
|
||||
Citizen.Wait(1000)
|
||||
|
||||
vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71)
|
||||
if not DoesEntityExist(vehicle) and CurrentTask.Busy then
|
||||
ESX.ShowNotification(_U('impound_canceled_moved'))
|
||||
ESX.ClearTimeout(CurrentTask.Task)
|
||||
ClearPedTasks(playerPed)
|
||||
CurrentTask.Busy = false
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
else
|
||||
ESX.ShowNotification(_U('no_vehicles_nearby'))
|
||||
end
|
||||
|
||||
else
|
||||
ESX.ShowNotification(_U('no_players_nearby'))
|
||||
end
|
||||
end, function(data2, menu2)
|
||||
menu2.close()
|
||||
end
|
||||
)
|
||||
|
||||
end,
|
||||
function(data2, menu2)
|
||||
menu2.close()
|
||||
end
|
||||
)
|
||||
elseif data.current.value == 'object_spawner' then
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'citizen_interaction',
|
||||
{
|
||||
title = _U('traffic_interaction'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = _U('cone'), value = 'prop_roadcone02a'},
|
||||
{label = _U('barrier'), value = 'prop_barrier_work06a'},
|
||||
{label = _U('spikestrips'), value = 'p_ld_stinger_s'},
|
||||
{label = _U('box'), value = 'prop_boxpile_07d'},
|
||||
{label = _U('cash'), value = 'hei_prop_cash_crate_half_full'}
|
||||
}
|
||||
}, function(data2, menu2)
|
||||
local model = data2.current.value
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
local forward = GetEntityForwardVector(playerPed)
|
||||
local x, y, z = table.unpack(coords + forward * 1.0)
|
||||
|
||||
end
|
||||
if model == 'prop_roadcone02a' then
|
||||
z = z - 2.0
|
||||
end
|
||||
|
||||
if data.current.value == 'vehicle_interaction' then
|
||||
ESX.Game.SpawnObject(model, {
|
||||
x = x,
|
||||
y = y,
|
||||
z = z
|
||||
}, function(obj)
|
||||
SetEntityHeading(obj, GetEntityHeading(playerPed))
|
||||
PlaceObjectOnGroundProperly(obj)
|
||||
end)
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'vehicle_interaction',
|
||||
{
|
||||
title = _U('vehicle_interaction'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = _U('vehicle_info'), value = 'vehicle_infos'},
|
||||
{label = _U('pick_lock'), value = 'hijack_vehicle'},
|
||||
},
|
||||
},
|
||||
function(data2, menu2)
|
||||
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
local vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71)
|
||||
|
||||
if DoesEntityExist(vehicle) then
|
||||
|
||||
local vehicleData = ESX.Game.GetVehicleProperties(vehicle)
|
||||
|
||||
if data2.current.value == 'vehicle_infos' then
|
||||
OpenVehicleInfosMenu(vehicleData)
|
||||
end
|
||||
|
||||
if data2.current.value == 'hijack_vehicle' then
|
||||
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
|
||||
if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 3.0) then
|
||||
|
||||
local vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71)
|
||||
|
||||
if DoesEntityExist(vehicle) then
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
|
||||
TaskStartScenarioInPlace(playerPed, "WORLD_HUMAN_WELDING", 0, true)
|
||||
|
||||
Wait(20000)
|
||||
|
||||
ClearPedTasksImmediately(playerPed)
|
||||
|
||||
SetVehicleDoorsLocked(vehicle, 1)
|
||||
SetVehicleDoorsLockedForAllPlayers(vehicle, false)
|
||||
|
||||
TriggerEvent('esx:showNotification', _U('vehicle_unlocked'))
|
||||
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
else
|
||||
ESX.ShowNotification(_U('no_vehicles_nearby'))
|
||||
end
|
||||
|
||||
end,
|
||||
function(data2, menu2)
|
||||
menu2.close()
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
if data.current.value == 'object_spawner' then
|
||||
|
||||
ESX.UI.Menu.Open(
|
||||
'default', GetCurrentResourceName(), 'citizen_interaction',
|
||||
{
|
||||
title = _U('traffic_interaction'),
|
||||
align = 'top-left',
|
||||
elements = {
|
||||
{label = _U('cone'), value = 'prop_roadcone02a'},
|
||||
{label = _U('barrier'), value = 'prop_barrier_work06a'},
|
||||
{label = _U('spikestrips'), value = 'p_ld_stinger_s'},
|
||||
{label = _U('box'), value = 'prop_boxpile_07d'},
|
||||
{label = _U('cash'), value = 'hei_prop_cash_crate_half_full'}
|
||||
},
|
||||
},
|
||||
function(data2, menu2)
|
||||
|
||||
|
||||
local model = data2.current.value
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
local forward = GetEntityForwardVector(playerPed)
|
||||
local x, y, z = table.unpack(coords + forward * 1.0)
|
||||
|
||||
if model == 'prop_roadcone02a' then
|
||||
z = z - 2.0
|
||||
end
|
||||
|
||||
ESX.Game.SpawnObject(model, {
|
||||
x = x,
|
||||
y = y,
|
||||
z = z
|
||||
}, function(obj)
|
||||
SetEntityHeading(obj, GetEntityHeading(playerPed))
|
||||
PlaceObjectOnGroundProperly(obj)
|
||||
end)
|
||||
|
||||
end,
|
||||
function(data2, menu2)
|
||||
menu2.close()
|
||||
end
|
||||
)
|
||||
|
||||
end
|
||||
|
||||
end,
|
||||
function(data, menu)
|
||||
|
||||
menu.close()
|
||||
|
||||
end
|
||||
)
|
||||
end, function(data2, menu2)
|
||||
menu2.close()
|
||||
end)
|
||||
end
|
||||
|
||||
end, function(data, menu)
|
||||
menu.close()
|
||||
end)
|
||||
end
|
||||
|
||||
function OpenIdentityCardMenu(player)
|
||||
@@ -647,9 +642,9 @@ function OpenIdentityCardMenu(player)
|
||||
local idLabel = nil
|
||||
|
||||
if data.job.grade_label ~= nil and data.job.grade_label ~= '' then
|
||||
jobLabel = 'Job : ' .. data.job.label .. ' - ' .. data.job.grade_label
|
||||
jobLabel = 'Job: ' .. data.job.label .. ' - ' .. data.job.grade_label
|
||||
else
|
||||
jobLabel = 'Job : ' .. data.job.label
|
||||
jobLabel = 'Job: ' .. data.job.label
|
||||
end
|
||||
|
||||
if data.sex ~= nil then
|
||||
@@ -658,27 +653,27 @@ function OpenIdentityCardMenu(player)
|
||||
else
|
||||
sex = 'Female'
|
||||
end
|
||||
sexLabel = 'Sex : ' .. sex
|
||||
sexLabel = 'Sex: ' .. sex
|
||||
else
|
||||
sexLabel = 'Sex : Unknown'
|
||||
sexLabel = 'Sex: Unknown'
|
||||
end
|
||||
|
||||
if data.dob ~= nil then
|
||||
dobLabel = 'DOB : ' .. data.dob
|
||||
dobLabel = 'DOB: ' .. data.dob
|
||||
else
|
||||
dobLabel = 'DOB : Unknown'
|
||||
dobLabel = 'DOB: Unknown'
|
||||
end
|
||||
|
||||
if data.height ~= nil then
|
||||
heightLabel = 'Height : ' .. data.height
|
||||
heightLabel = 'Height: ' .. data.height
|
||||
else
|
||||
heightLabel = 'Height : Unknown'
|
||||
heightLabel = 'Height: Unknown'
|
||||
end
|
||||
|
||||
if data.name ~= nil then
|
||||
idLabel = 'ID : ' .. data.name
|
||||
idLabel = 'ID: ' .. data.name
|
||||
else
|
||||
idLabel = 'ID : Unknown'
|
||||
idLabel = 'ID: Unknown'
|
||||
end
|
||||
|
||||
local elements = {
|
||||
@@ -728,9 +723,9 @@ function OpenIdentityCardMenu(player)
|
||||
local jobLabel = nil
|
||||
|
||||
if data.job.grade_label ~= nil and data.job.grade_label ~= '' then
|
||||
jobLabel = 'Job : ' .. data.job.label .. ' - ' .. data.job.grade_label
|
||||
jobLabel = 'Job: ' .. data.job.label .. ' - ' .. data.job.grade_label
|
||||
else
|
||||
jobLabel = 'Job : ' .. data.job.label
|
||||
jobLabel = 'Job: ' .. data.job.label
|
||||
end
|
||||
|
||||
local elements = {
|
||||
@@ -925,6 +920,31 @@ function OpenFineCategoryMenu(player, category)
|
||||
|
||||
end
|
||||
|
||||
function LookupVehicle()
|
||||
ESX.UI.Menu.Open(
|
||||
'dialog', GetCurrentResourceName(), 'lookup_vehicle',
|
||||
{
|
||||
title = _U('search_database_title'),
|
||||
}, function (data, menu)
|
||||
local length = string.len(data.value)
|
||||
if data.value == nil or length < 8 or length > 13 then
|
||||
ESX.ShowNotification(_U('search_database_error_invalid'))
|
||||
else
|
||||
ESX.TriggerServerCallback('esx_policejob:getVehicleFromPlate', function(owner, found)
|
||||
if found then
|
||||
ESX.ShowNotification(_U('search_database_found', owner))
|
||||
else
|
||||
ESX.ShowNotification(_U('search_database_error_not_found'))
|
||||
end
|
||||
end, data.value)
|
||||
menu.close()
|
||||
end
|
||||
end, function (data, menu)
|
||||
menu.close()
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function ShowPlayerLicense(player)
|
||||
local elements = {}
|
||||
local targetName
|
||||
@@ -1134,7 +1154,6 @@ function OpenGetStocksMenu()
|
||||
|
||||
ESX.TriggerServerCallback('esx_policejob:getStockItems', function(items)
|
||||
|
||||
print(json.encode(items))
|
||||
|
||||
local elements = {}
|
||||
|
||||
@@ -1466,28 +1485,28 @@ end)
|
||||
|
||||
RegisterNetEvent('esx_policejob:OutVehicle')
|
||||
AddEventHandler('esx_policejob:OutVehicle', function(t)
|
||||
local ped = GetPlayerPed(t)
|
||||
ClearPedTasksImmediately(ped)
|
||||
plyPos = GetEntityCoords(GetPlayerPed(-1), true)
|
||||
local xnew = plyPos.x+2
|
||||
local ynew = plyPos.y+2
|
||||
local ped = GetPlayerPed(t)
|
||||
ClearPedTasksImmediately(ped)
|
||||
plyPos = GetEntityCoords(GetPlayerPed(-1), true)
|
||||
local xnew = plyPos.x+2
|
||||
local ynew = plyPos.y+2
|
||||
|
||||
SetEntityCoords(GetPlayerPed(-1), xnew, ynew, plyPos.z)
|
||||
SetEntityCoords(GetPlayerPed(-1), xnew, ynew, plyPos.z)
|
||||
end)
|
||||
|
||||
-- Handcuff
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Wait(0)
|
||||
if IsHandcuffed then
|
||||
DisableControlAction(0, 142, true) -- MeleeAttackAlternate
|
||||
DisableControlAction(0, 30, true) -- MoveLeftRight
|
||||
DisableControlAction(0, 31, true) -- MoveUpDown
|
||||
DisableControlAction(0, 24, true) -- Shoot
|
||||
DisableControlAction(0, 92, true) -- Shoot in car
|
||||
DisableControlAction(0, 75, true) -- Leave Vehicle
|
||||
end
|
||||
end
|
||||
while true do
|
||||
Citizen.Wait(10)
|
||||
if IsHandcuffed then
|
||||
DisableControlAction(0, 142, true) -- MeleeAttackAlternate
|
||||
DisableControlAction(0, 30, true) -- MoveLeftRight
|
||||
DisableControlAction(0, 31, true) -- MoveUpDown
|
||||
DisableControlAction(0, 24, true) -- Shoot
|
||||
DisableControlAction(0, 92, true) -- Shoot in car
|
||||
DisableControlAction(0, 75, true) -- Leave Vehicle
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- Create blips
|
||||
@@ -1753,88 +1772,69 @@ end)
|
||||
|
||||
-- Key Controls
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
while true do
|
||||
|
||||
Citizen.Wait(0)
|
||||
Citizen.Wait(0)
|
||||
|
||||
if CurrentAction ~= nil then
|
||||
if CurrentAction ~= nil then
|
||||
SetTextComponentFormat('STRING')
|
||||
AddTextComponentString(CurrentActionMsg)
|
||||
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
|
||||
|
||||
SetTextComponentFormat('STRING')
|
||||
AddTextComponentString(CurrentActionMsg)
|
||||
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
|
||||
if IsControlPressed(0, Keys['E']) and PlayerData.job ~= nil and PlayerData.job.name == 'police' and (GetGameTimer() - GUI.Time) > 150 then
|
||||
|
||||
if IsControlPressed(0, Keys['E']) and PlayerData.job ~= nil and PlayerData.job.name == 'police' and (GetGameTimer() - GUI.Time) > 150 then
|
||||
|
||||
if CurrentAction == 'menu_cloakroom' then
|
||||
OpenCloakroomMenu()
|
||||
end
|
||||
|
||||
if CurrentAction == 'menu_armory' then
|
||||
OpenArmoryMenu(CurrentActionData.station)
|
||||
end
|
||||
|
||||
if CurrentAction == 'menu_vehicle_spawner' then
|
||||
OpenVehicleSpawnerMenu(CurrentActionData.station, CurrentActionData.partNum)
|
||||
end
|
||||
|
||||
if CurrentAction == 'delete_vehicle' then
|
||||
|
||||
if Config.EnableSocietyOwnedVehicles then
|
||||
|
||||
local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle)
|
||||
TriggerServerEvent('esx_society:putVehicleInGarage', 'police', vehicleProps)
|
||||
|
||||
else
|
||||
|
||||
if
|
||||
GetEntityModel(vehicle) == GetHashKey('police') or
|
||||
GetEntityModel(vehicle) == GetHashKey('police2') or
|
||||
GetEntityModel(vehicle) == GetHashKey('police3') or
|
||||
GetEntityModel(vehicle) == GetHashKey('police4') or
|
||||
GetEntityModel(vehicle) == GetHashKey('policeb') or
|
||||
GetEntityModel(vehicle) == GetHashKey('policet')
|
||||
then
|
||||
TriggerServerEvent('esx_service:disableService', 'police')
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
ESX.Game.DeleteVehicle(CurrentActionData.vehicle)
|
||||
end
|
||||
|
||||
if CurrentAction == 'menu_boss_actions' then
|
||||
|
||||
ESX.UI.Menu.CloseAll()
|
||||
|
||||
TriggerEvent('esx_society:openBossMenu', 'police', function(data, menu)
|
||||
|
||||
menu.close()
|
||||
|
||||
CurrentAction = 'menu_boss_actions'
|
||||
CurrentActionMsg = _U('open_bossmenu')
|
||||
CurrentActionData = {}
|
||||
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
if CurrentAction == 'remove_entity' then
|
||||
DeleteEntity(CurrentActionData.entity)
|
||||
end
|
||||
|
||||
CurrentAction = nil
|
||||
GUI.Time = GetGameTimer()
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
if IsControlPressed(0, Keys['F6']) and not isDead and PlayerData.job ~= nil and PlayerData.job.name == 'police' and not ESX.UI.Menu.IsOpen('default', GetCurrentResourceName(), 'police_actions') and (GetGameTimer() - GUI.Time) > 150 then
|
||||
OpenPoliceActionsMenu()
|
||||
GUI.Time = GetGameTimer()
|
||||
end
|
||||
|
||||
end
|
||||
if CurrentAction == 'menu_cloakroom' then
|
||||
OpenCloakroomMenu()
|
||||
elseif CurrentAction == 'menu_armory' then
|
||||
OpenArmoryMenu(CurrentActionData.station)
|
||||
elseif CurrentAction == 'menu_vehicle_spawner' then
|
||||
OpenVehicleSpawnerMenu(CurrentActionData.station, CurrentActionData.partNum)
|
||||
elseif CurrentAction == 'delete_vehicle' then
|
||||
if Config.EnableSocietyOwnedVehicles then
|
||||
local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle)
|
||||
TriggerServerEvent('esx_society:putVehicleInGarage', 'police', vehicleProps)
|
||||
else
|
||||
if GetEntityModel(vehicle) == GetHashKey('police') or
|
||||
GetEntityModel(vehicle) == GetHashKey('police2') or
|
||||
GetEntityModel(vehicle) == GetHashKey('police3') or
|
||||
GetEntityModel(vehicle) == GetHashKey('police4') or
|
||||
GetEntityModel(vehicle) == GetHashKey('policeb') or
|
||||
GetEntityModel(vehicle) == GetHashKey('policet')
|
||||
then
|
||||
TriggerServerEvent('esx_service:disableService', 'police')
|
||||
end
|
||||
end
|
||||
ESX.Game.DeleteVehicle(CurrentActionData.vehicle)
|
||||
elseif CurrentAction == 'menu_boss_actions' then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
TriggerEvent('esx_society:openBossMenu', 'police', function(data, menu)
|
||||
menu.close()
|
||||
CurrentAction = 'menu_boss_actions'
|
||||
CurrentActionMsg = _U('open_bossmenu')
|
||||
CurrentActionData = {}
|
||||
end)
|
||||
elseif CurrentAction == 'remove_entity' then
|
||||
DeleteEntity(CurrentActionData.entity)
|
||||
end
|
||||
|
||||
CurrentAction = nil
|
||||
GUI.Time = GetGameTimer()
|
||||
end
|
||||
end -- CurrentAction end
|
||||
|
||||
if IsControlPressed(0, Keys['F6']) and not isDead and PlayerData.job ~= nil and PlayerData.job.name == 'police' and not ESX.UI.Menu.IsOpen('default', GetCurrentResourceName(), 'police_actions') and (GetGameTimer() - GUI.Time) > 150 then
|
||||
OpenPoliceActionsMenu()
|
||||
GUI.Time = GetGameTimer()
|
||||
end
|
||||
|
||||
if IsControlPressed(0, Keys['E']) and CurrentTask.Busy then
|
||||
ESX.ShowNotification(_U('impound_canceled'))
|
||||
ESX.ClearTimeout(CurrentTask.Task)
|
||||
ClearPedTasks(GetPlayerPed(-1))
|
||||
|
||||
CurrentTask.Busy = false
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
function createBlip(id)
|
||||
@@ -1892,4 +1892,14 @@ end)
|
||||
|
||||
AddEventHandler('esx:onPlayerDeath', function()
|
||||
isDead = true
|
||||
end)
|
||||
end)
|
||||
|
||||
-- TODO
|
||||
-- - return to garage if owned
|
||||
-- - message owner that his vehicle has been impounded
|
||||
function ImpoundVehicle(vehicle)
|
||||
--local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(vehicle)))
|
||||
ESX.Game.DeleteVehicle(vehicle)
|
||||
ESX.ShowNotification(_U('impound_successful'))
|
||||
CurrentTask.Busy = false
|
||||
end
|
||||
+6
-7
@@ -16,20 +16,19 @@ INSERT INTO `jobs` (name, label) VALUES
|
||||
|
||||
INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
|
||||
('police',0,'recruit','Recrue',20,'{\"tshirt_1\":57,\"torso_1\":55,\"arms\":0,\"pants_1\":35,\"glasses\":0,\"decals_2\":0,\"hair_color_2\":0,\"helmet_2\":0,\"hair_color_1\":5,\"face\":19,\"glasses_2\":1,\"torso_2\":0,\"shoes\":24,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"pants_2\":0,\"hair_2\":0,\"decals_1\":0,\"tshirt_2\":0,\"helmet_1\":8}','{\"tshirt_1\":34,\"torso_1\":48,\"shoes\":24,\"pants_1\":34,\"torso_2\":0,\"decals_2\":0,\"hair_color_2\":0,\"glasses\":0,\"helmet_2\":0,\"hair_2\":3,\"face\":21,\"decals_1\":0,\"glasses_2\":1,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"pants_2\":0,\"arms\":14,\"hair_color_1\":10,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',4,'officer','Officier',40,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":0,\"decals_1\":8,\"torso_2\":0,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"hair_color_1\":5,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":14,\"pants_1\":34,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"shoes\":24,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"face\":21,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"hair_color_1\":10,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',4,'officer','Officier',40,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":0,\"decals_1\":8,\"torso_2\":0,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"hair_color_1\":5,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":14,\"pants_1\":34,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"shoes\":24,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"face\":21,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"hair_color_1\":10,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',1,'sergeant','Sergent',60,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":0,\"decals_1\":8,\"torso_2\":0,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"hair_color_1\":5,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":14,\"pants_1\":34,\"pants_2\":0,\"decals_2\":1,\"hair_color_2\":0,\"shoes\":24,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"face\":21,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"hair_color_1\":10,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',2,'lieutenant','Lieutenant',85,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":2,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"glasses\":0,\"decals_1\":8,\"hair_color_1\":5,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"torso_2\":0,\"arms\":41,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":44,\"pants_1\":34,\"hair_2\":3,\"decals_2\":2,\"hair_color_2\":0,\"hair_color_1\":10,\"helmet_2\":0,\"face\":21,\"shoes\":24,\"torso_2\":0,\"glasses_2\":1,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"pants_2\":0,\"decals_1\":7,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}'),
|
||||
('police',3,'boss','Commandant',100,'{\"tshirt_1\":58,\"torso_1\":55,\"shoes\":24,\"pants_1\":35,\"pants_2\":0,\"decals_2\":3,\"hair_color_2\":0,\"face\":19,\"helmet_2\":0,\"hair_2\":0,\"arms\":41,\"torso_2\":0,\"hair_color_1\":5,\"hair_1\":2,\"skin\":34,\"sex\":0,\"glasses_1\":0,\"glasses_2\":1,\"decals_1\":8,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":11}','{\"tshirt_1\":35,\"torso_1\":48,\"arms\":44,\"pants_1\":34,\"pants_2\":0,\"decals_2\":3,\"hair_color_2\":0,\"face\":21,\"helmet_2\":0,\"hair_2\":3,\"decals_1\":7,\"torso_2\":0,\"hair_color_1\":10,\"hair_1\":11,\"skin\":34,\"sex\":1,\"glasses_1\":5,\"glasses_2\":1,\"shoes\":24,\"glasses\":0,\"tshirt_2\":0,\"helmet_1\":57}')
|
||||
;
|
||||
|
||||
CREATE TABLE `fine_types` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`label` varchar(255) DEFAULT NULL,
|
||||
`amount` int(11) DEFAULT NULL,
|
||||
`category` int(11) DEFAULT NULL,
|
||||
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`label` varchar(255) DEFAULT NULL,
|
||||
`amount` int(11) DEFAULT NULL,
|
||||
`category` int(11) DEFAULT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
PRIMARY KEY (`id`)
|
||||
);
|
||||
|
||||
INSERT INTO `fine_types` (label, amount, category) VALUES
|
||||
|
||||
+25
-8
@@ -3,8 +3,15 @@ Locales['br'] = {
|
||||
['cloakroom'] = 'Vestiário',
|
||||
['citizen_wear'] = 'Roupa casual',
|
||||
['police_wear'] = 'Uniforme da Polícia',
|
||||
['sheriff_wear'] = 'sheriff Outfit',
|
||||
['lieutenant_wear'] = 'Swatt outfit ',
|
||||
['gilet_wear'] = 'orange reflective jacket',
|
||||
['bullet_wear'] = 'bulletproof vest',
|
||||
['no_outfit'] = 'there\'s no uniform that fits you!',
|
||||
['open_cloackroom'] = 'Pressione ~INPUT_CONTEXT~ para se trocar',
|
||||
-- Armory
|
||||
['remove_object'] = 'take object',
|
||||
['deposit_object'] = 'deposit object',
|
||||
['get_weapon'] = 'Pegar arma',
|
||||
['put_weapon'] = 'Entregar arma',
|
||||
['buy_weapons'] = 'Comprar armas',
|
||||
@@ -24,14 +31,31 @@ Locales['br'] = {
|
||||
['id_card'] = 'Carteira de identidade',
|
||||
['search'] = 'Procurar',
|
||||
['handcuff'] = 'Algemar / Soltar',
|
||||
['drag'] = 'drag',
|
||||
['put_in_vehicle'] = 'Colocar no veículo',
|
||||
['out_the_vehicle'] = 'take out of vehicle',
|
||||
['fine'] = 'Multa',
|
||||
['license_check'] = 'manage license',
|
||||
['license_revoke'] = 'revoke license',
|
||||
['license_revoked'] = 'your ~b~%s~s~ has been ~y~revoked~s~!',
|
||||
['licence_you_revoked'] = 'you revoked a ~b~%s~s~ which belonged to ~y~%s~s~',
|
||||
['no_players_nearby'] = 'Nenhum jogador nas proximidades',
|
||||
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'Informações',
|
||||
['pick_lock'] = 'Trancar veículo',
|
||||
['vehicle_unlocked'] = 'Veículo ~g~destravado~s~',
|
||||
['no_vehicles_nearby'] = 'Nenhum veículo nas proximidades',
|
||||
['impound'] = 'impound vehicle',
|
||||
['impound_prompt'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~impound~s~',
|
||||
['impound_canceled'] = 'you canceled the impound',
|
||||
['impound_canceled_moved'] = 'the impound has been canceled because the vehicle moved',
|
||||
['impound_successful'] = 'you have impounded the vehicle',
|
||||
['search_database'] = 'vehicle information',
|
||||
['search_database_title'] = 'vehicle information - search with registration number',
|
||||
['search_database_error_invalid'] = 'that is ~r~not~s~ a ~y~valid~s~ registration number',
|
||||
['search_database_error_not_found'] = 'that ~y~registration number~s~ is ~r~not~s~ registered to an vehicle!',
|
||||
['search_database_found'] = 'the vehicle is ~y~registered~s~ to ~b~%s~s~',
|
||||
-- Traffic interaction
|
||||
['traffic_interaction'] = 'Interagir com as rodovias',
|
||||
['cone'] = 'Cones',
|
||||
['barrier'] = 'Barreira',
|
||||
@@ -81,11 +105,4 @@ Locales['br'] = {
|
||||
['you_have_confweapon'] = 'Você confiscou ~y~x1 ',
|
||||
['confweapon'] = '~s~ confiscado de você ~y~x1 ',
|
||||
['alert_police'] = 'Alerta da Polícia',
|
||||
-- Authorized Vehicles
|
||||
['police'] = 'Viatura - Blazer',
|
||||
['police2'] = 'Viatura - Parati',
|
||||
['police3'] = 'viatura - Fluence',
|
||||
['police4'] = 'Viatura - Blazer cinza',
|
||||
['policeb'] = 'Moto da Polícia',
|
||||
['policet'] = 'Van de Transporte',
|
||||
}
|
||||
|
||||
+25
-8
@@ -3,8 +3,15 @@ Locales['de'] = {
|
||||
['cloakroom'] = 'Garderobe',
|
||||
['citizen_wear'] = 'Zivilkleidung',
|
||||
['police_wear'] = 'Arbeitskleidung',
|
||||
['sheriff_wear'] = 'sheriff Outfit',
|
||||
['lieutenant_wear'] = 'Swatt outfit ',
|
||||
['gilet_wear'] = 'orange reflective jacket',
|
||||
['bullet_wear'] = 'bulletproof vest',
|
||||
['no_outfit'] = 'there\'s no uniform that fits you!',
|
||||
['open_cloackroom'] = 'Drücke ~INPUT_CONTEXT~ um dich umzuziehen',
|
||||
-- Armory
|
||||
['remove_object'] = 'take object',
|
||||
['deposit_object'] = 'deposit object',
|
||||
['get_weapon'] = 'Waffen holen',
|
||||
['put_weapon'] = 'Waffen bringen',
|
||||
['buy_weapons'] = 'Waffen kaufen',
|
||||
@@ -24,14 +31,31 @@ Locales['de'] = {
|
||||
['id_card'] = 'ID Karte',
|
||||
['search'] = 'Suche',
|
||||
['handcuff'] = 'Festnehmen / Freilassen',
|
||||
['drag'] = 'drag',
|
||||
['put_in_vehicle'] = 'In Fahrzeug setzen',
|
||||
['out_the_vehicle'] = 'take out of vehicle',
|
||||
['fine'] = 'Strafe',
|
||||
['license_check'] = 'manage license',
|
||||
['license_revoke'] = 'revoke license',
|
||||
['license_revoked'] = 'your ~b~%s~s~ has been ~y~revoked~s~!',
|
||||
['licence_you_revoked'] = 'you revoked a ~b~%s~s~ which belonged to ~y~%s~s~',
|
||||
['no_players_nearby'] = 'Keine Spieler in der Nähe',
|
||||
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'Fahrzeug Info',
|
||||
['pick_lock'] = 'Fahrzeug öffnen',
|
||||
['vehicle_unlocked'] = 'Fahrzeug ~g~offen~s~',
|
||||
['no_vehicles_nearby'] = 'Keine Fahrzeuge in der Nähe',
|
||||
['impound'] = 'impound vehicle',
|
||||
['impound_prompt'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~impound~s~',
|
||||
['impound_canceled'] = 'you canceled the impound',
|
||||
['impound_canceled_moved'] = 'the impound has been canceled because the vehicle moved',
|
||||
['impound_successful'] = 'you have impounded the vehicle',
|
||||
['search_database'] = 'vehicle information',
|
||||
['search_database_title'] = 'vehicle information - search with registration number',
|
||||
['search_database_error_invalid'] = 'that is ~r~not~s~ a ~y~valid~s~ registration number',
|
||||
['search_database_error_not_found'] = 'that ~y~registration number~s~ is ~r~not~s~ registered to an vehicle!',
|
||||
['search_database_found'] = 'the vehicle is ~y~registered~s~ to ~b~%s~s~',
|
||||
-- Traffic interaction
|
||||
['traffic_interaction'] = 'Straßeninteraktionen',
|
||||
['cone'] = 'Hütchen',
|
||||
['barrier'] = 'Barriere',
|
||||
@@ -81,11 +105,4 @@ Locales['de'] = {
|
||||
['you_have_confweapon'] = 'du hast ~y~x1 konfesziert',
|
||||
['confweapon'] = '~s~ hat von dir ~y~x1 konfesziert',
|
||||
['alert_police'] = 'Polizei alamieren',
|
||||
-- Authorized Vehicles
|
||||
['police'] = 'Streifenfahrzeug 1',
|
||||
['police2'] = 'Streifenfahrzeug 2',
|
||||
['police3'] = 'Streifenfahrzeug 3',
|
||||
['police4'] = 'Zivilfahrzeug',
|
||||
['policeb'] = 'Motorrad',
|
||||
['policet'] = 'Transporter',
|
||||
}
|
||||
|
||||
+18
-15
@@ -5,9 +5,6 @@ Locales['en'] = {
|
||||
['police_wear'] = 'police Outfit',
|
||||
['sheriff_wear'] = 'sheriff Outfit',
|
||||
['lieutenant_wear'] = 'Swatt outfit ',
|
||||
['commandant_wear'] = 'Fbi outfit',
|
||||
['statepd_wear'] = 'State Police outfit',
|
||||
['specops_wear'] = 'Spec OPS outfit',
|
||||
['gilet_wear'] = 'orange reflective jacket',
|
||||
['bullet_wear'] = 'bulletproof vest',
|
||||
['no_outfit'] = 'there\'s no uniform that fits you!',
|
||||
@@ -36,19 +33,30 @@ Locales['en'] = {
|
||||
['handcuff'] = 'cuff / Uncuff',
|
||||
['drag'] = 'drag',
|
||||
['put_in_vehicle'] = 'put in Vehicle',
|
||||
['out_the_vehicle'] = 'take out of vehicle',
|
||||
['out_the_vehicle'] = 'drag out from vehicle',
|
||||
['fine'] = 'fine',
|
||||
['license_check'] = 'manage license',
|
||||
['license_revoke'] = 'revoke license',
|
||||
['license_revoked'] = 'your ~b~%s~s~ has been ~y~revoked~s~!',
|
||||
['licence_you_revoked'] = 'you revoked a ~b~%s~s~ which belonged to ~y~%s~s~',
|
||||
['no_players_nearby'] = 'no players nearby',
|
||||
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'vehicle Info',
|
||||
['pick_lock'] = 'lockpick Vehicle',
|
||||
['vehicle_unlocked'] = 'vehicle ~g~Unlocked~s~',
|
||||
['no_vehicles_nearby'] = 'no vehicles nearby',
|
||||
['traffic_interaction'] = 'Interaction Voirie',
|
||||
['no_vehicles_nearby'] = 'there is no vehicles nearby',
|
||||
['impound'] = 'impound vehicle',
|
||||
['impound_prompt'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~impound~s~',
|
||||
['impound_canceled'] = 'you canceled the impound',
|
||||
['impound_canceled_moved'] = 'the impound has been canceled because the vehicle moved',
|
||||
['impound_successful'] = 'you have impounded the vehicle',
|
||||
['search_database'] = 'vehicle information',
|
||||
['search_database_title'] = 'vehicle information - search with registration number',
|
||||
['search_database_error_invalid'] = 'that is ~r~not~s~ a ~y~valid~s~ registration number',
|
||||
['search_database_error_not_found'] = 'that ~y~registration number~s~ is ~r~not~s~ registered to an vehicle!',
|
||||
['search_database_found'] = 'the vehicle is ~y~registered~s~ to ~b~%s~s~',
|
||||
-- Traffic interaction
|
||||
['traffic_interaction'] = 'Interaction Traffic',
|
||||
['cone'] = 'cone',
|
||||
['barrier'] = 'barrier',
|
||||
['spikestrips'] = 'spikestrips',
|
||||
@@ -86,7 +94,9 @@ Locales['en'] = {
|
||||
['amount_of_deposit'] = 'amount of Deposit',
|
||||
['open_bossmenu'] = 'press ~INPUT_CONTEXT~ to open the menu',
|
||||
['quantity_invalid'] = 'invalid quantity',
|
||||
['have_withdraw'] = 'you have withdrawn x',
|
||||
['have_withdrawn'] = 'you have withdrawn x',
|
||||
['not_enough_in_society'] = 'there\'s not enough of ~r~that item~w~ in the society!',
|
||||
['player_cannot_hold'] = 'you do ~r~not~w~ have enough ~y~free space~w~ in your inventory!',
|
||||
['added'] = 'you added x',
|
||||
['quantity'] = 'quantity',
|
||||
['inventory'] = 'inventory',
|
||||
@@ -103,11 +113,4 @@ Locales['en'] = {
|
||||
['you_have_confweapon'] = 'you have confiscated ~y~x1 ',
|
||||
['confweapon'] = '~s~ confiscated from you ~y~x1 ',
|
||||
['alert_police'] = 'alert police',
|
||||
-- Authorized Vehicles
|
||||
['police'] = 'patrol Vehicle 1',
|
||||
['police2'] = 'patrol Vehicle 2',
|
||||
['police3'] = 'patrol Vehicle 3',
|
||||
['police4'] = 'unmarked Vehicle',
|
||||
['policeb'] = 'motorcycle',
|
||||
['policet'] = 'transport Van',
|
||||
}
|
||||
|
||||
+21
-14
@@ -5,11 +5,13 @@ Locales['es'] = {
|
||||
['police_wear'] = 'Ropa CNP',
|
||||
['sheriff_wear'] = 'Ropa Oficial',
|
||||
['lieutenant_wear'] = 'Ropa Teniente',
|
||||
['commandant_wear'] = 'Ropa Secreta',
|
||||
['statepd_wear'] = 'Ropa Guardia Civil',
|
||||
['specops_wear'] = 'Ropa GEO',
|
||||
['gilet_wear'] = 'orange reflective jacket',
|
||||
['bullet_wear'] = 'bulletproof vest',
|
||||
['no_outfit'] = 'there\'s no uniform that fits you!',
|
||||
['open_cloackroom'] = 'Presionar ~INPUT_CONTEXT~ para abrir la taquilla',
|
||||
-- Armory
|
||||
['remove_object'] = 'take object',
|
||||
['deposit_object'] = 'deposit object',
|
||||
['get_weapon'] = 'Coger arma',
|
||||
['put_weapon'] = 'Depositar arma',
|
||||
['buy_weapons'] = 'Comprar armas',
|
||||
@@ -33,12 +35,27 @@ Locales['es'] = {
|
||||
['put_in_vehicle'] = 'Meter en el vehículo',
|
||||
['out_the_vehicle'] = 'Sacar del vehículo',
|
||||
['fine'] = 'Multa',
|
||||
['license_check'] = 'manage license',
|
||||
['license_revoke'] = 'revoke license',
|
||||
['license_revoked'] = 'your ~b~%s~s~ has been ~y~revoked~s~!',
|
||||
['licence_you_revoked'] = 'you revoked a ~b~%s~s~ which belonged to ~y~%s~s~',
|
||||
['no_players_nearby'] = 'No hay jugadores cerca',
|
||||
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'Información del vehículo',
|
||||
['pick_lock'] = 'Forzar coche',
|
||||
['vehicle_unlocked'] = 'Vehículo desbloqueado~s~',
|
||||
['no_vehicles_nearby'] = 'No hay vehículos cerca',
|
||||
['impound'] = 'impound vehicle',
|
||||
['impound_prompt'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~impound~s~',
|
||||
['impound_canceled'] = 'you canceled the impound',
|
||||
['impound_canceled_moved'] = 'the impound has been canceled because the vehicle moved',
|
||||
['impound_successful'] = 'you have impounded the vehicle',
|
||||
['search_database'] = 'vehicle information',
|
||||
['search_database_title'] = 'vehicle information - search with registration number',
|
||||
['search_database_error_invalid'] = 'that is ~r~not~s~ a ~y~valid~s~ registration number',
|
||||
['search_database_error_not_found'] = 'that ~y~registration number~s~ is ~r~not~s~ registered to an vehicle!',
|
||||
['search_database_found'] = 'the vehicle is ~y~registered~s~ to ~b~%s~s~',
|
||||
-- Traffic interaction
|
||||
['traffic_interaction'] = 'Rutas de interacción',
|
||||
['cone'] = 'Cono',
|
||||
['barrier'] = 'Barrera',
|
||||
@@ -94,14 +111,4 @@ Locales['es'] = {
|
||||
['you_have_confweapon'] = 'Has confiscado ~y~x1 ',
|
||||
['confweapon'] = '~s~ Te han confiscado ~y~x1 ',
|
||||
['alert_police'] = 'Alerta policia',
|
||||
-- Authorized Vehicles
|
||||
['policebike'] = 'Bicicleta Policía',
|
||||
['focuscnp'] = 'Vehículo patrulla 1',
|
||||
['tiguancnp'] = 'Vehículo patrulla 2',
|
||||
['police3'] = 'Vehículo patrulla 3',
|
||||
['police4'] = 'Vehículo Secreta',
|
||||
['policeb'] = 'Moto',
|
||||
['policet'] = 'Furgón policial',
|
||||
['polmav'] = 'Helicóptero de la policía',
|
||||
['buzzard2'] = 'Helicóptero de mando',
|
||||
}
|
||||
|
||||
+13
-12
@@ -4,10 +4,7 @@ Locales['fr'] = {
|
||||
['citizen_wear'] = 'tenue Civil',
|
||||
['police_wear'] = 'tenue Policier',
|
||||
['sheriff_wear'] = 'sheriff Outfit',
|
||||
['lieutenant_wear'] = 'Swatt outfit ',
|
||||
['commandant_wear'] = 'Fbi outfit',
|
||||
['statepd_wear'] = 'State Police outfit',
|
||||
['specops_wear'] = 'Spec OPS outfit',
|
||||
['lieutenant_wear'] = 'Swatt outfit',
|
||||
['gilet_wear'] = 'Gilet orange',
|
||||
['bullet_wear'] = 'Gilet pare-balles',
|
||||
['no_outfit'] = 'Il n\'y a pas d\'uniforme à votre taille...',
|
||||
@@ -43,11 +40,22 @@ Locales['fr'] = {
|
||||
['license_revoked'] = 'your ~b~%s~s~ has been ~y~revoked~s~!',
|
||||
['licence_you_revoked'] = 'you revoked a ~b~%s~s~ which belonged to ~y~%s~s~',
|
||||
['no_players_nearby'] = 'aucun joueur à proximité',
|
||||
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'infos véhicule',
|
||||
['pick_lock'] = 'crocheter véhicule',
|
||||
['vehicle_unlocked'] = 'véhicule ~g~déverouillé~s~',
|
||||
['no_vehicles_nearby'] = 'aucun véhicule à proximité',
|
||||
['impound'] = 'impound vehicle',
|
||||
['impound_prompt'] = 'press ~INPUT_CONTEXT~ to cancel the ~y~impound~s~',
|
||||
['impound_canceled'] = 'you canceled the impound',
|
||||
['impound_canceled_moved'] = 'the impound has been canceled because the vehicle moved',
|
||||
['impound_successful'] = 'you have impounded the vehicle',
|
||||
['search_database'] = 'vehicle information',
|
||||
['search_database_title'] = 'vehicle information - search with registration number',
|
||||
['search_database_error_invalid'] = 'that is ~r~not~s~ a ~y~valid~s~ registration number',
|
||||
['search_database_error_not_found'] = 'that ~y~registration number~s~ is ~r~not~s~ registered to an vehicle!',
|
||||
['search_database_found'] = 'the vehicle is ~y~registered~s~ to ~b~%s~s~',
|
||||
-- Traffic interaction
|
||||
['traffic_interaction'] = 'interaction routière',
|
||||
['cone'] = 'plot',
|
||||
['barrier'] = 'barrière',
|
||||
@@ -103,11 +111,4 @@ Locales['fr'] = {
|
||||
['you_have_confweapon'] = 'vous avez confisqué ~y~x1 ',
|
||||
['confweapon'] = '~s~ vous a confisqué ~y~x1 ',
|
||||
['alert_police'] = 'alerte police',
|
||||
-- Authorized Vehicles
|
||||
['police'] = 'véhicule de patrouille 1',
|
||||
['police2'] = 'véhicule de patrouille 2',
|
||||
['police3'] = 'véhicule de patrouille 3',
|
||||
['police4'] = 'véhicule civil',
|
||||
['policeb'] = 'moto',
|
||||
['policet'] = 'van de transport',
|
||||
}
|
||||
|
||||
+32
-25
@@ -8,7 +8,7 @@ Locales['sv'] = {
|
||||
['gilet_wear'] = 'Reflektiv väst',
|
||||
['bullet_wear'] = 'Skottsäker väst',
|
||||
['no_outfit'] = 'Du har ingen uniform!',
|
||||
['open_cloackroom'] = 'Tryck ~INPUT_CONTEXT~ för att byta ~y~kläder~s~.',
|
||||
['open_cloackroom'] = 'tryck ~INPUT_CONTEXT~ för att byta ~y~kläder~s~.',
|
||||
-- Armory
|
||||
['remove_object'] = 'Ta ut objekt',
|
||||
['deposit_object'] = 'Lägg in objekt',
|
||||
@@ -22,35 +22,49 @@ Locales['sv'] = {
|
||||
['vehicle_out'] = 'Det finns redan en bil ute!',
|
||||
['vehicle_spawner'] = 'Tryck ~INPUT_CONTEXT~ för att ta ut en bil',
|
||||
['store_vehicle'] = 'Tryck ~INPUT_CONTEXT~ för att parkera bilen',
|
||||
['service_max'] = 'Max officers in service: ',
|
||||
-- Action Menu
|
||||
['citizen_interaction'] = 'Handlingar mot civila',
|
||||
['vehicle_interaction'] = 'Handlingar på bilar',
|
||||
['object_spawner'] = 'ta fram ett objekt',
|
||||
|
||||
['id_card'] = 'ID-Kort',
|
||||
['search'] = 'Sök igenom',
|
||||
['handcuff'] = 'Sätt på handfängel / Ta av handfängsel',
|
||||
['drag'] = 'Dra',
|
||||
['put_in_vehicle'] = 'Sätt in i fordon',
|
||||
['out_the_vehicle'] = 'Ta ut ur fordon',
|
||||
['search'] = 'sök igenom',
|
||||
['handcuff'] = 'handbojor',
|
||||
['drag'] = 'dra',
|
||||
['put_in_vehicle'] = 'sätt in i fordon',
|
||||
['out_the_vehicle'] = 'dra ut ur fordon',
|
||||
['fine'] = 'Ge böter',
|
||||
['license_check'] = 'Kolla körkort',
|
||||
['license_revoke'] = 'Neka körkort',
|
||||
['license_revoked'] = 'Ditt ~b~%s~s~ har blivit ~y~nekat~s~!',
|
||||
['licence_you_revoked'] = 'Du nekade ett ~b~%s~s~ som tillhörde ~y~%s~s~',
|
||||
['no_players_nearby'] = 'Ingen i närheten',
|
||||
|
||||
['vehicle_info'] = 'Fordons information',
|
||||
['pick_lock'] = 'Bryt upp fordon',
|
||||
['vehicle_unlocked'] = 'Fordon ~g~Upplåst~s~',
|
||||
['no_vehicles_nearby'] = 'Inga fordon i närheten',
|
||||
['traffic_interaction'] = 'Trafik handlingar',
|
||||
['license_check'] = 'se licenser',
|
||||
['license_revoke'] = 'återkalla licenser',
|
||||
['license_revoked'] = 'Ditt ~b~%s~s~ har blivit ~y~återkallat~s~!',
|
||||
['licence_you_revoked'] = 'du återkallade ett ~b~%s~s~ som tillhörde ~y~%s~s~',
|
||||
['no_players_nearby'] = 'det finns ingen i närheten',
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'fordon',
|
||||
['pick_lock'] = 'bryt upp fordon',
|
||||
['vehicle_unlocked'] = 'fordonet har ~g~låsts upp~s~',
|
||||
['no_vehicles_nearby'] = 'inga fordon i närheten',
|
||||
['impound'] = 'bärga fordonet',
|
||||
['impound_prompt'] = 'tryck ~INPUT_CONTEXT~ för att avbryta ~y~bärgningen~s~',
|
||||
['impound_canceled'] = 'du avbröt bärgningen',
|
||||
['impound_canceled_moved'] = 'bärgningen avbröts på grund av att fordonet har rört sig',
|
||||
['impound_successful'] = 'du har bärgat fordonet',
|
||||
['search_database'] = 'fordonsuppgifter',
|
||||
['search_database_title'] = 'fordonsuppgifter - sök med registreringsnummer',
|
||||
['search_database_error_invalid'] = 'det är ~r~inte~s~ ett ~y~giltigt~s~ registreringsnummer',
|
||||
['search_database_error_not_found'] = 'det ~y~registreringsnummeret~s~ är ~r~inte~s~ registrerat till något fordon!',
|
||||
['search_database_found'] = 'detta fordon är ~y~registrerat~s~ till ~b~%s~s~',
|
||||
-- Traffic interaction
|
||||
['traffic_interaction'] = 'trafiksåtgärder',
|
||||
['cone'] = 'Kon',
|
||||
['barrier'] = 'Barriär',
|
||||
['spikestrips'] = 'Spikmatta',
|
||||
['box'] = 'låda',
|
||||
['cash'] = 'låda med pengar',
|
||||
-- ID Card Menu
|
||||
['name'] =' Namn: ',
|
||||
['bac'] = 'Procent alkohol i blodet : ',
|
||||
['bac'] = 'Procent alkohol i blodet: ',
|
||||
-- Body Search Menu
|
||||
['confiscate_dirty'] = 'Konfiskera svarta pengar: $',
|
||||
['guns_label'] = '--- Guns ---',
|
||||
@@ -97,11 +111,4 @@ Locales['sv'] = {
|
||||
['you_have_confweapon'] = 'Du har konfiskerat ~y~x1 ',
|
||||
['confweapon'] = '~s~ konfiskerade ~y~x1 ',
|
||||
['alert_police'] = 'Meddela polisen',
|
||||
-- Authorized Vehicles
|
||||
['police'] = 'Polisbil',
|
||||
['police2'] = 'Polisbil 2',
|
||||
['police3'] = 'Polisbil 3',
|
||||
['police4'] = 'Civil polisbil',
|
||||
['policeb'] = 'Polis motorcykel',
|
||||
['policet'] = 'Transport bil',
|
||||
}
|
||||
|
||||
@@ -332,6 +332,23 @@ ESX.RegisterServerCallback('esx_policejob:getVehicleInfos', function(source, cb,
|
||||
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_policejob:getVehicleFromPlate', function(source, cb, plate)
|
||||
MySQL.Async.fetchAll(
|
||||
'SELECT * FROM owned_vehicles WHERE plate = @plate',
|
||||
{
|
||||
['@plate'] = plate
|
||||
},
|
||||
function(result)
|
||||
if result[1] ~= nil then
|
||||
local playerName = ESX.GetPlayerFromIdentifier(result[1].owner).name
|
||||
cb(playerName, true)
|
||||
else
|
||||
cb('unknown', false)
|
||||
end
|
||||
end
|
||||
)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_policejob:getArmoryWeapons', function(source, cb)
|
||||
|
||||
TriggerEvent('esx_datastore:getSharedDataStore', 'society_police', function(store)
|
||||
|
||||
Reference in New Issue
Block a user