Custom Framework
How to set-up casino for your own framework
/config.lua
To enable the Casino to work with a custom framework, please set Active = 4, under Framework settings.
/server/framework/custom.lua
ESX.GetPlayerFromId = function(source)
This file contains the server-side player structure with example data. Make sure to swap out the example data with actual data using your framework, while keeping the original function names and properties intact.
/server/main/cache.lua
Cache:PlayerOwnsVehicle(identifier, plate)
This function verifies if the player is the owner of a vehicle by checking the vehicle plate. Please include your own method to determine whether the player is the owner or not.
Cache:GiveVehicle(playerId, vehicleProps)
This function awards the podium vehicle to the winner after they win it on the Lucky Wheel spin. Please implement your own method to store the vehicle information in the MySQL database.
/server/main/society.lua
GetMoneyFromSociety()
This function retrieves the current balance of the society account.
GiveMoneyToSociety(money)
This function deposits money into the society account.
RemoveMoneyFromSociety(money)
This function deducts money from the society account.
You have the option to customize events within the functions or disable the Society feature in the config.lua file if it's not needed.
/client/framework/playerdata.lua
UpdatePlayerDataForCustomFramework()
This file contains the client-side player structure with example data. Make sure to swap out the example data with actual data using your framework, while keeping the original function names and properties intact.
RemovePlayerHunger(itemName)
RemovePlayerThirst(itemName)
This function handles player hunger removal after eating a snack at the Casino Bar. Please implement your own function for handling hunger removal within it.
/client/job/bossmenu.lua
bossMenu.on("key", function()
This function opens the bossmenu in the Casino office. You can implement your own event to handle the opening of the bossmenu or remove the bossMenu object if the bossmenu checkpoint is not required.
/client/main/casino.lua
SetInventoryBusy(isBusy)
This function allows for locking/unlocking the player's inventory during gameplay or when managing chips at the Cashier. Please implement your own method for handling this functionality.
Last updated