feat(classes/player): added an admin flag inside the obj for easier check

This commit is contained in:
Thekuca
2023-09-03 15:30:50 +02:00
committed by GitHub
parent ccf307d20b
commit 0bb956414b
@@ -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))