Can anyone help me? please.
#4

thanks but after every jump it(SuperJumpEnabled) set's to 0 again... and we have to /jump again to set it enabled... how can i fix it?
pawn Код:
command(jump, playerid, params[])
{
    if(SuperJumpEnabled[playerid] == 0)
    {
        SuperJumpEnabled[playerid] = 1;
        SendClientMessage(playerid, -1, "Super Jump is now enabled.");
    }
    else
    {
        SuperJumpEnabled[playerid] = 0;
        SendClientMessage(playerid, -1, "Super jump is now disabled.");
    }
    return 1;
}
pawn Код:
new
    SuperJumpEnabled[MAX_PLAYERS], // you had a ; here, which is wrong, unless if you want to define just one variable, here you are defining 5 variables (so if you use ;, then you need to type "new (var)" again.
    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] == 1)
        {
            SuperJumpEnabled[playerid] = 0;
            GetPlayerVelocity(playerid, pX, pY, pZ);
            SetPlayerVelocity(playerid, pX,pY, pZ+5);
            SetTimerEx("ResetJumping", 2500, false, "d" , playerid);
        }

    }
    return 1;
}

public ResetJumping(playerid)
{
    IsJumping[playerid] = 0;
    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)