Prevent Usage
Have your own casino membership logic? Want to add some other requirements before a player can use the slot machine? No problem! Simply navigate to server/utils.lua
and find the following function:
function CanUse(source)
return true
end
Here you can add your own logic. To prevent the player from using the slot machine, simply return false
.
function CanUse(source)
local player = exports.qbx_core:GetPlayer(source)
if not player.PlayerData.metadata.casino_member then
return false
end
return true
end