pawn Код:
CMD:walkstyles(playerid, params[])
{
ShowPlayerDialog(playerid, DIALOG_ANIMATIONS, DIALOG_STYLE_LIST, "Walk Styles", "Style1\nStyle2\nStyle3", "Select", "Cancel");
return 1;
}
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
case DIALOG_ANIMATIONS:
{
if(response) // checks if he pressed Button 1 (Select)
{
switch(listitem)
{
case 0: // Walk style 1.
{
ApplyAnimation(...);
}
case 1: // Walk style 2.
{
ApplyAnimation(...);
}
case 2: // Walk style 3.
{
ApplyAnimation(...);
}
}
}
}
return 1;
}