overextended/ox_core

player.set become nil when value set to false

skizmx opened this issue · 1 comments

skizmx commented

Server

local data = {
    test1 = true,
    test2 = false,
    test3 = 'string'
}

CreateThread(function()
    local player = Ox.GetPlayers(true)[1]
    if player then
        for k, v in pairs(data) do
            player.set(k, v, true)
            print(player.get(k))
        end
    end
end)

Client

RegisterCommand('test', function(source, args, raw)
    print(player.test1, player.test2, player.test3)
end)

Server
Screenshot 2023-08-09 223743

Client
Screenshot 2023-08-09 223502

I see the issue but not much reason to fix it as I intend to move to statebags once filters get merged in 50 years from now.