Under OnDialogResponse:
case 3: { switch(listitem) { case 0: { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SendClientMessage(playerid, 0x33AA33AA, "Auto tuunitud!"); AddVehicleComponent(VehicleID, 1087); //hidraulic return 1; } } case 1: { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SendClientMessage(playerid, 0x33AA33AA, "Auto tuunitud!"); AddVehicleComponent(VehicleID, 107; // wheels return 1; } } case 2: { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SendClientMessage(playerid, 0x33AA33AA, "Auto tuunitud!"); AddVehicleComponent(VehicleID, 1010); //nos 10x return 1; } } case 3: { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SendClientMessage(playerid, 0x33AA33AA, "Auto tuunitud!"); AddVehicleComponent(VehicleID, 101; //exaust return 1; } } return 1; } |
if(listitem == 0) // This is "Hьdraulika".
{
//Your code here
}
if(listitem == 1) // This is "Ilukilp"
{
//Your code here
}
if(listitem == 2) // This is "Nitro"
{
// Your code here
}
if(listitem == 3) // This is "Sumbuti"
{
//Your code here
}
#define DIALOG_1 1
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_1: //First dialogid
{
switch(listitem)
{
case 0: // "Hьdraulika"
{
//Stuff
}
case 1: // "Ilukilp"
{
//Stuff
}
case 2: // "Nitro"
{
//Stuff
}
case 3: // "Sumbuti"
{
//Stuff
}
}
}
}
return 1;
}
if(strcmp(cmdtext, "/tuuniauto", true) == 0)
{
ShowPlayerDialog(playerid, DIALOG_1, DIALOG_STYLE_LIST, "Mida tahad tuunida?", "Hьdraulika \nIlukilp \nNitro \nSumbuti", "Vali", "Katkesta");
}