SA-MP Forums Archive
take weapons from player? - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: take weapons from player? (/showthread.php?tid=169158)



take weapons from player? - cruising - 18.08.2010

GivePlayerWeapon(playerid, is to give when spawn or with a cmd. but how to remove weapons from player? if you get kicket from your team you loose your wapons. How to do that?


Re: take weapons from player? - Sky4D - 18.08.2010

pawn Код:
ResetPlayerWeapons(playerid);



Re: take weapons from player? - cruising - 18.08.2010

Quote:
Originally Posted by Sky4D
Посмотреть сообщение
pawn Код:
ResetPlayerWeapons(playerid);
Thank you!

How can i do to make so team members cant kill each other?


Re: take weapons from player? - vital2k - 18.08.2010

You can use this funcion - https://sampwiki.blast.hk/wiki/SetPlayerTeam


Re: take weapons from player? - cruising - 18.08.2010

Quote:
Originally Posted by vital2k
Посмотреть сообщение
I already have my teams, but cant figure out how do unable to kill team members

Код:
public OnPlayerSpawn(playerid)
{
	SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
	GivePlayerWeapon(playerid, 46,0); //Pharacute
 	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);
		 		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);
		 		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);
		 		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);
		 		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);
		 		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);
   				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);
		 		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);
		 		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);
    			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);
    			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);
		 		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);
		 		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);
		 		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);
 				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);
 				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);
		 		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);
		 		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);
		 		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);
				ResetPlayerWeapons(playerid);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 2)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
				ResetPlayerWeapons(playerid);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 3)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
				ResetPlayerWeapons(playerid);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 4)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
				ResetPlayerWeapons(playerid);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 5)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
				ResetPlayerWeapons(playerid);
				SetPlayerColor(playerid, COLOR_WHITE);
			}
			else if(PlayerBase[playerid][pRang] == 6)
   			{
				SetPlayerSkin(playerid, 272);
				SetPlayerPos(playerid, 414.6559,2531.7651,19.1601);
				ResetPlayerWeapons(playerid);
				SetPlayerColor(playerid, COLOR_WHITE);
 			}
		}
}