Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #include <txdmenu>
- new Weapon[11][20] = {"AK47","M4","Tec-9","Country Rifle","Sniper Rifle","Deagle","Shotgun",
- "RPG","HS Rocket","Grenade","9mm"};
- new Weaponi[11] = {30, 31, 32,33, 34,24,25,35,36,16,22};
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (!strcmp("/weaponsmenu", cmdtext, true))
- {
- new menu = menu_create("Weapons Menu","sub_menu");
- for(new i;i < 11;i++) menu_additem(menu,Weapon[i]);
- menu_display(playerid,menu);
- return 1;
- }
- return 0;
- }
- // menu_create( Header[], menu_handler[] ) - return menu id
- // menu_additem ( menu, Item[] )
- // menu_display( playerid, menu, page=1)
- forward sub_menu(playerid,menu,item); // menu handler
- public sub_menu(playerid,menu,item)
- {
- if(item == MENU_EXIT) return 1;
- GivePlayerWeapon(playerid,Weaponi[item],999);
- return 1;
- }
- // item - the choosen item
- // menu - menu id
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement