#qb-ambulancejob

1 messages · Page 1 of 1 (latest)

upper beacon
#

Try it when your down

mystic talon
true venture
#

Check works even if u have full health. Your not required to be downed to use it

mystic talon
#

that's why i'm finding it strange that it's not working i just downloaded it from github i just changed the coords

true venture
#

yea cos u changed coords

#

go into the client and look for the target function for the check in

#

and extend the distance

mystic talon
true venture
#

qb-ambulancejob>client>main.lua>L923

#
distance = 1.5
#

change it to like 3.0 and test it

mystic talon
mystic talon
#

` 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?

true venture
#

no

#

thats the fucntion below for laying in beds

#

above that is the check in logic

mystic talon
#

ok

mystic talon
#

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

brisk nacelle
#

i have the same problem

supple kiln
#

You have to 3rd eye and left click first and left click again on checkin was in the latest push release.

mystic talon
supple kiln
#

Ya

brisk nacelle
remote gull
#

you must have the check-in coordinates the same as your hospital coordinates otherwise you cannot check in

mystic talon
remote gull
#

['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

mystic talon
#

['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},
},
},

remote gull
#

Yes location needs to be the same as checkin

mystic talon
#

they have to be the same, but aren't the beds?

remote gull
#

Wait 1 sec

mystic talon
#

ok

remote gull
#

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},
},
},

remote gull
#

Pls let me know if it works

mystic talon
remote gull
#

Nice

mystic talon
#

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...

true venture
#

likely broke the config

#

syntax error

#

restart the script and then check f8

#

server console i mean

#

see if u have a parsing error

remote gull
#

['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

mystic talon
#

it only works with 1 coordinate

brisk nacelle
#

^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)

mystic talon
#

???

oak bay
brisk nacelle
#

what

verbal valve
# brisk nacelle what

If you read your error it tells you what the problem is, with your advanced discord role it should be easy

brisk nacelle
verbal valve
#

It states 'vector3' which would indicate you've made an error with one of your vectors

verbal valve
brisk nacelle
verbal valve
#

What am I meant to do with that

mystic talon
#

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

verbal valve
mystic talon
remote gull
remote gull
#

@mystic talon i got it working

mystic talon
#

^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

mystic talon
remote gull
#

Rotate the heading of the vector4 of the beds

mystic talon
#

ok thanks for your help

versed wasp
#

you need to lay sideways to get it to got proper