mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-30 17:58:54 +00:00
Update esx_jobs_sv.lua
This commit is contained in:
@@ -4,6 +4,11 @@ local Players = {}
|
||||
ESX = nil
|
||||
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
||||
|
||||
AddEventHandler('esx:playerLodaded', function(source)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
xPlayer.set('caution', 0)
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:playerDropped', function(source)
|
||||
local _source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
@@ -39,13 +44,6 @@ AddEventHandler('esx_jobs:giveBackCautionInCaseOfDrop', function()
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_jobs:setCaution')
|
||||
AddEventHandler('esx_jobs:setCaution', function()
|
||||
local _source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
xPlayer.set('caution', 0)
|
||||
end)
|
||||
|
||||
local function Work(source, item)
|
||||
SetTimeout(item[1].time, function()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user