11.09.2011, 02:04
Quote:
Like, for example.
pawn Код:
And by weapon list, I mean you do the command /weapons and a list of weapons pop up. Then you can choose one. |
pawn Код:
COMMAND:weapons(playerid, cmdtext)
{
ShowPlayerDialog(playerid, 32, DIALOG_STYLE_LIST, "Pick a weapon:", "Weapon1\nWeapon2\nWeapon3", "Pick", "Close");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 32)
{
if(!response) return 1; // if he clicked the other button, stop the code
switch(listitem) // Switch trough all list items
{
case 0:
{
// Give Weapon1
}
case 1:
{
// Give Weapon2
}
case 2:
{
// Give Weapon3
}
}
}
return 1;
}
EDIT: LoL, Las Venturas CNR posteb while I was writing