Frameworks
On this page you will find anything you need to setup the framework integration of a Codineer product.
The Framework Library is Codineer's in-house interface to manage different frameworks and make integration consistent for each product. All content on this page refers exclusively to the Framework Library.
- 1.ESX Legacy
- 2.ESX Infinity
- 3.QBCore
- 4.Custom Framework (Guide below)
- 5.Standalone
All settings of the framework library can be found in the respective product folder in the framework.json file.
AutoDetect specifies if the Framework Library should try to automatically detect the used framework. Only works for ESX Legacy, ESX Infinity and QBCore.
Sometimes AutoDetect falsely identifies ESX Legacy as ESX Infinity. Manual change is required.
This field sets the framework to use. It is either set by AutoDetect or by yourself. Please note that AutoDetect will overwrite this setting if set to true.
This field sets the ESX Shared Object Event and is only needed for ESX Infinity.
Trying to enter the ESX Legacy Export will break the configuration. There is no need to specify the Export!
This field specifies which resource is exporting the framework functions. Only needed for Custom Framework.
The integration of custom frameworks with the framework library works via exports. It is important that all exports listed below exist and are implemented with the correct parameters and return types.
Name | Parameters | Return type | Description |
---|---|---|---|
GetPlayerWalletMoney | source (player handle; int) | int | Returns the players wallet/cash money |
GetPlayerAccountMoney | source (player handle; int),
account (string) | int | Returns the players money in the given account. 0 if account does not exist |
AddPlayerWalletMoney | source (player handle; int),
amount (int) | void/none | Adds the given amount to the players wallet/cash money |
AddPlayerAccountMoney | source (player handle; int),
amount (int), account (string) | void/none | Adds the given amount to the given account |
RemovePlayerWalletMoney | source (player handle; int),
amount (int) | void/none | Removes the given amount from the players wallet/cash money |
RemovePlayerAccountMoney | source (player handle; int),
amount (int), account (string) | void/none | Removes the given amount from the given account |
AddPlayerInventoryItem | source (player handle; int),
item (string), amount (int) | void/none | Adds the given item to the players inventory |
RemovePlayerInventoryItem | source (player handle; int),
item (string), amount (int) | void/none | Removes the given item from the players inventory |
GetPlayerInventoryItemCount | source (player handle; int),
item (string) | int | Returns the quantity a player has of a given item |
Name | Parameters | Return type | Description |
---|---|---|---|
GetPlayerJobName | None | string | Returns the players job name |
GetPlayerJobGrade | None | int | Returns the players job grade |
GetInventoryItemCount | item (string) | int | Returns the quantity of the given item in the players inventory |
Last modified 4mo ago