Client editable.lua
myFramework = nil
eventOn = false
if Config.framework == "esx" then
Citizen.CreateThread(function()
while myFramework == nil do
TriggerEvent("esx:getSharedObject", function(obj) myFramework = obj end)
Citizen.Wait(0)
end
end)
elseif Config.framework == "qb" then
Citizen.CreateThread(function()
myFramework = exports["qb-core"]:GetCoreObject()
end)
end
Citizen.CreateThread(function()
while true do
local time = 1000
if eventOn then
time = 0
SetCreateRandomCops(false)
SetCreateRandomCopsNotOnScenarios(false)
SetCreateRandomCopsOnScenarios(false)
SetGarbageTrucks(false)
SetRandomBoats(false)
SetVehicleDensityMultiplierThisFrame(0.0)
SetPedDensityMultiplierThisFrame(0.0)
SetRandomVehicleDensityMultiplierThisFrame(0.0)
SetScenarioPedDensityMultiplierThisFrame(0.0, 0.0)
SetParkedVehicleDensityMultiplierThisFrame(0.0)
-- Clear NPC
local x,y,z = table.unpack(GetEntityCoords(PlayerPedId()))
RemoveVehiclesFromGeneratorsInArea(x - 500.0, y - 500.0, z - 500.0, x + 500.0, y + 500.0, z + 500.0);
end
Citizen.Wait(time)
end
end)
function eventStart()
end
function startAreaPhase()
end
function eventFinish()
end
function setZombiePedEditable(ped)
--SetPedArmour(ped, 300)
end
function revivePlayerEditable(playerPed)
SetPedArmour(playerPed, 100.0)
if Config.respawnWithParachute then
GiveWeaponToPed(playerPed, `gadget_parachute`, 1, false, false)
SetPedComponentVariation(playerPed, 5, 8, 3, 0)
SetEntityCoords(playerPed, playerPedCoords.x, playerPedCoords.y, playerPedCoords.z + 240.0)
end
RequestAnimSet("move_m@drunk@verydrunk")
while not HasAnimSetLoaded("move_m@drunk@verydrunk") do
Citizen.Wait(0)
end
SetPedMovementClipset(playerPed, "move_m@drunk@verydrunk", true)
end
Last updated