Just a simple way for you to give back to your community this Christmas. Players can claim a gift via the tree and server owners can choose what gifts are available via the config file.
is there some way to give money without items?
1 Like
Sure, could replace the server event for something like this
local CashReward = 10000 -- Set the fixed cash reward amount
RegisterServerEvent('caticus_xmas:giveRandomGift')
AddEventHandler('caticus_xmas:giveRandomGift', function()
local src = source
if Config.framework == 'esx' and ESX then
local xPlayer = ESX.GetPlayerFromId(src)
if xPlayer then
xPlayer.addMoney(CashReward)
TriggerClientEvent('esx:showNotification', src, 'You have received $' .. CashReward)
end
elseif Config.framework == 'qbcore' and QBCore then
local Player = QBCore.Functions.GetPlayer(src)
if Player then
Player.Functions.AddMoney('cash', CashReward)
TriggerClientEvent('QBCore:Notify', src, 'You have received $' .. CashReward, 'success')
end
end
end)
1 Like
Thanks!
1 Like

