Skip to content

Commit

Permalink
Update core.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt committed Jul 17, 2024
1 parent 9b3d04a commit 52b8ee4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions shared/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ IR8.Bridge.Core = IR8.Config.Framework ~= 'none' and IR8.Bridge.GetCoreObject()
function IR8.Bridge.GetPlayerName (src)
if IR8.Config.Framework == 'esx' and IR8.Bridge.Core then
local xPlayer = IR8.Bridge.Core.GetPlayerFromId(src)
if xPlayer == nil then return nil end
return xPlayer.getName()
elseif IR8.Config.Framework == 'qb' and IR8.Bridge.Core then
local Player = IR8.Bridge.Core.Functions.GetPlayer(src)
Expand All @@ -42,6 +43,7 @@ end
function IR8.Bridge.GetPlayerIdentifier (src)
if IR8.Config.Framework == 'esx' and IR8.Bridge.Core then
local xPlayer = IR8.Bridge.Core.GetPlayerFromId(src)
if xPlayer == nil then return nil end
return xPlayer.getIdentifier()
elseif IR8.Config.Framework == 'qb' and IR8.Bridge.Core then
local Player = IR8.Bridge.Core.Functions.GetPlayer(src)
Expand All @@ -58,6 +60,7 @@ function IR8.Bridge.GetPlayerPermission (src)

if IR8.Config.Framework == 'esx' and IR8.Bridge.Core then
local xPlayer = IR8.Bridge.Core.GetPlayerFromId(src)
if xPlayer == nil then return groups end
local Group = xPlayer.getGroup()
table.insert(groups, Group)
elseif IR8.Config.Framework == 'qb' and IR8.Bridge.Core then
Expand Down

0 comments on commit 52b8ee4

Please sign in to comment.