08.08.2013, 19:13
Hi!
I have pretty much dialogs on my script...
But most of them are messed up with the buttons..
Code for them:
And the script "sell meat" Won't work properly also that's why I posted
code for it also...
But I think it's because it messed up the buttons...
I have tired with putting the code in if(listitem == 2) or it 1 or 3
etc..
But it didn't wort neither...
I have pretty much dialogs on my script...
But most of them are messed up with the buttons..
Code for them:
pawn Код:
ShowPlayerDialog(playerid, DIALOG_SELLBUY, DIALOG_STYLE_LIST, "Buy or sell something", "Sell\nBuy\t", "Ok", "Channel");
pawn Код:
if(dialogid == DIALOG_SELLBUY)
{
if(response)
{
ShowPlayerDialog(playerid, DIALOG_SELL, DIALOG_STYLE_LIST, "Sell something", "Meat\nOther\t", "Buy", "Close");
}
if(listitem == 1)
{
}
if(listitem == 2)
{
//ShowPlayerDialog(playerid, DIALOG_SELL, DIALOG_STYLE_LIST, "Sell something", "Meat\nOther\t", "Buy", "Close");
}
return 1;
}
if(dialogid == DIALOG_SELL)
{
if(response) // Button 1
{
//OK button
}
if(listitem == 1)
{
//Close button
}
if(listitem == 2)
{
if(MeatRob[playerid] == 1)
{
GetPlayerMoney(playerid);
GivePlayerMoney(playerid, 3000);
SendClientMessage(playerid, Green, "You sold meet, you got 3000$!");
MeatRob[playerid]=1;
}
else
{
SendClientMessage(playerid, Green, "You don't have any meat");
}
return 1;
}
if(listitem == 3)
{
SendClientMessage(playerid, Green, "Should display the third altenative (Commands)");
}
return 1;
}
pawn Код:
public meat (playerid)
{
MeatRob[playerid]=1;
SetPlayerWantedLevel(playerid, 3);
GivePlayerMoney(playerid,5000);
SendClientMessage(playerid, Green, "You successfully robbed 5000 and some meat");
}
code for it also...
But I think it's because it messed up the buttons...
I have tired with putting the code in if(listitem == 2) or it 1 or 3
etc..
But it didn't wort neither...