/buyguns not working
#1

Has anyone got a idea why this wont work ?

Код:
if(strcmp(cmdtext,"/buyguns",true)==0)
	{
		if(gTeam[playerid] == TEAM_MERC)
		{
		  if(usingcomp[playerid] == 1)
		  {
		    if(strlen(cmdtext[9]) == 0)
				{
					SendClientMessage(playerid, COLOR_OOC, "Computer: List of avaible guns!");
					SendClientMessage(playerid, COLOR_OOC, "/buyguns 1 -- ROCKET LAUNCHER -- $20,000");
					SendClientMessage(playerid, COLOR_OOC, "/buyguns 2 -- COMBAT SHOTGUN -- $15,000");
					SendClientMessage(playerid, COLOR_OOC, "/buyguns 3 -- SNIPER RIFLE -- $15,000");
					SendClientMessage(playerid, COLOR_OOC, "/buyguns 4 -- DESERT EAGLE -- $15,000");
					SendClientMessage(playerid, COLOR_OOC, "/buyguns 5 -- SHOTGUN -- $10,000");
					SendClientMessage(playerid, COLOR_OOC, "/buyguns 6 -- M4 -- $10,000");
					SendClientMessage(playerid, COLOR_OOC, "/buyguns 7 -- HEALTH -- $10,000");
					return 1;
				}

				if(strval(cmdtext[9]) == 1)
				{
				  if(GetPlayerMoney(playerid) >= 20000)
				  {
          	SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a rocket launcher!");
          	GivePlayerWeapon(playerid, 36, 5);
          	GivePlayerMoney(playerid, -20000);
          }
        }
				else if(strval(cmdtext[9]) == 2)
				{
 					if(GetPlayerMoney(playerid) >= 15000)
				  {
          	SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a combat shotgun!");
          	GivePlayerWeapon(playerid, 27, 200);
          	GivePlayerMoney(playerid, -15000);
          }
        }
				else if(strval(cmdtext[9]) == 3)
				{
  				if(GetPlayerMoney(playerid) >= 15000)
				  {
          	SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a sniper rifle!");
          	GivePlayerWeapon(playerid, 34, 100);
          	GivePlayerMoney(playerid, -15000);
          }
        }
				else if(strval(cmdtext[9]) == 4)
				{
  				if(GetPlayerMoney(playerid) >= 15000)
				  {
          	SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a desert eagle!");
          	GivePlayerWeapon(playerid, 24, 200);
          	GivePlayerMoney(playerid, -15000);
          }
        }
				else if(strval(cmdtext[9]) == 5)
				{
  				if(GetPlayerMoney(playerid) >= 10000)
				  {
          	SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a shotgun!");
          	GivePlayerWeapon(playerid, 25, 200);
          	GivePlayerMoney(playerid, -10000);
          }
        }
				else if(strval(cmdtext[9]) == 6)
				{
  				if(GetPlayerMoney(playerid) >= 10000)
				  {
          	SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased a M4!");
          	GivePlayerWeapon(playerid, 31, 300);
          	GivePlayerMoney(playerid, -10000);
          }
        }
				else if(strval(cmdtext[9]) == 7)
				{
  				if(GetPlayerMoney(playerid) >= 10000)
				  {
          	SendClientMessage(playerid, COLOR_OOC, "Computer: You purchased health!");
						SetPlayerHealth(playerid, 99.0);
						GivePlayerMoney(playerid, -10000);
          }
        }
			} else SendClientMessage(playerid, COLOR_RED,"You need to use the computer to buy weps !");
		}
		return 1;
	}
Reply


Messages In This Thread
/buyguns not working - by 02manchestera - 10.03.2010, 17:21
Re: /buyguns not working - by aircombat - 10.03.2010, 17:28
Re: /buyguns not working - by 02manchestera - 10.03.2010, 17:47
Re: /buyguns not working - by aircombat - 10.03.2010, 17:54
Re: /buyguns not working - by 02manchestera - 10.03.2010, 18:20
Re: /buyguns not working - by 02manchestera - 10.03.2010, 18:25
Re: /buyguns not working - by Desert - 10.03.2010, 18:36
Re: /buyguns not working - by aircombat - 10.03.2010, 19:26
Re: /buyguns not working - by 02manchestera - 10.03.2010, 19:59

Forum Jump:


Users browsing this thread: 1 Guest(s)