mirror of
https://github.com/jimathy/jim_bridge.git
synced 2026-08-18 22:36:04 +01:00
fix getPlayer() checking users not logged in yet
This commit is contained in:
@@ -412,7 +412,7 @@ function hasJob(job, source, grade)
|
|||||||
elseif isStarted(QBExport) and not isStarted(QBXExport) then
|
elseif isStarted(QBExport) and not isStarted(QBXExport) then
|
||||||
if Core.Functions.GetPlayer then
|
if Core.Functions.GetPlayer then
|
||||||
local player = Core.Functions.GetPlayer(src)
|
local player = Core.Functions.GetPlayer(src)
|
||||||
if not player then print("Player not found for src: "..src) end
|
if not player then goto skip end
|
||||||
local jobinfo = player.PlayerData.job
|
local jobinfo = player.PlayerData.job
|
||||||
if jobinfo.name == job then
|
if jobinfo.name == job then
|
||||||
hasJobFlag = true
|
hasJobFlag = true
|
||||||
@@ -437,11 +437,10 @@ function hasJob(job, source, grade)
|
|||||||
if grade and not (grade <= ganginfo.grade.level) then hasJobFlag = false end
|
if grade and not (grade <= ganginfo.grade.level) then hasJobFlag = false end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif isStarted(RSGExport) then
|
elseif isStarted(RSGExport) then
|
||||||
if Core.Functions.GetPlayer then
|
if Core.Functions.GetPlayer then
|
||||||
local player = Core.Functions.GetPlayer(src)
|
local player = Core.Functions.GetPlayer(src)
|
||||||
if not player then print("Player not found for src: "..src) end
|
if not player then goto skip end
|
||||||
local jobinfo = player.PlayerData.job
|
local jobinfo = player.PlayerData.job
|
||||||
if jobinfo.name == job then
|
if jobinfo.name == job then
|
||||||
hasJobFlag = true
|
hasJobFlag = true
|
||||||
@@ -531,6 +530,7 @@ function hasJob(job, source, grade)
|
|||||||
print("^4ERROR^7: ^2No Core detected for hasJob() ^7- ^2Check ^3starter^1.^2lua^7")
|
print("^4ERROR^7: ^2No Core detected for hasJob() ^7- ^2Check ^3starter^1.^2lua^7")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
::skip::
|
||||||
return hasJobFlag, duty
|
return hasJobFlag, duty
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user