Raised This Month: $12 Target: $400
 3% 

Help to making a menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pagh
Junior Member
Join Date: Jan 2007
Old 01-17-2007 , 16:43   Help to making a menu
Reply With Quote #1

i wanna make a menu (amx_pagh) where you can do this:
give superhero XP like amx_shaddxp
kick,ban,slap
votemap,changemap
change someones nickname (only if possible)
go to teleport menu

but i'm kind a noob to scripting so please help me!

Last edited by pagh; 01-18-2007 at 03:13. Reason: xp instead of lvl
pagh is offline
Simon Logic
Senior Member
Join Date: Nov 2006
Location: RF
Old 01-18-2007 , 05:03   Re: Help to making a menu
Reply With Quote #2

http://forums.alliedmods.net/showthr...ht=making+menu
http://djeyl.net/forum/index.php?showtopic=27288

Also i think there should be a GUI tool to create menus. I'm not interested in menu programming yet, thus i hope smb else will post a link to it (if GUI exists).
Simon Logic is offline
Send a message via Skype™ to Simon Logic
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-18-2007 , 05:24   Re: Help to making a menu
Reply With Quote #3

Amxx Studio has a built-in menugenerator, both Simple(like Simon Logic described), but also the 'new style' menu.
I think the 'new style' menu's have a GUI look. (Simple style is just plain text)
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
pagh
Junior Member
Join Date: Jan 2007
Old 01-18-2007 , 07:24   Re: Help to making a menu
Reply With Quote #4

thx but what if i wanna do like this:
1. kick/ban (open amx_clcmdmenu)
2. give xp (open another menu with xp)

xp menu:
1. give 100 xp (amx_shaddxp #%userid% 100)
2. give 1000 xp (amx_shaddxp #%userid% 1000)
3. give 5000 xp (amx_shaddxp #%userid% 5000)
4. give 10.000 xp (amx_shaddxp #%userid% 10000)

i can't figure out how to do that with amxx studio? anyone who can make me the .sma file? plz!!!
pagh is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-18-2007 , 08:21   Re: Help to making a menu
Reply With Quote #5

show us the example you made with amxx studio, because it's not clear which type of menu you want to make.
And remember, this forum is to help other members with their plugins, not to create a plugin for them.
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.
dutchmeat is offline
pagh
Junior Member
Join Date: Jan 2007
Old 01-20-2007 , 07:05   Re: Help to making a menu
Reply With Quote #6

i could only choose simple in amxx studio.. and i didnt change anything because i didnt know what to change..
pagh is offline
dutchmeat
Senior Member
Join Date: Sep 2006
Old 01-20-2007 , 07:49   Re: Help to making a menu
Reply With Quote #7

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "New Plugin" #define VERSION "1.0" #define AUTHOR "Author" #define KeysMy Simple Menu (1<<3) // Keys: 4 public plugin_init() {  register_plugin(PLUGIN, VERSION, AUTHOR)    register_menucmd(register_menuid("My Simple Menu"), KeysMy Simple Menu, "PressedMy Simple Menu")  // Add your code here... } public ShowMy Simple Menu(id) {  show_menu(id, KeysMy Simple Menu, "\rChoise One^nChoise Two^nChoise Three^nChoise Four^n", -1, "My Simple Menu") // Display menu } public PressedMy Simple Menu(id, key) {  /* Menu:  * Choise One  * Choise Two  * Choise Three  * Choise Four  */  switch (key) {   case 0:{   //do something with the First choise   }   case 1:(   //do something with the Second choise   }   case 2:{   //do something with the Third choise     }   case 3: { // 4   //do something with the last choise   }  } }
__________________
before you criticize someone, you should walk a mile in their shoes. that way, when you criticize them, you're a mile away and you have their shoes.

Last edited by dutchmeat; 01-20-2007 at 07:50. Reason: typo
dutchmeat is offline
pagh
Junior Member
Join Date: Jan 2007
Old 01-20-2007 , 10:32   Re: Help to making a menu
Reply With Quote #8

yeah but how do i make a code to send them to another menu? or to make them show a list of users like clcmdmenu?
pagh is offline
mexykanu
Member
Join Date: Oct 2006
Old 03-05-2007 , 13:34   Re: Help to making a menu
Reply With Quote #9

Code:
 switch (key) {
  case 0:{
  //do something with the First choise 
  }
  case 1:(
  //do something with the Second choise 
  }
  case 2:{
  //do something with the Third choise  
  }
  case 3: { // 4
  //do something with the last choise 
  }
Code:
//do something with the First choise



Learn PAWN...
mexykanu is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 03-05-2007 , 23:39   Re: Help to making a menu
Reply With Quote #10

Quote:
Learn PAWN...
Learn PAWN better...

PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define KEYS (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<9) //1-5 and 0
#define KEYS2 (1<<0)|(1<<1)|(1<<2)|(1<<3)|(1<<4)|(1<<9) //1-5 and 0
 
public plugin_init() {
    
register_plugin("Allenwr","0.1","Example Menu")
    
register_clcmd("say /menu","cmdmenu",ADMIN_ALL,"")
    
register_menucmd(register_menuid("Menu"),KEYS,"MenuSelect")
    
register_menucmd(register_menuid("Menu2"),KEYS2,"MenuSelect2")}
 
plugin cmdmenu(idlevelcid) {
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
 
    
show_menu(idKEYS"\yMenu^n^n\w1. Option^n2. Option^n3. Option^n4. Option^n5. Option^n0. Exit",-1,"Menu")
    return 
PLUGIN_CONTINUE
}
 
MenuSelect(idkey) {
    switch(
key) {
        case 
0cmdmenu2(id)
        case 
1//option
        
case 2//option
        
case 3//option
        
case 4//option
        
case 9: return PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE
}
 
plugin cmdmenu2(idlevelcid) {
    if(!
cmd_access(idlevelcid2))
        return 
PLUGIN_HANDLED;
 
    
show_menu(idKEYS2"\yMenu2^n^n\w1. Option^n2. Option^n3. Option^n4. Option^n5. Option^n0. Exit",-1,"Menu2")
    return 
PLUGIN_CONTINUE
}
 
MenuSelect2(idkey) {
    switch(
key) {
        case 
0//option
        
case 1//option
        
case 2//option
        
case 3//option
        
case 4//option
        
case 9: return PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE

__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode