Skip to content
Documentation
Games & Events4In-Game Casino

r_casino Exports

Server exports to give, take and read r_casino coins from your own scripts, the console commands and sharing coins with r_store.

All exports are server-side. The amount comes first.

With R.UseRStoreCoins = true the casino uses R_Store's balance. Use R_Store's exports instead.

addCoinsToPlayer

exports.r_casino:addCoinsToPlayer(1000, source)

-- offline player, by their stored identifier
exports.r_casino:addCoinsToPlayer(1000, nil, identifier)

The player doesn't need to have opened the casino before.

removeCoinsFromPlayer

exports.r_casino:removeCoinsFromPlayer(100, source)

Takes nothing if the player doesn't have enough.

getPlayerCoinBalance

local balance = exports.r_casino:getPlayerCoinBalance(source)

Console commands

giveCasinoCredits <playerId> <amount>
r_casino:giveCredits <amount> <identifier>

The second one works for offline players, so you can use it as a Tebex delivery command.