Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FIRSTMENU 990
- #define SECONDMENU 991
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == FIRSTMENU)
- {
- if(reponse)
- {
- if(listitem == 0)
- {
- ShowPlayerDialog(playerid, SECONDMENU, DIALOG_STYLE_LIST,
- "Regular Players Lounge",
- "MP5\nCombat Shotgun\nDesert Eagle\nM4\nAK-47\nBack",
- "Select", "Exit");
- }
- }
- }
- if(dialogid == SECONDMENU)
- {
- if(reponse)
- {
- switch(listitem)
- {
- case 0:
- {
- new ammo = GetPlayerAmmo(playerid);
- if(ammo >= 600) return SendClientMessage(playerid, COLOR_GREY, "Sorry you have all the free ammo we can give you for now");
- if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, COLOR_GREY,"* You cannot afford this!");
- GivePlayerMoney(playerid, -15000);
- GivePlayerWeapon(playerid, 29, 200);
- return 1;
- }
- case 1:
- {
- new ammo = GetPlayerAmmo(playerid);
- if(ammo > 400) return SendClientMessage(playerid, COLOR_GREY, "Sorry you have all the free ammo we can give you for now");
- if(GetPlayerMoney(playerid) < 8000) return SendClientMessage(playerid, COLOR_GREY,"* You cannot afford this!");
- GivePlayerWeapon(playerid,25 ,25);
- GivePlayerMoney(playerid, -8000);
- return 1;
- }
- default : return 1;
- }
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement