MegaJump for a Team?
#7

here u go bro

pawn Код:
new PlayerJustJumped[MAX_PLAYERS];
#define TimeNeededForJump 4000 //adjust this for ur needs

//OnPlayerConnect
PlayerJustJumped[playerid]=0;


public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_JUMP)
    {
            if(gTeam[playerid]==1)//if player is a member of team1
            {
            if(PlayerJustJumped[playerid]==0)//do this so the player cant abuse this jump
                {
                SetPlayerVelocity(playerid,0.0,0.0,5);//the higher this last value is the higher the jump
                PlayerJustJumped[playerid]=1;
                SetTimerEx("HighJumpResetter",TimeNeededForJump,false,"i",playerid);
                }
            }
            else if(gTeam[playerid]==2)
            {
            //further teams...
            }
     }
     return 1;
}


//somewhere else outside of a callback

forward HighJumpResetter(playerid);
public HighJumpResetter(playerid)
{
PlayerJustJumped[playerid]=0;
return 1;
}
i hope i could help
Reply


Messages In This Thread
MegaJump for a Team? - by ServerScripter - 28.08.2011, 18:15
Re: MegaJump for a Team? - by [MWR]Blood - 28.08.2011, 18:16
Re: MegaJump for a Team? - by BlackWolf120 - 28.08.2011, 18:16
Re: MegaJump for a Team? - by ServerScripter - 28.08.2011, 18:19
Re: MegaJump for a Team? - by titanak - 28.08.2011, 18:22
Re: MegaJump for a Team? - by ServerScripter - 28.08.2011, 18:24
Re: MegaJump for a Team? - by BlackWolf120 - 28.08.2011, 18:28
Re: MegaJump for a Team? - by ServerScripter - 28.08.2011, 18:35
Re: MegaJump for a Team? - by Tigerbeast11 - 28.08.2011, 18:40
Re: MegaJump for a Team? - by Davz*|*Criss - 28.08.2011, 18:41

Forum Jump:


Users browsing this thread: 2 Guest(s)