Minigames
There is all for minigames
// ```lua
function minigame(jobName)
local success = lib.skillCheck({ 'easy', 'medium', 'medium', 'easy'}, { 'e', 'e', 'e', 'e' })
if success then
lib.callback('way_scripts:electricianjob:reward', jobName)
exports.ox_target:removeZone('repair_generator')
TriggerEvent('ox_lib:notify', {
title = Translate.Notify.title,
description = 'Generator repaired successfully!',
type = 'success'
})
showJobs = false
else
lib.notify({
title = Translate.Notify.title,
description = 'Repair failed!',
type = 'error',
position = 'center-right'
})
end
end
```
Call back for money
// ```lua
lib.callback('way_scripts:electricianjob:reward', jobName)
```
Ox remove target
// ```lua
exports.ox_target:removeZone('repair_generator')
```
Finish job and see target
// ```lua
showJobs = false
```
Remove blip
// ```lua
for _, blip in ipairs(jobs) do
RemoveBlip(blip)
end
```