06.05.2011, 18:22
Do you mean something like this:
You don't have to use format for those things.
At OnDialogResponse:
pawn Код:
new string[128];
if(IsPlayerInAnyVehicle(playerid))
{
string = "Nitro\n Restore Health\n Give Armor";
} else {
string = "Restore Health\n Give Armor";
}
ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Somathing",string,"Ok","Cancle");
At OnDialogResponse:
pawn Код:
if(dialogid == 1)
{
if(!response) return 1;
if(IsPlayerInAnyVehicle(playerid))
{
if(listitem == 0) //Nitro
{
//Code here
}
if(listitem == 1) //Restore Health
{
// Code here
}
if(listitem == 2) // Give armor
{
// Code here
}
return 1;
}
else
{
if(listitem == 0) //Restore health
{
//code here
}
if(listitem == 1) // Give armor
{
//code here
}
return 1;
}
return 1;
}