SA-MP Forums Archive
[Question]Dialog Question - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Question]Dialog Question (/showthread.php?tid=149505)



[Question]Dialog Question - eDz0r - 22.05.2010

I have This Type of Dialog

When I Select The 3rd Info after some seconds it reset to 1st Info
Can I Fix This??



Re: [Question]Dialog Question - ViruZZzZ_ChiLLL - 22.05.2010

Do you mean, goes back to the main Dialog?
When you pressed Info 3....


Re: [Question]Dialog Question - Gamer_Z - 22.05.2010

there is no way to set a selected item, after show dialog, hide dialog and then again show dialog just the 1st item will be selected.


Re: [Question]Dialog Question - eDz0r - 22.05.2010

Quote:
Originally Posted by gamer_Z
there is no way to set a selected item, after show dialog, hide dialog and then again show dialog just the 1st item will be selected.
i will make a video



Re: [Question]Dialog Question - Gamer_Z - 22.05.2010

Quote:
Originally Posted by eDz0r
Quote:
Originally Posted by gamer_Z
there is no way to set a selected item, after show dialog, hide dialog and then again show dialog just the 1st item will be selected.
i will make a video
if it resets you're hiding and showing it ... check your script, no video needed.. I CAN READ, not like the most people...


Re: [Question]Dialog Question - ViruZZzZ_ChiLLL - 22.05.2010

Quote:
Originally Posted by gamer_Z
Quote:
Originally Posted by eDz0r
Quote:
Originally Posted by gamer_Z
there is no way to set a selected item, after show dialog, hide dialog and then again show dialog just the 1st item will be selected.
i will make a video
if it resets you're hiding and showing it ... check your script, no video needed.. I CAN READ, not like the most people...
I feel like its me......

Anyways, its from your code, no need for vids, as gamer_z said.


Re: [Question]Dialog Question - Gamer_Z - 22.05.2010

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Quote:
Originally Posted by gamer_Z
Quote:
Originally Posted by eDz0r
Quote:
Originally Posted by gamer_Z
there is no way to set a selected item, after show dialog, hide dialog and then again show dialog just the 1st item will be selected.
i will make a video
if it resets you're hiding and showing it ... check your script, no video needed.. I CAN READ, not like the most people...
I feel like its me......

Anyways, its from your code, no need for vids, as gamer_z said.
not you, but some people write clearly what they want (this one here not 100% but ye 99%.. xD) and other users just say things that don't have to be...


Re: [Question]Dialog Question - eDz0r - 22.05.2010

Quote:
Originally Posted by gamer_Z
Quote:
Originally Posted by eDz0r
Quote:
Originally Posted by gamer_Z
there is no way to set a selected item, after show dialog, hide dialog and then again show dialog just the 1st item will be selected.
i will make a video
if it resets you're hiding and showing it ... check your script, no video needed.. I CAN READ, not like the most people...
How To Explain i don't Hide And Show

My code
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Money = GetPlayerMoney(playerid);
    if(dialogid == 1)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(Money > 49)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
                    GivePlayerWeapon(playerid,24,50);
                    GivePlayerMoney(playerid,-50);
                }
            }
            if(listitem == 1)
            {
                if(Money > 74)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
                    GivePlayerWeapon(playerid,33,30);
                    GivePlayerMoney(playerid,-75);
                }
            }  
        }
        else
        {
            SendClientMessage(playerid, 0x21DD00FF, "You Exited From Shop Menu");
        }
    }
    return 1;
}
do you think i hide and show?? really i don't wanna injure you


Re: [Question]Dialog Question - Gamer_Z - 22.05.2010

Quote:
Originally Posted by eDz0r
Quote:
Originally Posted by gamer_Z
Quote:
Originally Posted by eDz0r
Quote:
Originally Posted by gamer_Z
there is no way to set a selected item, after show dialog, hide dialog and then again show dialog just the 1st item will be selected.
i will make a video
if it resets you're hiding and showing it ... check your script, no video needed.. I CAN READ, not like the most people...
How To ExplainI didn't Hide And Show

