VIP 設定
Last updated
Last updated
level 對應 Config.Rewards ['數字']
```lua
Config.Rewards = {
['novip'] = { -- 請不要動 ['novip'] 的值,改了就拿不獎勵
label = "一般玩家",
reward = function(_source)
local source = _source
local xPlayer = ESX.GetPlayerFromId(source)
local probability = math.random(1, 100)
if probability >= 1 and probability <= 40 then --- 40%
xPlayer.addInventoryItem('gunkit', 2)
TriggerClientEvent('esx:showNotification', source, '~r~武器副本 ~y~獲得LV.2黑槍升級套件x2 40%')
elseif probability >= 41 and probability <= 60 then --- 20%
xPlayer.addInventoryItem('bread', 2)
TriggerClientEvent('esx:showNotification', source, '~r~武器副本 ~y~獲得LV.2黑槍升級套件x2 40%')
end
end
},
['1'] = {
name = 'vip1',
label = "銅會員",
reward = function(_source)
local source = _source
local xPlayer = ESX.GetPlayerFromId(source)
local probability = math.random(1, 100)
if probability >= 1 and probability <= 40 then --- 40%
xPlayer.addInventoryItem('gunkit', 2)
TriggerClientEvent('esx:showNotification', source, '~r~武器副本 ~y~獲得LV.2黑槍升級套件x2 40%')
elseif probability >= 41 and probability <= 60 then --- 20%
xPlayer.addInventoryItem('bread', 2)
TriggerClientEvent('esx:showNotification', source, '~r~武器副本 ~y~獲得LV.2黑槍升級套件x2 40%')
end
xPlayer.addMoney(8) -- (裡面輸入要給的數量)
end
},
['2'] = {
name = 'vip2',
label = "銀會員",
reward = function(_source)
local source = _source
local xPlayer = ESX.GetPlayerFromId(source)
xPlayer.addInventoryItem('bread', 2) -- ('物品名稱', 數量)
xPlayer.addMoney(8) -- (裡面輸入要給的數量)
end
}
}
```