hi, i'am sorry for my english but can you help me , i want execute
CashoutCore.Functions.CreateUseableItem("visa", function(source, item)
ExecuteCommand("atm")
end)
Width
RegisterCommand('atm', function(source, args, rawCommand)
local src = source
local xPlayer = CashoutCore.Functions.GetPlayer(src)
local visas = xPlayer.Functions.GetItemsByName('visa')
local masters = xPlayer.Functions.GetItemsByName('mastercard')
local cards = {}
.....
But i have this error
SCRIPT ERROR: @rl-atms/server/main.lua:59: attempt to index a nil value (local 'xPlayer')
ref (@cash-extraresources/server/consumables.lua:18)
UseItem (@coaframework/server/functions.lua:101)
handler (@coaframework/server/events.lua:149)