How to set Gravity?


#1

I have taken this from natives, but can not seem to implement it correctly. I am hoping someone can show me a proper implementation for use.
// SetGravityLevel
void SET_GRAVITY_LEVEL(int level);
level can be from 0 to 3
0: 9.8
1: 2.4
2: 0.1 - very low
3: 0.0

Currently i have tried in client side the following.

Citizen.CreateThread(function()
    while true do
		Citizen.Wait(1)
                SetGravityLevel(2)
	end
end)

-- also tried float.
Citizen.CreateThread(function()
    while true do
		Citizen.Wait(1)
                SetGravityLevel(0.2)
	end
end)