Super jump?
#1

Is there a super jump FS out there? if so, can someone link me?


What it does:

When you jump, it goes a higher then usual but obviously not to high.


If there's no fs, how can i make it?
Reply
#2

Well, you could detect if they press jump. Then, SetPlayerVelocity z+5 or so.
Reply
#3

Can you show me how.
Reply
#4

From the wiki:
pawn Код:
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;
}
pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
Reply
#5

What that does is, it puts that player in the air...What i need is..


When the player jumps into a certain direction, it goes into that direction but gives a tiny boost.
Reply
#6

any1 please help me out
Reply
#7

What The Toni said. Just replace Get/SetPlayerPos with Get/SetPlayerVelocity.
Reply
#8

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
  if(newkeys & KEY_JUMP && !(oldkeys & KEY_JUMP))
  {
    new Float:v[3]; GetPlayerVelocity(playerid, v[0], v[1], v[2]);
    SetPlayerVelocity(playerid, v[0], v[1], v[2]+3);
  }
  return 1;
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)