MegaJump for a Team? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: MegaJump for a Team? (
/showthread.php?tid=279688)
MegaJump for a Team? -
ServerScripter - 28.08.2011
Hi , i want to Make a Players in the Team 1 for an exemple , Making A MegaJump
thank you
Re: MegaJump for a Team? -
[MWR]Blood - 28.08.2011
I didn't get what you mean at all.
Could you explain better and with more details, please?
Re: MegaJump for a Team? -
BlackWolf120 - 28.08.2011
what method are u using for defining teams?
gTeams?
Re: MegaJump for a Team? -
ServerScripter - 28.08.2011
yea gTeam[MAX_PLAYERS];
Re: MegaJump for a Team? -
titanak - 28.08.2011
what you mean on Mega Jump ??
Re: MegaJump for a Team? -
ServerScripter - 28.08.2011
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 ...
Re: MegaJump for a Team? -
BlackWolf120 - 28.08.2011
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
Re: MegaJump for a Team? -
ServerScripter - 28.08.2011
Good Job blackwolf ! can u tell me where i put this ?
pawn Код:
forward HighJumpResetter(playerid);
public HighJumpResetter(playerid)
{
PlayerJustJumped[playerid]=0;
return 1;
}
Re: MegaJump for a Team? -
Tigerbeast11 - 28.08.2011
Anywhere you want, just dont put it inside a callback.
Re: MegaJump for a Team? -
Davz*|*Criss - 28.08.2011
Any where in script.
Edit: Tiger was faster.