mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 08:13:21 +00:00
feat(classes/player): added an admin flag inside the obj for easier check
This commit is contained in:
@@ -20,6 +20,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
|
||||
self.weight = weight
|
||||
self.maxWeight = Config.MaxWeight
|
||||
self.metadata = metadata
|
||||
self.admin = Core.IsPlayerAdmin(playerId)
|
||||
if Config.Multichar then self.license = 'license' .. identifier:sub(identifier:find(':'), identifier:len()) else self.license = 'license:' .. identifier end
|
||||
|
||||
ExecuteCommand(('add_principal identifier.%s group.%s'):format(self.license, self.group))
|
||||
|
||||
Reference in New Issue
Block a user