zombienation Posted January 17, 2012 Posted January 17, 2012 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
Castillo Posted January 17, 2012 Posted January 17, 2012 https://wiki.multitheftauto.com/wiki/SetVehicleGravity I don't know if it's what you're looking for.
zombienation Posted January 17, 2012 Author Posted January 17, 2012 https://wiki.multitheftauto.com/wiki/SetVehicleGravityI don't know if it's what you're looking for. the info says it can be used for driving on walls, but i can add the gravity limit on the numbers i choose right? so it can be used for making high jumps in stunts? bool setVehicleGravity ( vehicle theVehicle, float x, float y, float z ) i dont understand what the float's part are
SDK Posted January 18, 2012 Posted January 18, 2012 setVehicleGravity ( vehicle, 0, 0, -0.5 ) That would make the vehicle's gravity twice as low
zombienation Posted January 18, 2012 Author Posted January 18, 2012 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
Castillo Posted January 18, 2012 Posted January 18, 2012 You must use a VEHICLE ELEMENT not a VEHICLE MODEL.
zombienation Posted January 18, 2012 Author Posted January 18, 2012 You must use a VEHICLE ELEMENT not a VEHICLE MODEL. thx solidsnake, where can i find the vehicle element of the vehicle i wanna settup with low gravity? when i search on wiki i find this, https://wiki.multitheftauto.com/wiki/Element/Vehicle but its not right i think
Castillo Posted January 18, 2012 Posted January 18, 2012 addCommandHandler("grav", function () local vehicle = getPedOccupiedVehicle(localPlayer) if (vehicle) then setVehicleGravity ( vehicle, 0, 0, -0.5 ) end end)
zombienation Posted January 18, 2012 Author Posted January 18, 2012 thanks man i cant get it to work i tried to add it on server and also client side in meta
Castillo Posted January 18, 2012 Posted January 18, 2012 My bad, I forgot about something, copy the script again. P.S: It's client side.
zombienation Posted January 18, 2012 Author Posted January 18, 2012 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)
mjau Posted January 18, 2012 Posted January 18, 2012 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
zombienation Posted January 19, 2012 Author Posted January 19, 2012 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?
Castillo Posted January 19, 2012 Posted January 19, 2012 That script works perfectly, I do /grav and it works.
zombienation Posted January 19, 2012 Author Posted January 19, 2012 That script works perfectly, I do /grav and it works. its odd that it dont work then, do i need to reconnect when i start the script ?
Castillo Posted January 19, 2012 Posted January 19, 2012 No, you must be in a vehicle and write /grav.
zombienation Posted January 19, 2012 Author Posted January 19, 2012 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now