My Timer is not working +Rep+
#1

I've tried everything to fix my SetTimeEx but it won't work... here's the timer.

pawn Code:
SetTimerEx("ResetJumping", 2500, true, "d" , playerid); // i got forward ResetJumping..
For what i'm using it is..

pawn Code:
IsJumping[MAX_PLAYERS];
and
pawn Code:
public ResetJumping(playerid)
{
    IsJumping[playerid] = 1;
    return 1;
}
Full code

pawn Code:
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])
        {
            GetPlayerVelocity(playerid, pX, pY, pZ);
            SetPlayerVelocity(playerid, pX,pY, pZ+5);
            SendClientMessage(playerid, COLOR_USE, "Super Jump De-Acticated");
            SetTimerEx("ResetJumping", 2500, true, "d" , playerid);
        }
        return 1;
    }
    return 0;
}

public ResetJumping(playerid)
{
    IsJumping[playerid] = 1;
    return 1;
}
Command to enable/disable it.

pawn Code:
command(jump, playerid, params[])
{
    if(SuperJumpEnabled[playerid] == 0)
    {
        SuperJumpEnabled[playerid] = 1;
        SendClientMessage(playerid, COLOR_USE, "Super Jump is now enabled.");
        SetTimerEx("ResetJumping", 2500, true, "d" , playerid);
    }
    else
    {
        SuperJumpEnabled[playerid] = 0;
        SendClientMessage(playerid, COLOR_USE, "Super jump is now disabled.");
    }
    return 1;
}
No errors
Please someone help me :/
Reply


Messages In This Thread
My Timer is not working +Rep+ - by Rudy_ - 26.04.2012, 13:24
Re: My Timer is not working +Rep+ - by Rudy_ - 26.04.2012, 13:59
Re: My Timer is not working +Rep+ - by SuperViper - 26.04.2012, 14:05
Re: My Timer is not working +Rep+ - by Rudy_ - 26.04.2012, 14:11
Re: My Timer is not working +Rep+ - by ViniBorn - 26.04.2012, 14:17
Re: My Timer is not working +Rep+ - by Rudy_ - 26.04.2012, 14:19
Re: My Timer is not working +Rep+ - by SuperViper - 26.04.2012, 14:21
Re: My Timer is not working +Rep+ - by ViniBorn - 26.04.2012, 14:23
Re: My Timer is not working +Rep+ - by Rudy_ - 26.04.2012, 14:30
Re: My Timer is not working +Rep+ - by SuperViper - 26.04.2012, 14:36

Forum Jump:


Users browsing this thread: 3 Guest(s)