-
Notifications
You must be signed in to change notification settings - Fork 1
/
functions.lua
37 lines (31 loc) · 914 Bytes
/
functions.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local QBCore = exports['qb-core']:GetCoreObject()
function Notification(src, message, type)
--[[
Replace with your notification trigger,
Example: QBCore default notification
]]
TriggerClientEvent('QBCore:Notify', src, message, type)
end
function Prize(src)
--[[
Give prize after claim function,
You can change here whatever you wanna give.
Example is in QBCore but can be changed to every framework.
]]
local prizes = {
cash = 2500,
water = 5,
}
local player = QBCore.Functions.GetPlayer(src)
if player then
for prize, amount in pairs(prizes) do
if prize == "cash" then
player.Functions.AddMoney('cash', amount, 'fivemil_claim')
else
player.Functions.AddItem(prize, amount)
end
end
return true
end
return false
end