Skip to content

Commit

Permalink
fix(players): Player source with qb-core
Browse files Browse the repository at this point in the history
  • Loading branch information
antond15 committed May 1, 2022
1 parent 6cb5567 commit 040aa7f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lua54 'yes'

name 'ac_radio'
author 'ANTOND.#8507'
version '1.0.2'
version '1.0.3'
description 'FiveM radio for pma-voice'
repository 'https://github.com/antond15/ac_radio'

Expand Down
5 changes: 3 additions & 2 deletions resource/server/players.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ if server.framework == 'esx' then
-- qb-core
elseif server.framework == 'qb' then
AddEventHandler('QBCore:Server:PlayerLoaded', function(qbPlayer)
onLoaded(source)
local source = qbPlayer.PlayerData.source
local job = qbPlayer.PlayerData.job
server.players[qbPlayer.PlayerData.source] = { [job.name] = job.grade.level }
onLoaded(source)
server.players[source] = { [job.name] = job.grade.level }
end)

AddEventHandler('QBCore:Server:OnJobUpdate', function(source, job)
Expand Down

0 comments on commit 040aa7f

Please sign in to comment.