Fix optin toggle and add SetPlayerData function to player object (#757)

* feat(server/player): SetPlayerData

* fix(server/functions): toggling optin
This commit is contained in:
BerkieBb
2022-07-27 11:07:04 +03:00
committed by GitHub
parent d8ba9a8152
commit 827819d002
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -253,6 +253,12 @@ function QBCore.Player.CreatePlayer(PlayerData, Offline)
self.Functions.UpdatePlayerData()
end
function self.Functions.SetPlayerData(key, val)
if not key then return end
self.PlayerData[key] = val
self.Functions.UpdatePlayerData()
end
function self.Functions.SetMetaData(meta, val)
if not meta then return end
meta = meta:lower()