PDA

View Full Version : Super Jump


sanrock
18/06/2012, 07:57 PM
How do I make like a super jump for a TEAM_ZOMBIE

So like

If you want to jump on a high building he jumps and he jumps high forward in like running speed?

Andregood
19/06/2012, 10:44 AM
Use GetPlayerVelocity and SetPlayerVelocity.

[MM]RoXoR[FS]
19/06/2012, 10:53 AM
in under onplayerupdate , get player key and then use SetPlayerVelocity

zombieking
19/06/2012, 10:58 AM
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_JUMP))
{
new
Float:x,
Float:y,
Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 10.0);
}
return 1;
}

At top of script:
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))

sanrock
19/06/2012, 12:14 PM
How do I make it so like you can only press jump button every 20 secounds ?

And how to make the jump go alot more faster!

JaKe Elite
19/06/2012, 12:16 PM
set a timer to 20,000 mileseconds

Andregood
19/06/2012, 02:32 PM
Tbh, that isn't jumping, that's teleporting, you have to use setplayervelocity in order to make it a "real" jump, that looks realistic and works. SetPlayerPos = teleport.

mineralo
19/06/2012, 02:57 PM
you can also to set the gravity of server to small one, default gravity is 0.008 but you can put like 0.004 and players could jump higher but slow will jump and fall down. You can try with gravity too :)
http://wiki.sa-mp.com/wiki/SetGravity

Rudy_
19/06/2012, 03:00 PM
GetPlayerVelocity(playerid, X,Y,Z+5);
use this

sanrock
19/06/2012, 04:33 PM
which one part of GetPlayerVelocity changes the jump speed?