forked from Nathan-FiveM/qb-inforep
-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.lua
22 lines (21 loc) · 1.02 KB
/
server.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
local QBCore = exports['qb-core']:GetCoreObject()
QBCore.Functions.CreateCallback('qb-inforep:server:Reputation', function(source, cb)
local Player = QBCore.Functions.GetPlayer(source)
local reputation, jobrep
local dealer, heist, crafting, attachment, tow, hotdogs, taxi, truck, guncraftingrep = 0, 0, 0, 0, 0, 0, 0, 0, 0
if QBCore.Functions.GetPlayer(source) then
reputation = Player.PlayerData.metadata
dealer = reputation["dealerrep"]
heist = reputation["heistrep"]
crafting = reputation["craftingrep"]
attachment = reputation["attachmentcraftingrep"]
jobrep = reputation["jobrep"]
tow = jobrep["tow"]
hotdogs = jobrep["hotdog"]
taxi = jobrep["taxi"]
truck = jobrep["trucker"]
guncraftingrep = reputation["guncraftingrep"]
bulletcraftingrep = reputation["bulletcraftingrep"]
end
cb(reputation, dealer, heist, crafting, attachment, jobrep, tow, hotdogs, taxi, truck, guncraftingrep, bulletcraftingrep)
end)