watari-dev Docs
  • Welcome
  • watari_cooldown
    • Installation
    • how to use
Powered by GitBook
On this page
  1. watari_cooldown

how to use

Here is an example of a Lua script.

Client.lua

Config.Crime = 'CooldownName'
Config.CooldownTimer = 120 -- 120 minutes

lib.callback('watari_cooldown_checkCooldown', false, function(isOnCooldown, remainingMinutes)
    if isOnCooldown then
        StartHeist() -- Adjust to match your script
        TriggerEvent('watacool:client:setCooldown', source, Config.Crime, Config.CooldownTimer)
        exports['okokNotify']:Alert('Thermite', 'Cooldown has been initiated', 5000, 'success', true)
    else
        exports['okokNotify']:Alert('Thermite', 'Cooldown is active, ends in '..remainingMinutes..' minutes', 5000, 'error', true)
    end
end, Config.Crime)
PreviousInstallation

Last updated 6 months ago