Hello, Im trying to do a crate drop and for that i need blip for everyone to see if event is triggered.
Here is what i have client side:
function RemoveBlip()
Citizen.Wait(30000)
RemoveBlip(crateblip)
end
----
RegisterNetEvent('item:drop')
AddEventHandler('item:drop', function()
print("crate")
local coords = GetEntityCoords(GetPlayerPed(-1))
RequestWeaponAsset(GetHashKey("weapon_flare"))
while not HasWeaponAssetLoaded(GetHashKey("weapon_flare")) do
Wait(0)
end
ShootSingleBulletBetweenCoords(coords, coords - vector3(0.0001, 0.0001, 0.0001), 0, false, GetHashKey("weapon_flare"), 0, true, false, -1.0)
Citizen.Wait(10000)
crate = CreateObject(GetHashKey("prop_box_wood02a_pu"), coords.x,coords.y,coords.z+70, true, true, true)
crateblip = AddBlipForEntity(crate)
SetBlipFlashes(crateblip, true)
SetBlipFlashInterval(crateblip, 250)
SetBlipSprite(crateblip, 501)
SetBlipColour(crateblip, 15)
SetEntityDynamic(crate, true)
Citizen.Wait(4500)
pickup = CreateAmbientPickup(GetHashKey("PICKUP_WEAPON_SMG"), coords.x, coords.y, coords.z, 0, 400, 1, false, true)
RemoveBlip()
ActivatePhysics(pickup)
end)
I have there blip created for crate but how to make it for everyone to see if that event is triggered? I know it needs to trigger server event or something but how to start it correctly?