AddEventHandler('playerConnecting', function()
local identifier = GetPlayerIdentifier(source)
exports['ata_coinshop']:AddCoin(identifier, 100) -- Give 100 coins on join
end)
local function CanPlayerAfford(identifier, price)
local coins = exports['ata_coinshop']:GetCoin(identifier)
return coins >= price
end
RegisterCommand('customshop', function()
local identifier = GetPlayerIdentifier(source)
local coins = exports['ata_coinshop']:GetCoin(identifier)
if coins >= 50 then
exports['ata_coinshop']:RemoveCoin(identifier, 50)
-- Give item to player
end
end)