Jump to content

low gravity on vehicles


zombienation

Recommended Posts

Posted

hello,

i was doing some stunts, and i started wondering, is it possible to add low gravity on 1 vehicle?

so that when people use that vehicle, that low gravity is enabled, but when they leave the vehicle, the gravity is back normal

is this possible, if yes, how?

thanks

Posted
setVehicleGravity ( vehicle, 0, 0, -0.5 ) 

That would make the vehicle's gravity twice as low

i tried

setVehicleGravity ( 461, 0, 0, -0.5 )

and

setVehicleGravity ( 461, 0, 0, 0.004 )

none had grav difference :(

i tried the lua as server side and second time as client side

Posted
addCommandHandler("grav", 
function () 
    local vehicle = getPedOccupiedVehicle(localPlayer) 
    if (vehicle) then 
        setVehicleGravity ( vehicle, 0, 0, -0.5 ) 
    end 
end) 

Posted
My bad, I forgot about something, copy the script again.

P.S: It's client side.

Hey whats do u mean with copy the script again? In my script or on this topic?

addCommandHandler("grav", 2. function () 3. local vehicle = getPedOccupiedVehicle(localPlayer) 4. if (vehicle) then 5. setVehicleGravity ( vehicle, 0, 0, -0.5 ) 6. end 7. end)

Posted

Err copy the script solidsnake posted again and repalce with your it is clientside then go in the vehicle you wanna set gravity of and type /grav

Posted

hey,

i copied this script u gave

addCommandHandler("grav",

function ()

local vehicle = getPedOccupiedVehicle(localPlayer)

if (vehicle) then

setVehicleGravity ( vehicle, 0, 0, -0.5 )

end

end)

into a new client.lua, i added the file in the meta as client, after starting in server, it asked for an upgrade, i did upgrade, then i spawn a vehicle, and i get in, and i do /grav, but no difference :( i rly dont know what i'm doing wrong

ps, kimmis says i have to copie the script that he posted again, but i can see only one, maybe u see two? :S

Posted
No, you must be in a vehicle and write /grav.

i did that, first i enter vehicle and then i do command :(

i got the same with admin boost script, but with that its like when i start it after server is already on, it works, but when i start it automaticly, it wont work on the server

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...