search for isControlPressed @neon river https://docs.fivem.net/natives/?_0xF3A21BCD95725A4A in qb-policejob
#Can someone help me
1 messages · Page 1 of 1 (latest)
https://docs.fivem.net/docs/game-references/controls/#controls change the control id number to the one you want it to
Cfx.re Docs
E is 38
So change it from (LALT) 19 to 38
I dont find this command
-- Police Garage Thread
local function garage()
CreateThread(function()
while true do
Wait(0)
if inGarage and PlayerJob.type == 'leo' then
if PlayerJob.onduty then sleep = 5 end
if IsPedInAnyVehicle(PlayerPedId(), false) then
if IsControlJustReleased(0, 38) then
QBCore.Functions.DeleteVehicle(GetVehiclePedIsIn(PlayerPedId()))
break
end
end
else
break
end
end
end)
end
??
set the use qbtarget = false in sercer.cfg
This part just is checking if a player is in a vehicle, if its true and E is pressed it just deletes the vehicle
you are looking for the part that is responsible for opening the garage
Search for the text that shows when you open the garage and see if the control release information is there
function MenuGarage(currentSelection)
local vehicleMenu = {
{
header = Lang:t('menu.garage_title'),
isMenuHeader = true
}
}
local playerGrade = QBCore.Functions.GetPlayerData().job.grade.level
for grade = 0, playerGrade do
local authorizedVehicles = Config.AuthorizedVehicles[grade]
if authorizedVehicles then
for veh, label in pairs(authorizedVehicles) do
vehicleMenu[#vehicleMenu + 1] = {
header = label,
txt = '',
params = {
event = 'police:client:TakeOutVehicle',
args = {
vehicle = veh,
currentSelection = currentSelection
}
}
}
end
end
end
vehicleMenu[#vehicleMenu + 1] = {
header = Lang:t('menu.close'),
txt = '',
params = {
event = 'qb-menu:client:closeMenu'
}
}
exports['qb-menu']:openMenu(vehicleMenu)
end
Maybe?
i dont use
yeah its def something your going to have to look through the code for manually, its simple all you do is change the key number but im not sure where they have it in qb-policejob, I dont know what they are using to specifically open the garage i dont see it in the code
Oh ok ok
i find this but i dont know
-- Police Garage
local garageZones = {}
for i = 1, #Config.Locations['vehicle'] do
local v = Config.Locations['vehicle'][i]
garageZones[#garageZones + 1] = BoxZone:Create(
vector3(v.x, v.y, v.z), 3, 3, {
name = 'box_zone',
debugPoly = false,
minZ = v.z - 1,
maxZ = v.z + 1,
})
end
local garageCombo = ComboZone:Create(garageZones, { name = 'garageCombo', debugPoly = false })
garageCombo:onPlayerInOut(function(isPointInside, point)
if isPointInside then
inGarage = true
if PlayerJob.type == 'leo' and PlayerJob.onduty then
if IsPedInAnyVehicle(PlayerPedId(), false) then
exports['qb-core']:DrawText(Lang:t('info.store_veh'), 'left')
garage()
else
local currentSelection = 0
for i = 1, #Config.Locations['vehicle'] do
local v = Config.Locations['vehicle'][i]
if #(point - vector3(v.x, v.y, v.z)) < 4 then
currentSelection = i
end
end
exports['qb-menu']:showHeader({
{
header = Lang:t('menu.pol_garage'),
params = {
event = 'police:client:VehicleMenuHeader',
args = {
currentSelection = currentSelection,
}
}
}
})
end
end
else
inGarage = false
exports['qb-menu']:closeMenu()
exports['qb-core']:HideText()
end
end)
end)
yea thats just for creating garage zones i dont see anything specifically stating left alt is a buton to press to do anything
Well, I also say..., I don't know what to do
It's just that it's not in qb-policejob, also in qb-vehiclejob
should be the same solution for both