[FilterScript] HighJump
#1

Hey guys. I was REALLY bored, so I made this quick FS that might end up helping a lot of people. It's a FS that makes all the players jump higher, kinda like the superjump cheat on SP. On this FS you will not lose health with the fall of the jump (actually you will, but what ever you lost will be added again after landing).

pawn Code:
#include <a_samp>

new Float:FirstHealth[MAX_PLAYERS];
new Float:LastHealth[MAX_PLAYERS];
new IsJumping[MAX_PLAYERS];

forward JumpTimer(playerid);

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" High Jump by marinov");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}

public OnPlayerSpawn(playerid)
{
    IsJumping[playerid] = 0;
    return 1;
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys == KEY_JUMP && oldkeys == KEY_JUMP)&&(IsJumping[playerid] == 0))
    {
        IsJumping[playerid] = 1;
        GetPlayerHealth(playerid, FirstHealth[playerid]);
        SetPlayerVelocity(playerid,0.0,0.0,0.5); //Forces the player to jump high
        SetTimerEx("JumpTimer", 5000, 0, "i", playerid);
    }
    return 1;
}

public JumpTimer(playerid)
{
    GetPlayerHealth(playerid, LastHealth[playerid]);
    new Float:Math;
    Math = LastHealth[playerid] - FirstHealth[playerid];
    if(IsJumping[playerid] == 1)
    {
        if(LastHealth[playerid] < FirstHealth[playerid])
        {
            new Float:Health;
            GetPlayerHealth(playerid, Health);
            SetPlayerHealth(playerid, Health + Math);
            IsJumping[playerid] = 0;
        }
    }
    return 1;
}
Please test and let me know if there's any problem.
Reply


Messages In This Thread
HighJump - by marinov - 06.01.2012, 00:08
Re: HighJump - by KeKe98 - 06.01.2012, 00:52
Re: HighJump - by [MM]18240[FMB] - 08.01.2012, 23:22
Re: HighJump - by Hugo1984 - 09.01.2012, 02:00
Re: HighJump - by iZN - 09.01.2012, 02:54
Re: HighJump - by [MM]18240[FMB] - 16.01.2012, 06:50
Re: HighJump - by Sinner - 16.01.2012, 08:24
Re: HighJump - by T0pAz - 16.01.2012, 08:56
Re: HighJump - by marinov - 21.01.2012, 17:30
Re: HighJump - by Kaperstone - 21.01.2012, 19:55

Forum Jump:


Users browsing this thread: 1 Guest(s)