Server Side - CodexCore API
This documentation is for developers
π§ CodexCore.RequestCoreAPI()
CodexCore.RequestCoreAPI()
Returns the core object based on the configured framework.
β Correct Usage:
β Wrong Usage:
ποΈ CodexCore.ExecuteSql(query, params)
CodexCore.ExecuteSql(query, params)
Executes SQL using the configured SQL plugin.
β Correct Usage:
β Wrong Usage:
π CodexCore.RequestInventoryAPI()
CodexCore.RequestInventoryAPI()
Returns the inventory object (VORP only).
β Correct Usage (VORP only):
β Wrong Usage:
π§ββοΈ CodexCore.GetPlayerFromId(source)
CodexCore.GetPlayerFromId(source)
Returns the player object from source.
β Correct Usage:
β Wrong Usage:
π CodexCore.GetCharacterIdentifier(source)
CodexCore.GetCharacterIdentifier(source)
Gets the character's identifier from the source.
β Correct Usage:
β Wrong Usage:
πΌ CodexCore.GetJob(source)
CodexCore.GetJob(source)
Gets the job of a player.
β Correct Usage:
β Wrong Usage:
π° CodexCore.GetMoney(source)
CodexCore.GetMoney(source)
Returns the player's cash money.
β Correct Usage:
β Wrong Usage:
π‘ CodexCore.GetGold(source)
CodexCore.GetGold(source)
Returns the player's gold.
β Correct Usage:
β Wrong Usage:
πͺ CodexCore.GetCents(source)
CodexCore.GetCents(source)
Returns player's cents (VORP only).
β Correct Usage (VORP):
β Wrong Usage (RSG):
β
CodexCore.IsLoaded(source)
CodexCore.IsLoaded(source)
Returns true if the character is loaded.
β Correct Usage:
β Wrong Usage:
π΅ CodexCore.GetAccountMoney(source, account)
CodexCore.GetAccountMoney(source, account)
Returns the player's money for a specific account.
β Correct Usage:
π§Ύ Accounts:
0
= Money1
= Gold2
= Cents (only VORP)
β CodexCore.AddAccountMoney(source, account, amount)
CodexCore.AddAccountMoney(source, account, amount)
Adds money to a specific account.
β Correct Usage:
β Wrong Usage:
β CodexCore.RemoveAccountMoney(source, account, amount)
CodexCore.RemoveAccountMoney(source, account, amount)
Removes money from a specific account.
β Correct Usage:
π§© CodexCore.RegisterServerCallback(name, cb)
CodexCore.RegisterServerCallback(name, cb)
Register a server-side callback.
β Correct Usage:
π¦ CodexCore.AddItem(source, item, amount)
CodexCore.AddItem(source, item, amount)
Gives an item to the player.
β Correct Usage:
β CodexCore.RemoveItem(source, item, amount)
CodexCore.RemoveItem(source, item, amount)
Removes an item from the player.
β Correct Usage:
π’ CodexCore.GetItemCount(source, item)
CodexCore.GetItemCount(source, item)
Returns how many of a specific item the player has.
β Correct Usage:
π₯ CodexCore.CanCarryItem(source, item, amount)
CodexCore.CanCarryItem(source, item, amount)
Checks if the player can carry the item (VORP only).
β Correct Usage:
π CodexCore.RegisterUsableItem(item, cb)
CodexCore.RegisterUsableItem(item, cb)
Registers a usable item callback.
β Correct Usage:
β CodexCore.CloseInventory(source)
CodexCore.CloseInventory(source)
Closes the playerβs inventory UI (VORP only).
β Correct Usage:
π₯ CodexCore.GetJobPlayers(job)
CodexCore.GetJobPlayers(job)
Returns all players with a specific job or jobs.
β Correct Usage:
β Multiple Jobs:
πͺͺ CodexCore.GetUserIdentifier(source)
CodexCore.GetUserIdentifier(source)
Returns the player's license identifier.
β Correct Usage:
𧬠CodexCore.GetUsedCharacter(source)
CodexCore.GetUsedCharacter(source)
Returns the player's current character object or citizenid.
β Correct Usage:
Last updated
Was this helpful?