AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help to making a menu (https://forums.alliedmods.net/showthread.php?t=50014)

pagh 01-17-2007 16:43

Help to making a menu
 
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!

Simon Logic 01-18-2007 05:03

Re: Help to making a menu
 
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).

dutchmeat 01-18-2007 05:24

Re: Help to making a menu
 
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)

pagh 01-18-2007 07:24

Re: Help to making a menu
 
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!!!

dutchmeat 01-18-2007 08:21

Re: Help to making a menu
 
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.

pagh 01-20-2007 07:05

Re: Help to making a menu
 
i could only choose simple in amxx studio.. and i didnt change anything because i didnt know what to change..:(

dutchmeat 01-20-2007 07:49

Re: Help to making a menu
 
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   }  } }

pagh 01-20-2007 10:32

Re: Help to making a menu
 
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?

mexykanu 03-05-2007 13:34

Re: Help to making a menu
 
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...

allenwr 03-05-2007 23:39

Re: Help to making a menu
 
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




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

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