#qb-ambulancejob
1 messages · Page 1 of 1 (latest)
i've already done it and it's still not working i downloaded qb-ambulancejob from qbcore's github
Check works even if u have full health. Your not required to be downed to use it
that's why i'm finding it strange that it's not working i just downloaded it from github i just changed the coords
yea cos u changed coords
go into the client and look for the target function for the check in
and extend the distance
can you tell me the way and which line ?
qb-ambulancejob>client>main.lua>L923
distance = 1.5
change it to like 3.0 and test it
Okay, thanks. Can you give me an opinion? How much larger do you think it should be?
the map is quite big
ok
` for hospitalKey = 1, #Config.Locations['hospital'] do
for bedKey = 1, #Config.Locations['hospital'][hospitalKey]['beds'] do
local v = Config.Locations['hospital'][hospitalKey]['beds'][bedKey]
exports['qb-target']:AddBoxZone('beds' .. bedKey, v.coords, 2.5, 2.3, {
name = 'beds' .. bedKey .. Config.Locations['hospital'][hospitalKey]['name'],
heading = -20,
debugPoly = false,
minZ = v.coords.z - 1,
maxZ = v.coords.z + 1,
}, {
options = {
{
type = 'client',
event = 'qb-ambulancejob:beds',
icon = 'fas fa-bed',
label = 'Layin Bed',
}
},
distance = 4.0
})
end
end
end)
else
in this code, right?
ok
it's still not working
-- Convar turns into a boolean
if Config.UseTarget then
CreateThread(function()
for i = 1, #Config.Locations['checking'] do
local v = Config.Locations['checking'][i]
exports['qb-target']:AddBoxZone('checking' .. i, vector3(v.x, v.y, v.z), 3.5, 2, {
name = 'checking' .. i,
heading = -72,
debugPoly = false,
minZ = v.z - 2,
maxZ = v.z + 2,
}, {
options = {
{
type = 'client',
icon = 'fa fa-clipboard',
event = 'qb-ambulancejob:checkin',
label = 'Check In',
}
},
distance = 1.5
})
end
for hospitalKey = 1, #Config.Locations['hospital'] do
for bedKey = 1, #Config.Locations['hospital'][hospitalKey]['beds'] do
local v = Config.Locations['hospital'][hospitalKey]['beds'][bedKey]
exports['qb-target']:AddBoxZone('beds' .. bedKey, v.coords, 2.5, 2.3, {
name = 'beds' .. bedKey .. Config.Locations['hospital'][hospitalKey]['name'],
heading = -20,
debugPoly = false,
minZ = v.coords.z - 1,
maxZ = v.coords.z + 1,
}, {
options = {
{
type = 'client',
event = 'qb-ambulancejob:beds',
icon = 'fas fa-bed',
label = 'Layin Bed',
}
},
distance = 15.0
})
end
end
end)
else
i have the same problem
You have to 3rd eye and left click first and left click again on checkin was in the latest push release.
stranger
that's all that's missing from my server everyone is complaining about ....
version '1.2.4'
??
??
Ya
the other time ?
you must have the check-in coordinates the same as your hospital coordinates otherwise you cannot check in
['checking'] = {
vector3(309.9963, -582.558, 43.267),
vector3(310.4544, -587.389, 43.267),
vector3(351.9683, -588.361, 28.847),
vector3(339.3836, -584.379, 28.847),
},
['hospital'] = {
{
['name'] = Lang:t('info.pb_hospital'),
['location'] = vector3(308.36, -595.25, 43.28),
This vector needs to be the same as the hospitaal checkin
Is in config line
102
['hospital'] = {
{
['name'] = Lang:t('info.pb_hospital'),
['location'] = vector3(308.36, -595.25, 43.28),
['beds'] = {
{ coords = vector4(313.87, -579.08, 42.90, 163.97), taken = false, model = 1631638868},
{ coords = vector4(314.59, -584.18, 42.90, 339.61), taken = false, model = 1631638868},
{ coords = vector4(322.68, -587.28, 42.90, 338.05), taken = false, model = 1631638868},
{ coords = vector4(350.79, -591.8, 43.1, 336.32), taken = false, model = 2117668672 },
{ coords = vector4(346.99, -590.48, 43.1, 336.32), taken = false, model = 2117668672 },
{ coords = vector4(317.79, -585.47, 42.90, 341.78), taken = false, model = 1631638868},
{ coords = vector4(319.28, -581.05, 42.90, 157.01), taken = false, model = 1631638868},
},
},
Yes location needs to be the same as checkin
they have to be the same, but aren't the beds?
Wait 1 sec
ok
Try this
['hospital'] = {
{
['name'] = Lang:t('info.pb_hospital'),
['location'] = {
vector3(309.9963, -582.558, 43.267),
vector3(310.4544, -587.389, 43.267),
vector3(351.9683, -588.361, 28.847),
vector3(339.3836, -584.379, 28.847),
}
['beds'] = {
{ coords = vector4(313.87, -579.08, 42.90, 163.97), taken = false, model = 1631638868},
{ coords = vector4(314.59, -584.18, 42.90, 339.61), taken = false, model = 1631638868},
{ coords = vector4(322.68, -587.28, 42.90, 338.05), taken = false, model = 1631638868},
{ coords = vector4(350.79, -591.8, 43.1, 336.32), taken = false, model = 2117668672 },
{ coords = vector4(346.99, -590.48, 43.1, 336.32), taken = false, model = 2117668672 },
{ coords = vector4(317.79, -585.47, 42.90, 341.78), taken = false, model = 1631638868},
{ coords = vector4(319.28, -581.05, 42.90, 157.01), taken = false, model = 1631638868},
},
},
Pls let me know if it works
yes i'm going to test it right now
Nice
I can't no longer see the blips...
I copied and pasted all the coordinates you shared me and it didn't work.
But then I pasted just one of them, then that one worked, but not all together...
likely broke the config
syntax error
restart the script and then check f8
server console i mean
see if u have a parsing error
['hospital'] = {
{
['name'] = Lang:t('info.pb_hospital'),
['location'] = {
vector3(309.9963, -582.558, 43.267),
vector3(310.4544, -587.389, 43.267),
vector3(351.9683, -588.361, 28.847),
vector3(339.3836, -584.379, 28.847),
},
['beds'] = {
{ coords = vector4(313.87, -579.08, 42.90, 163.97), taken = false, model = 1631638868},
{ coords = vector4(314.59, -584.18, 42.90, 339.61), taken = false, model = 1631638868},
{ coords = vector4(322.68, -587.28, 42.90, 338.05), taken = false, model = 1631638868},
{ coords = vector4(350.79, -591.8, 43.1, 336.32), taken = false, model = 2117668672 },
{ coords = vector4(346.99, -590.48, 43.1, 336.32), taken = false, model = 2117668672 },
{ coords = vector4(317.79, -585.47, 42.90, 341.78), taken = false, model = 1631638868},
{ coords = vector4(319.28, -581.05, 42.90, 157.01), taken = false, model = 1631638868},
},
},
I fogot the ,
Try this one @mystic talon
If it is not working with 4 locations the you can only use 1 per location
^1SCRIPT ERROR: @qb-ambulancejob/client/main.lua:830: bad argument #1 to 'vector3' (invalid vector type)^7
^3> handler^7 (^5@qb-ambulancejob/client/main.lua^7:830)
^3> fn^7 (^5@qb-target/client.lua^7:1210)
walkstyle nil
expression nil
^1SCRIPT ERROR: @qb-ambulancejob/client/main.lua:830: bad argument #1 to 'vector3' (invalid vector type)^7
^3> handler^7 (^5@qb-ambulancejob/client/main.lua^7:830)
^3> fn^7 (^5@qb-target/client.lua^7:1210)
???
what
If you read your error it tells you what the problem is, with your advanced discord role it should be easy
this is a community for people to help i don't think there's any need to get me out of here i'm already having the same problem as the guy
Read your error
It states 'vector3' which would indicate you've made an error with one of your vectors
And what is that meant to show?
it's well written
All I see is vector3, nothing else
What am I meant to do with that
if this guy is having a problem, let him open another topic to ask for support.
i'm having a problem here i'd like to fix it thanks
Please open your own topic
thanks
if anyone can help me with this coords thing I'd be grateful
I will check for you tonight, can you send me your ambulance job config privately?
^1SCRIPT ERROR: @qb-ambulancejob/client/main.lua:914: attempt to get length of a nil value (field 'checking')^7
I've already managed to get all the checks to work
can anyone explain how to make the beds
Rotate the heading of the vector4 of the beds
ok thanks for your help
you need to lay sideways to get it to got proper