forked from smouj013/qb-inforep
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclient.lua
34 lines (33 loc) · 1.16 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
local QBCore = exports['qb-core']:GetCoreObject()
local PlayerData = QBCore.Functions.GetPlayerData()
local inforepOpen = false
--COMANDO--
RegisterCommand('inforep', function()
if not inforepOpen then
QBCore.Functions.TriggerCallback("qb-inforep:server:Reputation", function(reputation, dealer, heist, crafting, attachment, jobrep, tow, hotdogs, taxi, truck, guncraftingrep, bulletcraftingrep)
SendNUIMessage({
action = "open",
reputation = nil,
dealer = dealer,
crafting = crafting,
attachment = attachment,
jobrep = nil,
tow = tow,
hotdogs = hotdogs,
taxi = taxi,
truck = truck,
heist = heist,
guncraftingrep = guncraftingrep,
bulletcraftingrep = bulletcraftingrep
})
inforepOpen = true
end)
else
SendNUIMessage({
action = "close",
})
inforepOpen = false
end
end)
--TECLA--
RegisterKeyMapping('inforep', 'Abre el panel de info de reputación.', 'keyboard', Config.OpenKey)