[Question]Dialog Question
#1

I have This Type of Dialog

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

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

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.
Reply
#4

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
Reply
#5

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...
Reply
#6

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.
Reply
#7

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...
Reply
#8

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
Reply
#9

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...
Reply
#10

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

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.
Reply
#12

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;
}
Reply
#13

Well, show us the main response, the Dialog id 1
Reply
#14

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

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;
}
Reply
#16

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.
Reply
#17

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)