Raised This Month: $ Target: $400
 0% 

help with custom menu for gathers......


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Qlim4X
Member
Join Date: Jun 2007
Old 06-13-2007 , 21:04   help with custom menu for gathers......
Reply With Quote #1

hi again

i want to make a custom game menu for mxd - gather games

i made the plugins that i want and i want to put them in a custom menu...

the custom plugins are

LIVE GAME
IRC NICKS TEAMS
WARM UP
PLANS POSSITIONS
RESTART SERVER

and the stadar are

amx_pause
amx_kickmenu
amx_slapmenu
amx_mapmenu



and the menu code is this on


Code:
/* AMX Mod script.
*
* (c) 2007, Qlim4X
* This file is provided as is (no warranties).
*
*  Generated by AMX MenuMaker v1.5 (http://sniperbeamer.amxmod.info)
*/

#include <amxmod>
#include <amxmisc>



public plugin_init()
{
 register_plugin("ProGather Menu","1.0","Qlim4X")

 register_menucmd(register_menuid("ProGather Menu"),1023,"actionMenu")
 register_clcmd("amx_promenu","showMenu",ADMIN_MENU,"gather menu")

 new modName[32]
 get_modname(modName,31)
 
}

public actionMenu(id,key)
{
 switch(key){
 case 0:{
    server_cmd("amx_pause")
    PLUGIN_CONTINUE
 }
 case 1:{
    server_cmd("pro_warmup")
 }
 case 2:{
    server_cmd("pro_nicks")
 }
 case 3:{
    server_cmd("pro_plans")
 }
 case 4:{
    server_cmd("pro_live")
 }
 case 5:{
    server_cmd("amx_rr 1 1")
 }
 case 6:{
    server_cmd("amx_slapmenu")
 }
 case 7:{
    server_cmd("amx_kickmenu")
 }
 case 8:{
    server_cmd("amx_mapmenu")
 }
 }

 return PLUGIN_HANDLED
}

