Update player.lua

This commit is contained in:
Katoteki
2023-07-27 19:17:28 +02:00
committed by GitHub
parent df93efb778
commit d67a32ad92
+5 -1
View File
@@ -642,7 +642,11 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
if _type ~= "string" then
return print(("[^1ERROR^7] xPlayer.setMeta ^5value^7 should be ^5string^7 as a subIndex!"):format(value))
end
self.metadata[index] = table.create(0, 0)
if not self.metadata[index] then
self.metadata[index] = table.create(0, 0)
end
self.metadata[index][value] = subValue
end