Skip to content

Commit

Permalink
chore: (bpt_policejob) introduces the prison menu to the police f6 menu
Browse files Browse the repository at this point in the history
  • Loading branch information
bitpredator committed Jan 7, 2025
1 parent 3c8afe3 commit c3665e8
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 15 additions & 2 deletions server-data/resources/[bpt_addons]/bpt_policejob/client/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ function OpenPoliceActionsMenu()
{ icon = "fas fa-idkyet", title = TranslateCap("fine"), value = "fine" },
{ icon = "fas fa-idkyet", title = TranslateCap("weapon"), value = "weapon" },
{ icon = "fas fa-idkyet", title = TranslateCap("unpaid_bills"), value = "unpaid_bills" },
{ icon = "fas fa-object", title = TranslateCap("jail_menu"), value = "jail_menu" },
}

if Config.EnableLicenses then
Expand Down Expand Up @@ -269,6 +270,8 @@ function OpenPoliceActionsMenu()
ShowPlayerLicense(closestPlayer)
elseif action == "unpaid_bills" then
OpenUnpaidBillsMenu(closestPlayer)
elseif action == "jail_menu" then
TriggerEvent("esx-qalle-jail:openJailMenu")
end
else
ESX.ShowNotification(TranslateCap("no_players_nearby"))
Expand Down Expand Up @@ -381,6 +384,16 @@ function OpenPoliceActionsMenu()
end)
end

function OpenJailMenu(data, menu)
if data.current.value == "jail_menu" then
TriggerEvent("esx-qalle-jail:openJailMenu")
end

if data.current.value == "citizen_interaction" then
OpenPoliceActionsMenu()
end
end

function OpenIdentityCardMenu(player)
ESX.TriggerServerCallback("bpt_policejob:getOtherPlayerData", function(data)
local elements = {
Expand Down Expand Up @@ -870,7 +883,7 @@ AddEventHandler("bpt_policejob:hasEnteredEntityZone", function(entity)
local _ = GetEntityCoords(playerPed)

if IsPedInAnyVehicle(playerPed, false) then
local vehicle = GetVehiclePedIsIn(playerPed)
local vehicle = GetVehiclePedIsIn(playerPed, false)

for i = 0, 7, 1 do
SetVehicleTyreBurst(vehicle, i, true, 1000)
Expand All @@ -896,7 +909,7 @@ AddEventHandler("bpt_policejob:handcuff", function()
Wait(100)
end

TaskPlayAnim(playerPed, "mp_arresting", "idle", 8.0, -8, -1, 49, 0, 0, 0, 0)
TaskPlayAnim(playerPed, "mp_arresting", "idle", 8.0, -8, -1, 49, 0, false, false, false)
RemoveAnimDict("mp_arresting")

SetEnableHandcuffs(playerPed, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,6 @@ Locales["en"] = {
["society_police"] = "Police",
["received_firearms_license"] = "You have received your firearms license",
["released_gun_licence"] = "you have issued your gun licence",
-- Jail
["jail_menu"] = "Jail menu",
}
Original file line number Diff line number Diff line change
Expand Up @@ -163,4 +163,6 @@ Locales["it"] = {
["weapon"] = "Porto D'armi",
["received_firearms_license"] = "Hai ricevuto il porto d'armi",
["released_gun_licence"] = "Hai rilasciato il porto d'armi",
-- Jail
["jail_menu"] = "Menu Carcere",
}

0 comments on commit c3665e8

Please sign in to comment.