in the function SpawnObject = function(id, coords) at line 145/147
add this after local obj = CreateObject(model, coords.x, coords.y, coords.z, false, false, true) :
and at line 104-107 in ShowLocations = function() after
if IsControlJustPressed(1, 51) then
Config.ProgressBar(_U(‘progress_bar_picking_up’), Config.Airdrops.CollectTime * 1000)
TriggerServerEvent(‘bryan_airdrops:pickupAirdrop’, v.id)
My apologies, but I tested and didn’t seem to find that bug where it falls through the ground. Perhaps there is no collision on map point where your airdrops are set up?
Is it possible to drop it at the location of whoever runs the airdrop command? i tried to implement it but it was dropping it at the location of everyone in the server
Updated the script. Sorry for the wait, it was summer time . I believe most of the requests have been fulfilled and also will start working on QBCore version.
For those people that airdrop doesn’t spawn, try setting coordinate z 150.0 and above. This update should fix it either way.
By the way, I made a spanish translation adding locales/es.lua:
Locales['es'] = {
-- Command
['command_help'] = 'Desplegar un Suministro Aéreo',
['command_args_lootTable'] = 'ID de Botín en la Tabla| No Necesario',
['command_error_loottable_not_found'] = '(ID: %s) de Botín No Encontrado en la Tabla',
-- 3D Text
['3d_press_to_pickup'] = 'Presiona [E] para coger el Suministro Aéreo',
-- Progress Bar
['progress_bar_picking_up'] = 'Cogiendo el Suministro Aéreo',
-- Notification
['notification_airdrop_spawned'] = '¡Un Suministro Aéreo ha sido Desplegado!',
-- Blip
['blip_name'] = 'Suministro Aéreo',
}
Edit 2:
I got this error after restart:
[script:bryan_airdrop] SCRIPT ERROR: @bryan_airdrop/server.lua:97: attempt to mutate a vector value (local 'coords')
[script:bryan_airdrop] > SpawnAirdrop (@bryan_airdrop/server.lua:97)
[script:bryan_airdrop] > StartAirdropLoop (@bryan_airdrop/server.lua:53)
[script:bryan_airdrop] > fn (@bryan_airdrop/server.lua:13)
my airdrops were setup at different locations around the map such as sidewalks, roads, parking lots, etc. I tried a few different ones and it was more hit or miss. Sometimes the airdrops would fall through the map and sometimes they wouldnt, my solution to this was to just make the airdrop appear rather than do the whole falling thing because I couldnt get the airdrop to ever stop without falling through. Did your most recent update address this issue?