mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-29 02:01:33 +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:
@@ -357,7 +357,7 @@ function QBCore.Functions.ToggleOptin(source)
|
||||
if not license or not QBCore.Functions.HasPermission(source, 'admin') then return end
|
||||
local Player = QBCore.Functions.GetPlayer(source)
|
||||
Player.PlayerData.optin = not Player.PlayerData.optin
|
||||
Player.Functions.SetMetaData('optin', Player.PlayerData.optin)
|
||||
Player.Functions.SetPlayerData('optin', Player.PlayerData.optin)
|
||||
end
|
||||
|
||||
-- Check if player is banned
|
||||
|
||||
Reference in New Issue
Block a user