plugIntegration

🔌 Integration

isHappyHour

This export is versatile; it can check a specific job for an active bonus or return all currently active Happy Hours.

Arguments:

  • jobName: (string) The name/ID of the job to check. (optional)

Returns with arguments:

  • isHappy: (boolean) Whether a Happy Hour is currently active.

  • multiplier: (number) The active multiplier (returns 1.0 if no bonus is active).w

Returns without arguments:

  • activeJobs: (table) A key-value pair table where the key is the job name and the value is the multiplier. Returns an empty table {} if no happy hours are active.


💡 Example: Applying Multiplier to Paycheck

local job = "police"
local baseSalary = 500

local isHappy, multiplier = exports['dots-happyhour']:isHappyHour(job)
local finalSalary = math.floor(baseSalary * multiplier)

print(("Salary: $%d (Active Bonus: %s)"):format(finalSalary, isHappy))

💡 Example: Scoreboard / HUD List

Last updated