Server Exports
REMEMBER ABOUT CLIENT SIDE AND SERVER SIDE IN CHOOSING EXPORT!
Get Society
Use following export to get society account
local name = 'police'
local society = exports['xnr-bossmenu']:getSociety(name)
print(json.encode(society, {indent=true}))Return:
society:
tablename:
stringtype:
stringbalance:
numberincome:
numberoutcome:
numbertransactions:
table
Add Society Money
Use following export to add money to account
local account = 'ballas'
local amount = 5000
local result = exports['xnr-bossmenu']:addMoney(account, amount)Return:
result:
booleanreturn
trueorfalseif action finished succesfully or not
Remove Society Money
Use following export to remove money from account
local account = 'ballas'
local amount = 7500
local result = exports['xnr-bossmenu']:removeMoney(account, amount)Return:
result:
booleanreturn
trueorfalseif action finished succesfully or not
Get Player Salary
Use following export to get player salary
local playerId = 12
local salary = exports['xnr-bossmenu']:getPlayerSalary(playerId)Return:
salary:
number|false
Reset Player Duty Timer
Use following export to reset player duty timer
local identifier = "char1:123456789"
local success = exports['xnr-bossmenu']:resetDutyTimer(identifier)Return:
success:
boolean
Get Player Duty Time
Use following export to get player duty time
local identifier = "char1:123456789"
local dutyTime = exports['xnr-bossmenu']:getDutyTime(identifier)Return:
dutyTime:
number
Get Player Duty Status
Use following export to get player duty status
local playerId = 2
local dutyStatus = exports['xnr-bossmenu']:getPlayerDutyStatus(playerId)Return:
dutyStatus:
tableidentifier:
stringstatus:
number(0 = off duty, 1 = on duty, 2 = break)job:
stringtime:
numberstartTime:
number
Is Player On Duty
Use following export to get is player on duty
local identifier = "char1:123456789"
local onDuty = exports['xnr-bossmenu']:isPlayerOnDuty(identifier)Return:
onDuty:
boolean
Switch Duty Status
Use following export to switch player duty status
local playerId = 2
local status = 1 -- (0 = off duty, 1 = on duty, 2 = break)
exports['xnr-bossmenu']:switchDuty(playerId, status)Last updated