No team killing
#1

How to make so you cant kill a team member?
Reply
#2

SetPlayerTeam(playerid, 0);
Wiki
Reply
#3

Quote:
Originally Posted by Ernis456
Посмотреть сообщение
SetPlayerTeam(playerid, 0);
Wiki
Thank you!
Reply
#4

Quote:
Originally Posted by Ernis456
Посмотреть сообщение
SetPlayerTeam(playerid, 0);
Wiki
wth? with that i cant kill anyone

Nwm...i was stupid and didn't think, it works just fine
Reply
#5

errm, make sure you made the other player(s) in a different team.... like: SetPlayerTeam(playerid,1);
SetPlayerTeam(playerid,2); the players who are in team 1 cant kill eachother, they can kill team 2 though.
Reply
#6

Quote:
Originally Posted by Mike_Peterson
Посмотреть сообщение
errm, make sure you made the other player(s) in a different team.... like: SetPlayerTeam(playerid,1);
SetPlayerTeam(playerid,2); the players who are in team 1 cant kill eachother, they can kill team 2 though.
Like this?
Код:
public OnPlayerSpawn(playerid)
{
	SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	GivePlayerWeapon(playerid, 46,0); //Pharacute
	GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
	GivePlayerWeapon(playerid, 30, 100); //AK-47
 	if(IsPlayerConnected(playerid))
	{
		if(PlayerBase[playerid][pMedlem] == 1 || PlayerBase[playerid][pLedare] == 1)
		{
   			if(PlayerBase[playerid][pRang] == 1)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
				SetPlayerTeam(playerid, 1);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_DBLUE);
			}
			else if(PlayerBase[playerid][pRang] == 2)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
				SetPlayerTeam(playerid, 1);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_DBLUE);
			}
			else if(PlayerBase[playerid][pRang] == 3)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
				SetPlayerTeam(playerid, 1);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_DBLUE);
			}
			else if(PlayerBase[playerid][pRang] == 4)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
				SetPlayerTeam(playerid, 1);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_DBLUE);
			}
			else if(PlayerBase[playerid][pRang] == 5)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
				SetPlayerTeam(playerid, 1);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_DBLUE);
			}
			else if(PlayerBase[playerid][pRang] == 6)
   			{
				SetPlayerSkin(playerid, 61);
				SetPlayerPos(playerid, 1998.3118,-2352.3438,13.5469);
				SetPlayerTeam(playerid, 1);
   				GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_DBLUE);
			}
		}
 	    else if (PlayerBase[playerid][pMedlem] == 2 || PlayerBase[playerid][pLedare] == 2)
		{
   			if(PlayerBase[playerid][pRang] == 1)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
				SetPlayerTeam(playerid, 2);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, c_y);
			}
			else if(PlayerBase[playerid][pRang] == 2)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
				SetPlayerTeam(playerid, 2);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, c_y);
			}
			else if(PlayerBase[playerid][pRang] == 3)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
				SetPlayerTeam(playerid, 2);
    			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, c_y);
			}
			else if(PlayerBase[playerid][pRang] == 4)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
				SetPlayerTeam(playerid, 2);
    			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, c_y);
			}
			else if(PlayerBase[playerid][pRang] == 5)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
				SetPlayerTeam(playerid, 2);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, c_y);
			}
			else if(PlayerBase[playerid][pRang] == 6)
   			{
				SetPlayerSkin(playerid, 61);
				SetPlayerPos(playerid, -1468.5074,-206.8094,14.1484);
				SetPlayerTeam(playerid, 2);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, c_y);
			}
		}
  		else if (PlayerBase[playerid][pMedlem] == 3 || PlayerBase[playerid][pLedare] == 3)
		{
   			if(PlayerBase[playerid][pRang] == 1)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
				SetPlayerTeam(playerid, 3);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_GREY);
			}
			else if(PlayerBase[playerid][pRang] == 2)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
				SetPlayerTeam(playerid, 3);
 				GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_GREY);
			}
			else if(PlayerBase[playerid][pRang] == 3)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
				SetPlayerTeam(playerid, 3);
 				GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_GREY);
			}
			else if(PlayerBase[playerid][pRang] == 4)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
				SetPlayerTeam(playerid, 3);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_GREY);
			}
			else if(PlayerBase[playerid][pRang] == 5)
   			{
				SetPlayerSkin(playerid, 255);
				SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
				SetPlayerTeam(playerid, 3);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_GREY);
			}
			else if(PlayerBase[playerid][pRang] == 6)
   			{
				SetPlayerSkin(playerid, 61);
				SetPlayerPos(playerid, 1607.7803,1169.4840,14.2188);
				SetPlayerTeam(playerid, 3);
		 		GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerColor(playerid, COLOR_GREY);
			}
		}
  		else if (PlayerBase[playerid][pMedlem] == 0 || PlayerBase[playerid][pLedare] == 0)
		{
   			if(PlayerBase[playerid][pRang] == 0)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	 			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerTeam(playerid, 0);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 2)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	 			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerTeam(playerid, 0);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 3)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	 			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerTeam(playerid, 0);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 4)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	 			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerTeam(playerid, 0);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 5)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	 			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerTeam(playerid, 0);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 6)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	 			GivePlayerWeapon(playerid, 36, 50); //HS Rocket Launcher **
				GivePlayerWeapon(playerid, 30, 100); //AK-47
				SetPlayerTeam(playerid, 0);
				SetPlayerColor(playerid, COLOR_WHITE);
 			}
		}
}
but it didnt work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)