14.09.2011, 11:28
Hey guys.
So I have a problem, my dialog isn't showing. it's a list styled dialog, and listitem 1 and above shows, but listitem 0 doesn't. Here's my code:
And the reason it's "DisplayDialogForPlayer" is because there's a public function, and so it's actually:
Like I said, listitem 1 and above works, but 0 doesn't :S
So I have a problem, my dialog isn't showing. it's a list styled dialog, and listitem 1 and above shows, but listitem 0 doesn't. Here's my code:
pawn Код:
if(dialogid == 27) //buy clothes
{
if(response)
{
if(listitem == 0) DisplayDialogForPlayer(playerid, 77);
if(listitem == 1) DisplayDialogForPlayer(playerid, 29);
if(listitem == 2)
{
new biz = GetPlayerVirtualWorld(playerid);
PlayerInfo[playerid][pHelmet] = 18645;
GameTextForPlayer(playerid, "~r~-$200", 5000, 1);
GiveMoney(playerid,-200);
BizInfo[biz][bTill] += 200;
BizInfo[biz][bProducts] -= 1;
PlayerPlaySound(playerid, 1052,0.0, 0.0, 0.0);
SendClientMessage(playerid, COLOR_GRAD2, "* Helmet purchased, use /helmet to put it on.");
}
}
}
pawn Код:
case 27:
{
ShowPlayerDialog(playerid,27,DIALOG_STYLE_LIST,"Clothes","Skin\nBandanas\nHelmet","Done","Cancel");
}