QuakeAcid / qb-weapondrop

GNU General Public License v3.0
9 stars 3 forks source link

Not working #2

Open tday130 opened 1 year ago

tday130 commented 1 year ago

When I drag the phone to use it is not calling the pilot for weapons. Error -

[script:qb-weapondrop] SCRIPT ERROR: @qb-weapondrop/server/main.lua:129: attempt to call a nil value (field 'HasItem') [script:qb-weapondrop] > UseItem (@qb-core/server/functions.lua:222) [script:qb-weapondrop] > handler (@qb-core/server/events.lua:205)

QuakeAcid commented 1 year ago

You most likely have an outdated qb-core resource. There was a change some time ago that changed the QBCore:HasItem event to a QBCore.Functions.HasItem function.

If you want it to work with your qb-core resource, you would have to change the event in this script to use the old HasItem event. But i highly recommend just updating your qb-core, since it is a better way of handling the HasItem check.