-
Notifications
You must be signed in to change notification settings - Fork 1
/
client.lua
47 lines (44 loc) · 1.71 KB
/
client.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
38
39
40
41
42
43
44
45
46
47
local QBCore = exports['qb-core']:GetCoreObject()
local TestTarget = Config.TestTarget
local function moneyMenu()
if Config.Menu == 'ox' then
local input = lib.inputDialog('Money Menu', {
{type = 'number', label = 'ID of recipent', description = 'The ID of the recipent.', default = 1, min = '1', required = true, icon = 'user'},
{type = 'number', label = '$ Amount', description = 'The amount of money to send to the recipent.', default = 10, minimun = '1', required = true, icon = 'dollar-sign'},
{type = 'input', label = 'Message For Recipient', description = 'The message to send with the money to the recipent.', default = 'Here, have some cash.', minimun = '0', required = false, icon = 'message'}
})
if not input[1] or not input[2] then return end
if not input then return end
TriggerServerEvent("razed-givecash:server:chargerecipientOX", input[1], input[2], input[3])
end
end
CreateThread(function()
if Config.Target == 'qb' then
exports['qb-target']:AddGlobalPlayer({
options = {
{
action = function()
moneyMenu()
end,
icon = "fas fa-money",
label = "Give Recipient Cash",
},
},
distance = 3.0
})
else if Config.Target == 'ox' then
exports.ox_target:addGlobalPlayer({
options = {
{
onSelect = function()
moneyMenu()
end,
icon = "fas fa-money",
label = "Give Recipient Cash",
},
},
distance = 3.0
})
end
end
end)