I use qbcore and was able to add back the vehicle, waiting animation, and prop on ground.
Made the license plate say BLACK and made sure the van cant be stolen.
You will have to adjust your config coords to allow space for a van
The only improvement still needed is:
The only issue is a scrial scratch repairs the weapon , so someone that has some sql knowledge should continue impoving it so it can save the weapons damage , then set the same damage amount back to the scratched weapon.
Citizen.CreateThread(function()
for k, v in pairs(Config.Locations) do
m = math.random(1, #v["coords"]) -- generate a random coordinate
if not v["hideblip"] then -- Create blip if set to false
StoreBlip = AddBlipForCoord(v["coords"][m].x, v["coords"][m].y, v["coords"][m].z)
SetBlipSprite(StoreBlip, v["blipsprite"])
SetBlipScale(StoreBlip, 0.7)
SetBlipDisplay(StoreBlip, 6)
SetBlipColour(StoreBlip, v["blipcolour"])
SetBlipAsShortRange(StoreBlip, true)
BeginTextCommandSetBlipName("STRING")
AddTextComponentSubstringPlayerName(v["label"])
EndTextCommandSetBlipName(StoreBlip)
end
local i = math.random(1, #v["model"]) -- Get random ped model
RequestModel(v["model"][i])
while not HasModelLoaded(v["model"][i]) do
Wait(0)
end
if peds[k] == nil then
peds[k] = CreatePed(0, v["model"][i], v["coords"][m].x, v["coords"][m].y, v["coords"][m].z - 1, v["coords"][m].a, false, false)
SetEntityInvincible(peds[k], true)
SetBlockingOfNonTemporaryEvents(peds[k], true)
FreezeEntityPosition(peds[k], true)
SetEntityNoCollisionEntity(peds[k], PlayerPedId(), false)
TaskStartScenarioInPlace(peds[k], "WORLD_HUMAN_STAND_MOBILE", 0, true) -- Make the ped perform a waiting animation
local spawnOffset = 3.5 -- Adjust this value to position the vehicle properly next to the ped
local pedHeading = GetEntityHeading(peds[k])
local vehicleX = v["coords"][m].x + spawnOffset * math.sin(math.rad(pedHeading))
local vehicleY = v["coords"][m].y + spawnOffset * math.cos(math.rad(pedHeading))
local vehicle = CreateVehicle("gburrito", vehicleX, vehicleY, v["coords"][m].z, pedHeading + 120.0, true, false)
-- Freeze the vehicle
SetVehicleOnGroundProperly(vehicle)
FreezeEntityPosition(vehicle, true)
-- Open the 2 rear doors
SetVehicleDoorOpen(vehicle, 2, false, false) -- Rear left door
SetVehicleDoorOpen(vehicle, 3, false, false) -- Rear right door
-- Set the license plate text to "BLACK"
SetVehicleNumberPlateText(vehicle, "BLACK")
-- Spawn the prop with an offset
local propOffset = -3.8 -- Adjust this value to set the offset distance from the ped
local propX = v["coords"][m].x - 1.3
local propY = v["coords"][m].y + 1.0
local propZ = v["coords"][m].z -1.0 -- Adjust this value to set the prop height appropriately
local prop = CreateObject(GetHashKey("ex_office_swag_guns04"), propX, propY, propZ, true, true, true) -- Spawn the prop
table.insert(props, prop) -- Add the prop to the props table for later reference
-- Print debug messages
if Config.Debug then
print("Prop Created behind Van for Shop - ['"..k.."']")
print("Shop - ['"..k.."']")
end
-- Add qb-target circle zone
if Config.OpenWithItem then
exports['qb-target']:AddCircleZone("['"..k.."']", vector3(v["coords"][m].x, v["coords"][m].y, v["coords"][m].z), 1.5, { name="['"..k.."']", debugPoly=Config.Debug, useZ=true, },{ options = { { event = "ik-illegalweapon:client:ChoiseMenu", icon = "fas fa-certificate", label = Lang:t("target.browse"), item = Config.ItemName, shoptable = v, name = v["label"], }, }, distance = 2.0 })
else
exports['qb-target']:AddCircleZone("['"..k.."']", vector3(v["coords"][m].x, v["coords"][m].y, v["coords"][m].z), 1.5, { name="['"..k.."']", debugPoly=Config.Debug, useZ=true, },{ options = { { event = "ik-illegalweapon:client:ChoiseMenu", icon = "fas fa-certificate", label = Lang:t("target.browse"), shoptable = v, name = v["label"], }, }, distance = 2.0 })
end
end
end
end)```