Can anyone help me? please.
#6

When i press Jump_Key it jumps but when i do it again and again it does again and again. the timer is not working i guess..
pawn Код:
new
    SuperJumpEnabled[MAX_PLAYERS],
    Float:pX,
    Float:pY,
    Float:pZ,
    IsJumping[MAX_PLAYERS];

forward ResetJumping(playerid);
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(SuperJumpEnabled[playerid] == 1)
    {
        if(newkeys & KEY_JUMP && SuperJumpEnabled[playerid])
        {
            SuperJumpEnabled[playerid] = 1;
            GetPlayerVelocity(playerid, pX, pY, pZ);
            SetPlayerVelocity(playerid, pX,pY, pZ+0.5);
            SetTimerEx("ResetJumping", 2500, true, "d" , playerid);
        }
        return 1;
    }
    return 0;
}

public ResetJumping(playerid)
{
    IsJumping[playerid] = 1;
    return true;
}
Reply


Messages In This Thread
Can anyone help me? please. - by Rudy_ - 25.04.2012, 13:34
Re: Can anyone help me? please. - by Rudy_ - 25.04.2012, 13:53
Re: Can anyone help me? please. - by Pinguinn - 25.04.2012, 13:58
Re: Can anyone help me? please. - by Rudy_ - 25.04.2012, 14:11
Re: Can anyone help me? please. - by SuperViper - 25.04.2012, 14:20
Re: Can anyone help me? please. - by Rudy_ - 25.04.2012, 14:25
Re: Can anyone help me? please. - by SuperViper - 25.04.2012, 14:27
Re: Can anyone help me? please. - by Rudy_ - 25.04.2012, 14:34
Re: Can anyone help me? please. - by SuperViper - 25.04.2012, 14:48
Re: Can anyone help me? please. - by Rudy_ - 25.04.2012, 14:52

Forum Jump:


Users browsing this thread: 3 Guest(s)