Teleport available only for faction.
#1

Hello, I'm very new to Pawno and that's why I'm asking this very dumb question.

So, here's the code:

Код:
	else if (PlayerToPointStripped(1, playerid,1173.4712,-1362.9010,13.9723, cx,cy,cz))
	{
		// Teleport
		SetPlayerPos(playerid, 1168.4231,-1347.8389,26.6489);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 270);
		PlayerInfo[playerid][pInt] = 0;
	}
How do I make it available only for one faction? (I'm using LA-RP) because this code doesn't function:

Код:
	else if (PlayerToPointStripped(1, playerid,1173.4712,-1362.9010,13.9723, cx,cy,cz))
	{
		// Teleport
                if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//model
		SetPlayerPos(playerid, 1168.4231,-1347.8389,26.6489);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 270);
		PlayerInfo[playerid][pInt] = 0;
	}
Reply
#2

That if() is not right.
pawn Код:
else if (PlayerToPointStripped(1, playerid,1173.4712,-1362.9010,13.9723, cx,cy,cz))
    {
        // Teleport
        if(PlayerInfo[playerid][pMember] == 4 || PlayerInfo[playerid][pLeader] == 4)//model
        {
            SetPlayerPos(playerid, 1168.4231,-1347.8389,26.6489);
            SetPlayerInterior(playerid,0);
            SetPlayerFacingAngle(playerid, 270);
            PlayerInfo[playerid][pInt] = 0;
        }
    }
Reply
#3

Fantastic, it worked! Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)