25.07.2011, 16:54
The code:
So I go in game type the command, the dialog, id 4, opens up... So I click on the first option, but nothing opens... Even though I have listitem == 1... So I click on the second item and I get list item one instead of list item two?
Here is the command:
pawn Код:
else if(dialogid == 4)
{
if(!response)
{
ShowPlayerDialog(playerid, 666, DIALOG_STYLE_MSGBOX, "Dialog Closed", "You chose to close the dialog", "Close", "");
}
else
{
if(listitem == 1)
{
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "General Help", "The Rules\r\nJob Locations\r\nDonation Information\r\n", "Select", "Close");
}
else if(listitem == 2)
{
ShowPlayerDialog(playerid, 7, DIALOG_STYLE_MSGBOX, "Commands Help", " [/help] - [/stats] ", "Close", "");
}
else if(listitem == 3)
{
ShowPlayerDialog(playerid, 8, DIALOG_STYLE_MSGBOX, "Job Help", " Jobs are great ways to make a good earning \n around the server. A job can help you purchase \n many things available to players around the \n server if you want to join a job, look for the \n yellow dots around the map, and go to the location! \n", "Close", "");
}
else if(listitem == 4)
{
if(PlayerInfo[playerid][pFaction] == 0)
{
SendClientMessage(playerid, COLOR_BLACK, "You are not in any factions!");
}
else if(PlayerInfo[playerid][pFaction] == 1)
{
ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Faction Help", "Faction Information\r\nFaction Commands\r\n", "Select", "Close");
}
}
}
}
Here is the command:
pawn Код:
CMD:help(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 1)
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Server Help", "General Help\r\nCommands Help\r\nJob Help\r\nFaction Help\r\n", "Select", "Close");
}
}
return 1;
}