ShowPlayerDialog(playerid, 225, DIALOG_STYLE_LIST, "Weapons", "Deagle $100 \nTec-9 $100", "Ok", "");
#define DIALOG_WEAPONS 1960 // place it after all <include> functions
ShowPlayerDialog(playerid, DIALOG_WEAPONS, DILOAG_STYLE_LIST,"Weapons", "Deagle $100 \nM4 150$ \nSawn-off $200","Select","Cancel");
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == DIALOG_WEAPONS) { if(response) // If they clicked 'Select' or double-clicked a weapon { // Give them the weapon switch(listitem) { case 0: { GivePlayerWeapon(playerid, 24, 999); // Give them a desert eagle GivePlayerMoney(playerid, -100); // take $100 form player } case 1: { GivePlayerWeapon(playerid, 31, 9999); // Give them an M4 GivePlayerMoney(playerid, -150); // take $150 form player } case 2: { GivePlayerWeapon(playerid, 26, 9999); // Give them a Sawnoff GivePlayerMoney(playerid, -200); // take $100 form player } } } return 1; // We handled a dialog, so return 1. Just like OnPlayerCommandText. } return 0; // You MUST return 0 here! Just like OnPlayerCommandText. }
Yep there is
use '\t' for tabulating the data example- The output would be clean ![]() |