MegaJump for a Team?
#1

Hi , i want to Make a Players in the Team 1 for an exemple , Making A MegaJump

thank you
Reply
#2

I didn't get what you mean at all.
Could you explain better and with more details, please?
Reply
#3

what method are u using for defining teams?
gTeams?
Reply
#4

yea gTeam[MAX_PLAYERS];
Reply
#5

what you mean on Mega Jump ??
Reply
#6

Euh , i want the players in Human Team for Example Do a Hight Jump not very very hight , but u know whene we do Cheat in GTA Cj do it ...
Reply
#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
#8

Good Job blackwolf ! can u tell me where i put this ?
pawn Код:
forward HighJumpResetter(playerid);
public HighJumpResetter(playerid)
{
PlayerJustJumped[playerid]=0;
return 1;
}
Reply
#9

Anywhere you want, just dont put it inside a callback.
Reply
#10

Any where in script.

Edit: Tiger was faster.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)