22.05.2010, 13:40
I have This Type of Dialog
![](http://www.movieserv.net/images/wiki/dialog_style_2.PNG)
When I Select The 3rd Info after some seconds it reset to 1st Info
Can I Fix This??
When I Select The 3rd Info after some seconds it reset to 1st Info
Can I Fix This??
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.
|
Originally Posted by eDz0r
Quote:
|
Originally Posted by gamer_Z
Quote:
|
Originally Posted by ViruZZzZ_ChiLLL
Quote:
![]() Anyways, its from your code, no need for vids, as gamer_z said. |
Originally Posted by gamer_Z
Quote:
|
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;
}
Originally Posted by eDz0r
Quote:
My code pawn Code:
|
if(dialogid == 1 && response)
{
switch(listitem)
{
case 0 :
}
}
Originally Posted by ViruZZzZ_ChiLLL
Why don't you just put it as
pawn Code:
|
Originally Posted by ViruZZzZ_ChiLLL
Why don't you just put it as
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;
}
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;
}
Originally Posted by ikarus❶❸❸❼
pawn Code:
|
Originally Posted by gamer_Z
Quote:
Yours... 99% spam? U FAIL. even he scripts better than YOU. |