public showMenu(id,level,cid)
{
 if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED

 new menuBody[512]
 new keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
 new len = format(menuBody,511,"\yProGather Menu\R^n\" )
 len += format( menuBody[len], 511-len, "^n\w1. Pause Server" )
 len += format( menuBody[len], 511-len, "^n\w2. Warmup Time" )
 len += format( menuBody[len], 511-len, "^n\w3. Nicks And Teams" )
 len += format( menuBody[len], 511-len, "^n\w4. Plans & Poss" )
 len += format( menuBody[len], 511-len, "^n\w5. LIVE GO GO GO" )
 len += format( menuBody[len], 511-len, "^n\w6. Restart" )
 len += format( menuBody[len], 511-len, "^n\w7. Slap Menu" )
 len += format( menuBody[len], 511-len, "^n\w8. Kick Menu" )
 len += format( menuBody[len], 511-len, "^n\w9. Map Menu" )
 len += format( menuBody[len], 511-len, "^n^n\w0. Exit" )
 
 show_menu( id, keys, menuBody, -1 )

 return PLUGIN_HANDLED
}
how can expand the menu in pages?
how can i make the menu do not close after a selection

the comands 2,3,4,6,7,8,9 doesnt play....
Attached Files
File Type: sma Get Plugin or Get Source (live.sma - 498 views - 1.6 KB)
File Type: sma Get Plugin or Get Source (nicks.sma - 619 views - 935 Bytes)
File Type: sma Get Plugin or Get Source (plans.sma - 612 views - 1.1 KB)
File Type: sma Get Plugin or Get Source (resetserver.sma - 616 views - 617 Bytes)
File Type: sma Get Plugin or Get Source (warmup.sma - 632 views - 1.0 KB)

Last edited by Qlim4X; 06-13-2007 at 22:29.
Qlim4X is offline
Qlim4X
Member
Join Date: Jun 2007
Old 06-14-2007 , 07:48   Re: help with custom menu for gathers......
Reply With Quote #2

i fix the code so all the commands will work....

now i want to make the menu after some commands to be open and not closing...

what can i do???


the full script

Code:
/* AMX Mod script.
*
* (c) 2007, Qlim4X
* This file is provided as is (no warranties).
*
*  Generated by AMX MenuMaker v1.5 (http://sniperbeamer.amxmod.info)
*/

#include <amxmod>
#include <amxmisc>


public plugin_init()
{
 register_plugin("ProGather Menu","1.0","Qlim4X")

 register_menucmd(register_menuid("ProGather Menu"),1023,"actionMenu")
 register_clcmd("amx_promenu","showMenu",ADMIN_KICK,"gather menu")

 new modName[32]
 get_modname(modName,31)
 
}

public actionMenu(id,key)
{
 switch(key){
 case 0:{
    server_cmd("amx_pause")
 }
 case 1:{
    client_cmd(id,"pro_warmup")
 }
 case 2:{
    client_cmd(id,"pro_nicks")
 }
 case 3:{
    client_cmd(id,"pro_plans")
 }
 case 4:{
    client_cmd(id,"pro_live")
 }
 case 5:{
    server_cmd("amx_rr 1 1")
 }
 case 6:{
    client_cmd(id,"amx_slapmenu")
 }
 case 7:{
    client_cmd(id,"amx_kickmenu")
 }
 case 8:{
    client_cmd(id,"amx_mapmenu")
 }
 }

 return PLUGIN_HANDLED
}

public showMenu(id,level,cid)
{
 if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
 new menuBody[1024]
 new keys
 keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
 new len = format(menuBody,1511,"\yProGather Menu\R^n^n\" )
 len += format( menuBody[len], 1024-len, "^n\w1. Pause Server" )
 len += format( menuBody[len], 1024-len, "^n\w2. Warmup Time" )
 len += format( menuBody[len], 1024-len, "^n\w3. Nicks And Teams" )
 len += format( menuBody[len], 1024-len, "^n\w4. Plans & Poss" )
 len += format( menuBody[len], 1024-len, "^n\w5. LIVE GO GO GO" )
 len += format( menuBody[len], 1024-len, "^n\w6. Restart" )
 len += format( menuBody[len], 1024-len, "^n\w7. Slap Menu" )
 len += format( menuBody[len], 1024-len, "^n\w8. Kick Menu" )
 len += format( menuBody[len], 1024-len, "^n\w9. Map Menu" )
 len += format( menuBody[len], 1024-len, "^n^n\w0. Exit" )
 
 show_menu( id, keys, menuBody, -1 )

 return PLUGIN_CONTINUE
}
Qlim4X is offline
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 06-14-2007 , 09:33   Re: help with custom menu for gathers......
Reply With Quote #3

Quote:
Originally Posted by Qlim4X View Post
i fix the code so all the commands will work....

now i want to make the menu after some commands to be open and not closing...

what can i do???


the full script

Code:
/* AMX Mod script.
*
* (c) 2007, Qlim4X
* This file is provided as is (no warranties).
*
*  Generated by AMX MenuMaker v1.5 (http://sniperbeamer.amxmod.info)
*/
 
#include <amxmod>
#include <amxmisc>
 
 
public plugin_init()
{
 register_plugin("ProGather Menu","1.0","Qlim4X")
 
 register_menucmd(register_menuid("ProGather Menu"),1023,"actionMenu")
 register_clcmd("amx_promenu","showMenu",ADMIN_KICK,"gather menu")
 
 new modName[32]
 get_modname(modName,31)
 
}
 
public actionMenu(id,key)
{
 switch(key){
 case 0:{
    server_cmd("amx_pause")
 }
 case 1:{
    client_cmd(id,"pro_warmup")
 }
 case 2:{
    client_cmd(id,"pro_nicks")
 }
 case 3:{
    client_cmd(id,"pro_plans")
 }
 case 4:{
    client_cmd(id,"pro_live")
 }
 case 5:{
    server_cmd("amx_rr 1 1")
 }
 case 6:{
    client_cmd(id,"amx_slapmenu")
 }
 case 7:{
    client_cmd(id,"amx_kickmenu")
 }
 case 8:{
    client_cmd(id,"amx_mapmenu")
 }
 }
 
 return PLUGIN_HANDLED
}
 
public showMenu(id,level,cid)
{
 if (!cmd_access(id,level,cid,1)) return PLUGIN_HANDLED
 new menuBody[1024]
 new keys
 keys = (1<<0|1<<1|1<<2|1<<3|1<<4|1<<5|1<<6|1<<7|1<<8|1<<9)
 new len = format(menuBody,1511,"\yProGather Menu\R^n^n\" )
 len += format( menuBody[len], 1024-len, "^n\w1. Pause Server" )
 len += format( menuBody[len], 1024-len, "^n\w2. Warmup Time" )
 len += format( menuBody[len], 1024-len, "^n\w3. Nicks And Teams" )
 len += format( menuBody[len], 1024-len, "^n\w4. Plans & Poss" )
 len += format( menuBody[len], 1024-len, "^n\w5. LIVE GO GO GO" )
 len += format( menuBody[len], 1024-len, "^n\w6. Restart" )
 len += format( menuBody[len], 1024-len, "^n\w7. Slap Menu" )
 len += format( menuBody[len], 1024-len, "^n\w8. Kick Menu" )
 len += format( menuBody[len], 1024-len, "^n\w9. Map Menu" )
 len += format( menuBody[len], 1024-len, "^n^n\w0. Exit" )
 
 show_menu( id, keys, menuBody, -1 )
 
 return PLUGIN_CONTINUE
}
Use new style menus or something else, but dont use menumaker it just sucks. Look Emps tutorial in 'Tutorials/code snippets' section.
[X]-RayCat is offline
Reply


Thread Tools
Display Modes

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 10:43.


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