mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
refactor(xPlayer): delete hasMeta, getMeta no longer print error message
This commit is contained in:
@@ -615,7 +615,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
|
||||
return self.metadata[index]
|
||||
else
|
||||
return print(("[^1ERROR^7] xPlayer.getMeta ^5%s^7 not exist!"):format(index))
|
||||
return
|
||||
end
|
||||
|
||||
end
|
||||
@@ -681,18 +681,6 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
Player(self.source).state:set('metadata', self.metadata, true)
|
||||
end
|
||||
|
||||
function self.hasMeta(index)
|
||||
if not index then
|
||||
return print(("[^1ERROR^7] xPlayer.hasMeta ^5%s^7 is Missing!"):format(index))
|
||||
end
|
||||
|
||||
if type(index) ~= 'string' then
|
||||
return print("[^1ERROR^7] xPlayer.hasMeta ^5index^7 should be ^5string^7!")
|
||||
end
|
||||
|
||||
return self.metadata[index] ~= nil
|
||||
end
|
||||
|
||||
for fnName,fn in pairs(targetOverrides) do
|
||||
self[fnName] = fn(self)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user