mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-31 10:18:58 +00:00
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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user