localUtils=require'modules.utils.client'---@paramsourcenumber---@paramjobJob---@returnboolean---Called before a job starts.---Return `true` to allow the job to start, or `false` to block it.functionclient.exports.beforeJobStart(source,job) -- ?returntrueend---@paramsourcenumber---@paramjobJob---Called after a job has successfully started.---You can use this to set up job data, targets, or notify the player.functionclient.exports.onJobStarted(source,job) -- ?end---@paramsourcenumber---@paramlastJobJob---Called after a job has been successfully stopped.---Use this to clean up, give rewards, or log the completion.functionclient.exports.onJobStopped(source,lastJob) -- ?end--[[ Global Client Events ]]---global event used to open the doors of a networked vehicle---@paramnetIdnumber---@paramdoornumber---@paramopenbooleanRegisterNetEvent('illegalpack:toggleEntityDoor', function(netId,door,open)localentity=NetToVeh(netId)for_, dinpairs(type(door) =='table' anddooror { door }) do (openandSetVehicleDoorOpenorSetVehicleDoorShut)(entity, d, false, false)endend)
local Utils = require 'modules.utils.server'
---@param lobby Lobby
---@param job Job
---@return boolean
---Called before a job starts in the given lobby.
---Return `true` to allow the job to start, or `false` to prevent it.
function server.exports.beforeJobStart(lobby, job)
-- ?
return true
end
---@param lobby Lobby
---@param job Job
---Called after a job has successfully started in the given lobby.
---Use this to initialize job-related server-side logic.
function server.exports.onJobStarted(lobby, job)
-- ?
end
---@param lobby Lobby
---@param lastJob Job
---Called after a job has successfully stopped in the given lobby.
---Use this to finalize job data, give rewards, or clean up.
function server.exports.onJobStopped(lobby, lastJob)
-- ?
end
--[[ Global Server Events ]]
---global event used to open the doors of a networked vehicle
---@param netId number
---@param door number
---@param open boolean
RegisterNetEvent('illegalpack:toggleEntityDoor', function(netId, door, open)
local entity = NetworkGetEntityFromNetworkId(netId)
if not DoesEntityExist(entity) then return end
local owner = NetworkGetEntityOwner(entity)
TriggerClientEvent('illegalpack:toggleEntityDoor', owner, netId, door, open)
end)