i am wondering how to change the rewards to weapons, when they deliver the cargo they get as rewards like a Special Carbine,
How i do that?
Is there a way to add a cooldown betweent each mission a player does? I can do this non stop
Config.Weapons = {
"WEAPON_CARBINERIFLE",
"WEAPON_PISTOL",
"WEAPON_SPECIALCARBINE"
}
RegisterServerEvent("esx_cargodelivery:WEAPON_CARBINERIFLE")
AddEventHandler("esx_cargodelivery:WEAPON_CARBINERIFLE", function(rewards)
--Rewards()
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if not xPlayer then return; end
local WeaponCount = math.random(1, 3)
for WeaponCount,v in pairs(Config.Weapons) do
local randomCount = math.random(0, 120)
xPlayer.addWeapon(v, randomCount)
end
end)
i want to set it to give weapons in reward , in each 3 options , but this code gives both weapons in every choise.
1 Like
military keep killing when i go there
does anyone know how it would be possible to make add a item to the rewards specifically a lockpick