nasserdfdd Posted August 24, 2015 Share Posted August 24, 2015 can any one make a script if ia 1000 higher in z then the jump will be higher like semi no grvity Link to comment
[XP]~Cnosi~> Posted August 24, 2015 Share Posted August 24, 2015 I don't understand you, can you explain me it? Link to comment
JR10 Posted August 24, 2015 Share Posted August 24, 2015 You can check for the position if the player is above 1000 height, then set his gravity. Make sure that you set the gravity client-side so it's not globally set. Link to comment
TAPL Posted August 25, 2015 Share Posted August 25, 2015 any example Example for what? Link to comment
Moderators Citizen Posted August 25, 2015 Moderators Share Posted August 25, 2015 As setGravitywon't affect ped/players, you have to use setPedGravityinstead, but this function is available on the server side only. So you have to do this on the server-side obviously: setTimer(function () for k, player in ipairs ( getElementsByType( "player" ) ) do -- for all connected players local _, _, z = getElementPosition( player ) -- get his position ( we just care about the z position ) if z >= 1000 then -- if the player's z position is over or equal to 1000 setPedGravity( player, 0.001 ) -- lower his gravity to 0.001 else -- otherwise setPedGravity( player, 0.008 ) -- set his gravity to default one end end end, 1000, 0) -- and do the entire thing every seconds Link to comment
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