🛜Exports
All this exports are only for server side.
HasCooldown
Checks if a player is currently on cooldown (e.g., cannot change job or perform specific actions).
exports['mg-jobCenter']:HasCooldown(identifier)
📌 Parameters:
🔹identifier
→ Unique player identifier (qb-core = citizenid
| esx = ).
📌 Returns:
🔹boolean
→ true
if the player is on cooldown, false
otherwise
GetCooldownRemaining
Gets the remaining cooldown time in seconds.
exports['mg-jobCenter']:GetCooldownRemaining(identifier)
📌 Parameters:
🔹identifier
→ Unique player identifier (qb-core = citizenid
| esx = ).
📌 Returns:
🔹number
→ Seconds remaining on cooldown. Returns 0
if no cooldown is active.
SetPlayerCooldown
Sets/activates a cooldown for a player using the configured cooldown duration (Config.CooldownHours
).
exports['mg-jobCenter']:SetPlayerCooldown(identifier)
RemovePlayerCooldown
Removes a player's cooldown, allowing immediate job change or action.
exports['mg-jobCenter']:RemovePlayerCooldown(identifier)
📌 Parameters:
🔹identifier
→ Unique player identifier (qb-core = citizenid
| esx = ).
Last updated