SA-MP Forums Archive
Emmergency!!![WRECKED dialog][PLS help]! - 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)
+--- Thread: Emmergency!!![WRECKED dialog][PLS help]! (/showthread.php?tid=331089)



- Cjgogo - 03.04.2012

OK,so I have defined a dialog list containig a 2 lines.This one works.The first line teleports you to a specific location and the second one shows you an INPUT DIALOG(wrecked dialog).Whatever I enter inside the input dialog,doesn't work,and bugs the system... Does any1 have an idea why?Has any1 ecountered this?(To see the dialog,the player enters an icon,to prevent the first dialog showing up over the INPUT 1 I delcared a variable wich is 0 or 1.When is 0 the list dialog shows up,I select second line,input dialog shows up,and the variable is now 1.BUT even if I cancel the input dialog nothing happens,it doesn't send me the "Action abborted message").I'll show you the 2 dialogs:

pawn Код:
if(dialogid==11)
   {
      if(response==0) return SendClientMessage(playerid,COLOR_RED,"Action aborted");
      if(response==1)
      {
          new houseid;
          switch(listitem)
          {
            case 0:
            {
              SetPlayerPos(playerid,HouseInfo[houseid][TelePos][0],HouseInfo[houseid][TelePos][1],HouseInfo[houseid][TelePos][2]);
              SetPlayerInterior(playerid,HouseInfo[houseid][Interior]);
              SendClientMessage(playerid,COLOR_YELLOW,"Home,sweet home!!!");
              SendClientMessage(playerid,COLOR_GREEN,"Welcome to your house!");
            }
            case 1:
            {
               gHouseSell[playerid] = 1;
               ShowPlayerDialog(playerid,DIALOG_sHOUSE,DIALOG_STYLE_INPUT,"House Sell Price","Insert price:","Sell","Cancel");//WRECKED dialog
            }
          }
        }
   }//the list dialog

      if(dialogid==13)
      {
         if(response==0) { SendClientMessage(playerid,COLOR_RED,"Action aborted!");gHouseSell[playerid] = 0;}
         if(response==1)
         {
            new houseid;
                HouseInfo[houseid][SellPrice] = strval(inputtext);
                new pName[24];
                GetPlayerName(playerid,pName,sizeof(pName));
                new string[250];
                HouseInfo[houseid][hSell] = 1;
                format(HouseInfo[houseid][Owner],24,"%s",pName);
                format(string,sizeof(string),"{FOR SELL}\nOwner:%s\nSell price:%d$",HouseInfo[houseid][Owner],HouseInfo[houseid][SellPrice]);
                Update3DTextLabelText(HouseInfo[houseid][hText],COLOR_BLUE,string);
                new INI:hFile = INI_Open(HousesDB(houseid));
                INI_SetTag(hFile,"HouseInfo");
                INI_WriteString(hFile,"Owner",pName);
                INI_WriteInt(hFile,"SellPrice",HouseInfo[houseid][SellPrice]);
                INI_WriteInt(hFile,"Interior",HouseInfo[houseid][Interior]);
                INI_WriteFloat(hFile,"TeleX",HouseInfo[houseid][TelePos][0]);
                INI_WriteFloat(hFile,"TeleY",HouseInfo[houseid][TelePos][1]);
                INI_WriteFloat(hFile,"TeleZ",HouseInfo[houseid][TelePos][2]);
                INI_WriteFloat(hFile,"EnterX",HouseInfo[houseid][EnterPos][0]);
                INI_WriteFloat(hFile,"EnterY",HouseInfo[houseid][EnterPos][1]);
                INI_WriteFloat(hFile,"EnterZ",HouseInfo[houseid][EnterPos][2]);
                INI_WriteFloat(hFile,"ExitX",HouseInfo[houseid][ExitPos][0]);
                INI_WriteFloat(hFile,"ExitY",HouseInfo[houseid][ExitPos][1]);
                INI_WriteFloat(hFile,"ExitZ",HouseInfo[houseid][ExitPos][2]);
                INI_WriteInt(hFile,"ForSell",HouseInfo[houseid][hSell]);
                INI_Close(hFile);
                gHouseSell[playerid] = 0;
            }
      }//the input dialog
The variable gHouseSell is 0 when the player connects.So,I hope you don't need the whole code ....It's so annyoing Ive been looking for errors AND I SEE NONE help me it's really annoying it's the alst sstep to finish my house system,and this dialog makes me feel like I see the finish line,but there is a black hole between me and the finish line...:S

To be honest this makes me cry because of madness,so,sorry for bumping,I KNOW the rules,and please admin don't delete my topic,I know I could've edit the previous post,but I want to get help.I saw THIS shit on another server,that if you select an item of the list it shows you another dialog.Apparently,I even tried to replace the dialog,with something like Hi and Bye(Hi and Bye buttons sending the buttons name messages) and it bugged that MSGBOX dialog also,so what am I doing wrong,is the pickup(wich is rotating ofc) bugging me or the way I am combining dialogs?

"Please admin,be understandful,someone also bumped a topic,I saw(not telling name),true he was a newbie,don't delete my post,I am tring to fix this error,since yesterday,thanks in advance foor understanding me!:S


Re: Emmergency!!![WRECKED dialog][PLS help]! - Alternative112 - 03.04.2012

Код:
ShowPlayerDialog(playerid,DIALOG_sHOUSE,DIALOG_STYLE_INPUT,"House Sell Price","Insert price:","Sell","Cancel");//WRECKED dialog
ShowPlayerDialog wants argument 2 to be the dialog ID...make sure that whatever you set DIALOG_sHOUSE to, is the ID that will be used when the user hits Sell or Cancel.