How to
#1

Код:
else if (PlayerToPointStripped(1, playerid,1545.0803,-1269.7253,17.4063, cx,cy,cz))
	{
		//hitman
		SetPlayerPos(playerid, 1711.433715,-1669.379272,20.225049);
		GameTextForPlayer(playerid, "~w~Hitman",5000,1);
		SetPlayerInterior(playerid,18);
		SetPlayerFacingAngle(playerid, 0);
		PlayerInfo[playerid][pInt] = 18;
	}
	else if (PlayerToPointStripped(1, playerid,1710.433715,-1669.379272,20.225049, cx,cy,cz))
	{
		//hitam
		SetPlayerPos(playerid, 1547.0803,-1269.7253,17.4063);
		GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 0);
		PlayerInfo[playerid][pInt] = 0;
	}
How do i make it that only one team can go inside
Many thanks
Reply
#2

pawn Код:
if(GetPlayerTeam(playerid) == _YOUR_TEAM_ID_)
{
  // code..
}
GetPlayerTeam-function is just an example, i don't know what you're using to check players team.
Reply
#3

if you already have defined f.ex. a "new PlayerSkill[MAX_PLAYERS]" and its set to an unique value for hitmen only (lets assume its "#define PlayerSkillHitman 2", then just add a
Код:
if(PlayerSkill[playerid]==PlayerSkillHitman)
{
//your code
}
..so it becomes available to all players that got defined like "PlayerSkill[playerid]==PlayerSkillHitman" somewhere.
Reply
#4

if(gTeam[playerid]== Team_Name)
{
YOUR CODE GOES HERE
}
Reply
#5

Quote:
Originally Posted by ◄=[•
WIll[•]=► ]
if(gTeam== Team_Name)
{
YOUR CODE GOES HERE
}
this code will only check for a one slot variable.

pawn Код:
if(gTeam[playerid] == similairtosomething) {
...
}
Reply
#6

Quote:
Originally Posted by KnooL
Quote:
Originally Posted by ◄=[•
WIll[•]=► ]
if(gTeam== Team_Name)
{
YOUR CODE GOES HERE
}
this code will only check for a one slot variable.
That code won't even work, it will output an error in the PAWN compiler.
Reply
#7

Код:
if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
this is what i using mite just work adding that now looking at it lol
Reply
#8

Quote:

Quote from: ◄=[•]WIll[•]=► on Today at 06:19:35 AM
if(gTeam== Team_Name)
{
YOUR CODE GOES HERE
}
this code will only check for a one slot variable.

That code won't even work, it will output an error in the PAWN compiler


Sorry I forgot the [playerid] I meant if(gTeam[playerid]== Team_Name)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)