Checking Armour
#8

Quote:
Originally Posted by Etch ❽ H
new Float:Armour; GetPlayerArmour(playerid,Armour);
Код:
if(Armour > 99) return SendClientMessage(etc....)
that worked, but I've got a little problem >_>
pawn Код:
if(dialogid == DIALOGID)
    {
        if(response)
        {
            if(listitem == 0)
            {
       ShowPlayerDialog(playerid, DIALOGARMOR, DIALOG_STYLE_LIST, "Armor", "10\n20\n30\n40\n50\n60\n70\n80\n90", "Select", "Cancel");
            }
This Code below still uses the values from the dialog "DIALOGID", so like If I go to buy armor, Instead of using the Menu For Armor, It says "You Just bought a Knife" Etc.
pawn Код:
if(dialogid == 3 )// quick find ArmorShop
    {
    if (response == 1)
    {
      switch (listitem)
      {
      case 0:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
            if(Armour > 99) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
      SetPlayerArmour(playerid,Armour+10);
      }
      case 1:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      SetPlayerArmour(playerid,Armour+20);
      if(Armour > 89) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
            }
      case 2:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      if(Armour > 79) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
        SetPlayerArmour(playerid,Armour+30);
      }
      case 3:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      if(Armour > 69) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
        SetPlayerArmour(playerid,Armour+40);
      }
      case 4:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      if(Armour > 59) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
          SetPlayerArmour(playerid,Armour+50);
          }
      case 5:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      if(Armour > 49) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
            SetPlayerArmour(playerid,Armour+60);
      }
      case 6:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      if(Armour > 39) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
             SetPlayerArmour(playerid,Armour+70);
      }
      case 7:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      if(Armour > 29) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
             SetPlayerArmour(playerid,Armour+80);
      }
      case 8:
      {
      new Float:Armour;
            GetPlayerArmour(playerid,Armour);
      if(Armour > 19) return SendClientMessage(playerid, COLOR_GREY, " You can't buy more then 100 Armor!");
        SetPlayerArmour(playerid,Armour+90);
      }
        }
BTW, I probibly sound like a nub, but This is the first time I've edited a Dialog :/
Reply


Messages In This Thread
Checking Armour - by Anthony_Brassi - 02.05.2010, 19:59
Re: Checking Armour - by aircombat - 02.05.2010, 20:02
Re: Checking Armour - by Anthony_Brassi - 02.05.2010, 20:04
Re: Checking Armour - by aircombat - 02.05.2010, 20:10
Re: Checking Armour - by Anthony_Brassi - 02.05.2010, 20:14
Re: Checking Armour - by Miguel - 02.05.2010, 20:23
Re: Checking Armour - by aircombat - 02.05.2010, 20:23
Re: Checking Armour - by Anthony_Brassi - 02.05.2010, 20:59
Re: Checking Armour - by Anthony_Brassi - 03.05.2010, 14:50

Forum Jump:


Users browsing this thread: 2 Guest(s)