attempt to index a nil value (global 'esx')
attempt to compare number with nil
attempt to index a nil value (global 'esx')
attempt to compare number with nil
attempt to index a nil value (global 'esx')
ESX = nil
local timer = nil
local maksut = 0
local saannit = 0
TriggerEvent('esx:getSharedObject', function(obj)
ESX = obj
end)
RegisterServerEvent('payforplayer2')
AddEventHandler('payforplayer2',function(winnings)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.addMoney(winnings)
end)
RegisterServerEvent('playerpays2')
AddEventHandler('playerpays2',function(bet)
local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
if xPlayer.get('money') >= bet then
xPlayer.removeMoney(bet)
TriggerClientEvent('spinit2',_source)
else
TriggerClientEvent('errormessage2',_source)
end
end)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us