Functions
All editable axr_minesgame functions
Functions are made for a basic Dunko vRP base. If your functions are not matching please edit vRP. functions from config/config.lua
Config = {}
Config.command = "minesgame"
Config.getPlayerName = function (src,user_id)
return GetPlayerName(src) or 'Unknown';
end
Config.getUserBalance = function (user_id)
if not user_id then return 0 end;
return vRP.getBankMoney{user_id}
end
Config.giveUserReward = function (user_id,amount)
if not user_id then return 0 end;
return vRP.giveBankMoney{user_id,amount}
end
Config.tryPayBet = function (user_id,amount)
if not user_id then return 0 end;
local src = vRP.getUserSource({user_id});
if not src then return 0 end;
local maxBet = 1000;
if amount > maxBet then return vRPclient.notify(src,{'Nu poti plasa un bet mai mare decat '..maxBet.."$",'error'}) end;
return vRP.tryBankPayment{user_id,amount}
endLast updated