Tested with FXServer versions 5848 and 6645, using just cfx-server-data.
Not really an issue with SetPlayerRoutingBucket afaik, but it’s an issue with oal that I can repro consistently.
RegisterCommand('t', function(playerId)
SetPlayerRoutingBucket(playerId, 1)
print('bucket 1:', GetPlayerRoutingBucket(playerId))
SetPlayerRoutingBucket(playerId, 2)
print('bucket 2:', GetPlayerRoutingBucket(playerId))
SetPlayerRoutingBucket(playerId, 0)
print('bucket 0:', GetPlayerRoutingBucket(playerId))
end)
Using tonumber for one of the args on the first native call prevents the issue.
RegisterCommand('t', function(playerId)
SetPlayerRoutingBucket(playerId, tonumber(1))
print('bucket 1:', GetPlayerRoutingBucket(playerId))
SetPlayerRoutingBucket(playerId, 2)
print('bucket 2:', GetPlayerRoutingBucket(playerId))
SetPlayerRoutingBucket(playerId, 0)
print('bucket 0:', GetPlayerRoutingBucket(playerId))
end)