Skip to content

User class

A class to get all the user information.

TIP

If you have a custom framework, you can overwrite methods by added them in the overwrite-functions.lua file

Syntax

lua
function OWFramework.<MethodName>()

Example

lua
--Overwrite the getUser method
function OWFramework.addMoney(source)
  return yourFramework:addMoney(source)
end

Constructor

Syntax

lua
jo.User:get(source)

Parameters

source : integer

The source ID of the player

Return value

Type: User

Return a User class

Example

lua
local user = jo.User:get(source)
print(user:getJob())

Instance Methods

user:addMoney()

Add money to player

user:canBuy()

Return if the user has enough money

user:getIdentifiers()

Return the user identifier and character ID

user:getJob()

Return the user's job

user:getMoney()

Return the user's money.

user:getRPName

Return the user's name

user:removeMoney()

Remove money from player

Last updated: