[HELP] Can get this command to work?
#2

Try this:

Код:
if(strcmp(cmdtext, "/Giveme", true) == 0) //It should be cmdtext and not cmd :P
	{
	  if ((IsPlayerAdmin(playerid)) || PlayerInfo[playerid][pAdmin] >= 5)
	  {
	    if(IsAtBar(playerid))
	    {
	        new adminx[256];
					adminx = strtok(cmdtext, idx);
					if(!strlen(adminx)) {
						SendClientMessage(playerid, COLOR_GREEN, "|_____________________ Admin Giveme____________________|");
						SendClientMessage(playerid, COLOR_WHITE, "USAGE: /Giveme [name]");
				 		SendClientMessage(playerid, COLOR_GREY, "Health, Armour, Deagle, Pistol, SDPistol, Mac10, AK47");
				 		SendClientMessage(playerid, COLOR_GREY, "M4, Sniper, Money, ");
				 		SendClientMessage(playerid, COLOR_LIGHTRED, "[INFO] All guns come with 500 bullets, Money is 1000000$.");
						SendClientMessage(playerid, COLOR_GREEN, "|______________________________________________________|");
						return 1;
					}
				  if(strcmp(adminx,"Health",true) == 0)
					{
						SetPlayerHealth(playerid, 100);
					}
					else if(strcmp(adminx,"Armour",true) == 0)
					{
						SetPlayerArmour(playerid, 100);
					}
					else if(strcmp(adminx,"Deagle",true) == 0)
					{
            GivePlayerWeapon(playerid,24,500);
					}
          else if(strcmp(adminx,"Pistol",true) == 0)
					{
					  GivePlayerWeapon(playerid,22,500);
					}
          else if(strcmp(adminx,"SDPistol",true) == 0)
					{
					  GivePlayerWeapon(playerid,23,500);
					}
					else if(strcmp(adminx,"Mac10",true) == 0)
					{
					  GivePlayerWeapon(playerid,28,500);
					}
					else if(strcmp(adminx,"AK47",true) == 0)
					{
					  GivePlayerWeapon(playerid,30,500);
					}
					else if(strcmp(adminx,"M4",true) == 0)
					{
					  GivePlayerWeapon(playerid,31,500);;
					}
					else if(strcmp(adminx,"Sniper",true) == 0)
					{
					  GivePlayerWeapon(playerid,34,500);
					}
					else if(strcmp(adminx,"Money",true) == 0)
					{
					  GivePlayerMoney(playerid, 1000000);
					}
					else
					{
					  SendClientMessage(playerid, COLOR_WHITE, "[INFO] That name is not on the list!");
					  return 1;
					}
	      }
	    else
	    {
	      SendClientMessage(playerid, COLOR_GREY, "[INFO] You are not an Admin!");
	      return 1;
	    }
		 }
	  }
	  return 1;
	}
Reply


Messages In This Thread
[HELP] Can get this command to work? - by Wasim_Cortez - 28.05.2010, 17:34
Re: [HELP] Can get this command to work? - by DJDhan - 28.05.2010, 17:38
Re: [HELP] Can get this command to work? - by sjvt - 28.05.2010, 17:39
Re: [HELP] Can get this command to work? - by Wasim_Cortez - 28.05.2010, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)