[pomoc] oprema


Započeo sampzone, Jun 10, 2011, 17:18:29 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

mod koji ja koristim: BU

problem: napravio sam komandu kojoj clan bande dobija opremu i oduzima mu pare...ali kako da napravim kao u PD kada msm napravio sam kada kuca komandu da mu da opremu ali kako da napravim kada opet kuca komandu da mu oduzme opremu tj stavi je u ormar?

dio skripte:
evo vam komanda:
if(strcmp(cmd, "/oprema", true) == 0)
	{
	    if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
	    {
	        if(PlayerToPoint(3.0,playerid,1127.1644,-2047.0270,69.0078))
	        {
	            SafeGivePlayerWeapon(playerid,29,50);
	            SafeGivePlayerWeapon(playerid,30,50);
	            SafeGivePlayerWeapon(playerid,24,30);
	            SetPlayerHealth(playerid,100);
                GivePlayerMoney(playerid, -400);
                SendClientMessage(playerid,COLOR_WHITE,"Uzeli ste opremu iz ormarica! (-400 DIN)");
	        }
	        else
	        {
	        	SendClientMessage(playerid,COLOR_WHITE,"Niste pored ormarica sa opremom");
		 	}
    }
     return 1;
	}


slike:/

Hvala za pomoc unaprijed!


Citat: Brat poslato Jun 10, 2011, 17:19:53 POSLE PODNE
imas tut
ti ne se*i

RemovePlayerWeapons

Ali neznam kako bi mogao kad opet kuca /oprema, samo znam za recimo /oprema [0-1]
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

if(strcmp(cmd, "/oruzije", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
			{
				if (PlayerToPoint(3, playerid,2325.0017,-1014.9199,1054.7111))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
			if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			{
				if (PlayerToPoint(3, playerid,1258.1849,-796.3237,1084.2344))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
			if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
			{
				if (PlayerToPoint(3, playerid,311.6524,-169.5158,999.5938))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
			if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
			{
				if (PlayerToPoint(3, playerid,326.6436,307.2555,999.1484))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
  			if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			{
				if (PlayerToPoint(3, playerid,2496.9072,-1696.7539,1014.7422))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
	  			if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
			{
				if (PlayerToPoint(3, playerid,502.1548,-78.5391,998.7578))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 166)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
		return 1;
	}
}

dragan12

Citat: [BU] ..Nikola|Tyler.. poslato Jun 10, 2011, 17:27:35 POSLE PODNE
if(strcmp(cmd, "/oruzije", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			GetPlayerName(playerid, sendername, sizeof(sendername));
			if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
			{
				if (PlayerToPoint(3, playerid,2325.0017,-1014.9199,1054.7111))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
			if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			{
				if (PlayerToPoint(3, playerid,1258.1849,-796.3237,1084.2344))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
			if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
			{
				if (PlayerToPoint(3, playerid,311.6524,-169.5158,999.5938))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
			if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
			{
				if (PlayerToPoint(3, playerid,326.6436,307.2555,999.1484))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 12 || PlayerInfo[playerid][pLeader] == 12)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
  			if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			{
				if (PlayerToPoint(3, playerid,2496.9072,-1696.7539,1014.7422))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
	  			if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
			{
				if (PlayerToPoint(3, playerid,502.1548,-78.5391,998.7578))
				{
					if(OnDuty[playerid]==0)
			        {
			            if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 16)
			            {
				    		format(string, sizeof(string), "* %s je uzeo oruzije iz ormarica.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeGivePlayerWeapon(playerid, 5, 70);
						SetPlayerColor(playerid, 0x8D8DFF00);
						OnDuty[playerid] = 1;
					}
					else if(OnDuty[playerid]==1)
					{
					    if(PlayerInfo[playerid][pMember] == 16 || PlayerInfo[playerid][pLeader] == 166)
					    {
							format(string, sizeof(string), "* %s stavlja oruzije u svoj ormaric.", sendername);
						}
						ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
						SafeResetPlayerWeapons(playerid);
						SetPlayerColor(playerid, 4294901930);
						OnDuty[playerid] = 0;
					}
				}
				else
				{
					SendClientMessage(playerid, COLOR_GRAD2, "   Niste u prostoriji sa ormaricima !");
					return 1;
				}
			}
		return 1;
	}
}


Da ali sa ovim mu nedaje helte i on hoce da mu uzima pare
Tako da treba da dodao i ovo
            SetPlayerHealth(playerid,100);
                GivePlayerMoney(playerid, -400);

Samo kod svakoga gde uzima tacnije gde daje oruzije e tu stavis to  ;)

K4[Я]!K3

*

'Respect cannot be learned, it can only be earned.'

Kod: c
if(strcmp(cmd, "/oprema", true) == 0)
	{
	    if(PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pLeader] == 6)
	    {
	        if(PlayerToPoint(3.0,playerid,1127.1644,-2047.0270,69.0078))
	        {
                if(GetPVarInt(playerid, "babaVanga") == 0) {
	            SafeGivePlayerWeapon(playerid,29,50);
	            SafeGivePlayerWeapon(playerid,30,50);
	            SafeGivePlayerWeapon(playerid,24,30);
	            SetPlayerHealth(playerid,100);
                GivePlayerMoney(playerid, -400);
                SendClientMessage(playerid,COLOR_WHITE,"Uzeli ste opremu iz ormarica! (-400 DIN)");
                return SetPVarInt(playerid, "babaVanga", 1); 
               }
               
                else if(GetPVarInt(playerid, "babaVanga") == 1)
                {
                ResetPlayerWeapons(playerid);
               SetPVarInt(playerid, "babaVanga", 0);
               return SendClientMessage(playerid,COLOR_WHITE,"Vratili ste opremu u ormaric!");
                }
	        }
	        else
	        {
	        	SendClientMessage(playerid,COLOR_WHITE,"Niste pored ormarica sa opremom");
		 	}
    }
     return 1;
	}

tnx...karike rjeseno....moze lock