Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #define MaxKnives 3
- enum _:Knives
- {
- Name[128],
- Price
- };
- new const szKnives[MaxKnives] [Knives] =
- {
- { "Begginer Knife", 20000 },
- { "Advanced Knife", 30000 },
- { "Master Knife", 40000 }
- };
- new iKnife[33];
- public plugin_init()
- register_clcmd("say /menu", "pShop")
- public pShop(id) {
- new iMenu = menu_create("HeadLine", "Handler")
- new szItem[64];
- formatex(szItem, charsmax(szItem), "The Knife Is \y[\r%s\y]", szKnives[iKnife[id]][Name])
- menu_additem(iMenu, szItem, "0")
- menu_display(id, iMenu)
- }
- public Handler (id, iMenu, item)
- {
- if(item == MENU_EXIT)
- {
- menu_destroy(iMenu)
- return 1;
- }
- switch(item)
- {
- case 0:
- {
- iKnife[id] ++;
- if( iKnife == MaxKnives )
- iKnife[id] = 0;
- return pShop(id);
- }
- }
- menu_destroy (iMenu)
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement