21.02.2011, 08:02
Okay i made this:
How can i made a responce to the case's, i mean the Door, Bonnet, Boot, Alarm, Objectives, Neon dialog?
Please help.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/vehcontrol", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Vehicle Control Menu {FF0000}0.3c", "{0000FF}Doors \n{0000FF}Bonnet \n{0000FF}Boot \n{0000FF}Engine \n{0000FF}Alarm \n{0000FF}Objectives \n{0000FF}Neons", "Purchase", "Cancel");
return 1;
}
return 0;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
{
switch(0)
{
case 1:
{
switch(listitem)
{
case 0:
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "{0000FF}Doors", "Open Doors \nClose Doors", "Chose", "Cancel");
}
case 1:
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "{0000FF}Bonnet", "Open Bonnet \nClose Bonnet", "Chose", "Cancel");
}
case 2:
{
ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "{0000FF}Boot", "Open Boot \nClose Boot", "Chose", "Cancel");
}
case 3:
{
ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "{0000FF}Engine", "Turn Off Engine \nTurn On Engine", "Purchase", "Cancel");
}
case 4:
{
ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "{0000FF}Alarm", "Turn On Alarm \nTurn Off Alarm", "Purchase", "Cancel");
}
case 5:
{
ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "{0000FF}Objectives", "Turn On Objectives \n Turn Off Objectives", "Purchase", "Cancel");
}
case 6:
{
ShowPlayerDialog(playerid, 7, DIALOG_STYLE_LIST, "{0000FF}Neon Lights", "Red Neon \nBlue Neon \nYellow Neon \nGreen Neon \nWhite Neon \nPink Neon", "Purchase", "Cancel");
}
}
}
}
}
return 1;
}
Please help.