My code
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new Money = GetPlayerMoney(playerid);
    if(dialogid == 1)
    {
        if(response)
        {
            if(listitem == 0)
            {
                if(Money > 49)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
                    GivePlayerWeapon(playerid,24,50);
                    GivePlayerMoney(playerid,-50);
                }
            }
            if(listitem == 1)
            {
                if(Money > 74)
                {
                    SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
                    GivePlayerWeapon(playerid,33,30);
                    GivePlayerMoney(playerid,-75);
                }
            }  
        }
        else
        {
            SendClientMessage(playerid, 0x21DD00FF, "You Exited From Shop Menu");
        }
    }
    return 1;
}
do you think i hide and show?? really i don't wanna injure you
if no other filterscript interacct , no timers are set with ShowPlayerDialog, and you run a fully 100% clean script with only this then maybe u can report this bug to Kye...


Re: [Question]Dialog Question - ViruZZzZ_ChiLLL - 22.05.2010

Why don't you just put it as
pawn Code:
if(dialogid == 1 && response)
 {
  switch(listitem)
  {
   case 0 :
  }
 }
Would be easier and faster ^^


Re: [Question]Dialog Question - Gamer_Z - 22.05.2010

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Why don't you just put it as
pawn Code:
if(dialogid == 1 && response)
 {
 switch(listitem)
  {
  case 0 :
  }
 }
i think if's are faster or not? (as in the PAWN guide i hope i read it somewhere),
and btw if that fixes the 'return to first selection' then lol.. I don't know what to say.


Re: [Question]Dialog Question - eDz0r - 22.05.2010

Quote:
Originally Posted by ViruZZzZ_ChiLLL
Why don't you just put it as
pawn Code:
if(dialogid == 1 && response)
 {
  switch(listitem)
  {
   case 0 :
  }
 }
Would be easier and faster ^^
I Tryed But Same Problem. My Code After "convert"
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1 && response)
{
switch(listitem)
{
case 0:
{
if(GetPlayerMoney(playerid) < 1)
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-50);
}
case 1:
{
if(GetPlayerMoney(playerid) < 1)
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
GivePlayerWeapon(playerid,33,30);
GivePlayerMoney(playerid,-75);
}
case 2:
{
if(GetPlayerMoney(playerid) < 1)
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Sawn-Off Shotgun");
GivePlayerWeapon(playerid,26,25);
GivePlayerMoney(playerid,-150);
}
}
}
return 1;
}



Re: [Question]Dialog Question - ViruZZzZ_ChiLLL - 22.05.2010

Well, show us the main response, the Dialog id 1


Re: [Question]Dialog Question - Gamer_Z - 22.05.2010

maybe ot's real a bug .. or Kye has made a 'auto-refresh' function.


Re: [Question]Dialog Question - [MWR]Blood - 22.05.2010

pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 1 && response)
{
if(listitem==0)
{
if(GetPlayerMoney(playerid) < 1)
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-50);
}
if(listitem==1)
{
if(GetPlayerMoney(playerid) < 1)
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Country Rifle");
GivePlayerWeapon(playerid,33,30);
GivePlayerMoney(playerid,-75);
}
if(listitem==2)
{
if(GetPlayerMoney(playerid) < 1)
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Sawn-Off Shotgun");
GivePlayerWeapon(playerid,26,25);
GivePlayerMoney(playerid,-150);
}
}
}
}
return 1;
}



Re: [Question]Dialog Question - Gamer_Z - 22.05.2010

Quote:
Originally Posted by ikarus❶❸❸❼
pawn Code:
...
if(GetPlayerMoney(playerid) < 1)// if the money of player is smaller than 1? then do...
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-50);//give -50? Man you're stupid...
}
...
U cannot script, or u just don't want to help and spam around the forum to count your posts, i have only ~400 and they are all no spam.
Yours... 99% spam?
U FAIL.

even he scripts better than YOU.



Re: [Question]Dialog Question - [MWR]Blood - 22.05.2010

Quote:
Originally Posted by gamer_Z
Quote:
Originally Posted by ikarus❶❸❸❼
pawn Code:
...
if(GetPlayerMoney(playerid) < 1)// if the money of player is smaller than 1? then do...
{
SendClientMessage(playerid, 0x21DD00FF, "You Bough A Desert Deagle");
GivePlayerWeapon(playerid,24,50);
GivePlayerMoney(playerid,-50);//give -50? Man you're stupid...
}
...
U cannot script, or u just don't want to help and spam around the forum to count your posts, i have only ~400 and they are all no spam.
Yours... 99% spam?
U FAIL.

even he scripts better than YOU.
That was THE DEFAULT script.
Look a bit before posting crap please.
The one who fails here is you, get another work instead of arguing with me.