Renovax Scripts
  • Hi
  • Yortis Series
    • Interactions
      • Instalation
      • Config
      • TEBEX
    • Food system
      • Instalation
      • Config
      • TEBEX
  • Golden Meow Series
    • Notification
      • Instalation
      • Showcase
      • TEBEX
  • Nobody
    • Electrician job
      • Config
      • Minigames
      • Instalation
      • TEBEX
Powered by GitBook
On this page
  1. Nobody
  2. Electrician job

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
```
PreviousConfigNextInstalation