mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 19:28:52 +00:00
feat(modules/createJob): triggerevent for created jobs
Added a TriggerEvent when a job is created successfully, allowing developers to use an event listener and update ESX.Jobs, instead of importing the whole ESX object.
This commit is contained in:
@@ -90,5 +90,7 @@ function ESX.CreateJob(name, label, grades)
|
||||
|
||||
notify("SUCCESS", currentResourceName, 'Job created successfully: `%s`', name)
|
||||
|
||||
TriggerEvent('esx:jobCreated', name, ESX.Jobs[name])
|
||||
|
||||
return success
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user