-- 使用QBCore提供的函数
local QBCore = exports['qb-core']:GetCoreObject()
-- 获得玩家,source是触发的事务,通常是玩家的ID,各位可以自己创建线程 print打印出来查看
local src = source
-- 通过QB提供的函数获得当前玩家的信息
local player = QBCore.Functions.GetPlayer(src)
-- qb官方写好的金钱给予方式 player.Functions.AddMoney(moneytype, amount, reason)
player.Functions.AddMoney('cash', '100000', '测试')