Raised This Month: $ Target: $400
 0% 

menus


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
[C]oN -X-
Member
Join Date: Nov 2005
Old 11-09-2005 , 00:35   menus
Reply With Quote #1

hey as i read like 5 min ago on a bots-united.. a kid was gonna make a bot menu for his dedicated

this is his commands

epb addbot 2 - will add a bot in ct
epb addbot 1 - will add a bot in t
epb addbot - will add a bot in a team
epb killbots - will kill all bots
epb removebots - will kick all bots
epb jasonmode on - bots use only knife

he said he was putting it a commandmenu.txt

im a little noob up to this point..

since i wonna do the same... what exactly do i do...

make a commandmenu.txt put

epb addbot 2 - will add a bot in ct
epb addbot 1 - will add a bot in t
epb addbot - will add a bot in a team
epb killbots - will kill all bots
epb removebots - will kick all bots
epb jasonmode on - bots use only knife

in it... and then in game do bind key commandmenu

right??
[C]oN -X- is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 11-09-2005 , 00:37  
Reply With Quote #2

Bots, and AMXX coding are....different.

Look into the Doc, and look at some plugins with menus.
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
[C]oN -X-
Member
Join Date: Nov 2005
Old 11-09-2005 , 00:41   bah
Reply With Quote #3

bah i know its all different but can u tell me how to do it :-/[/i]
[C]oN -X- is offline
Kensai
Veteran Member
Join Date: Aug 2005
Location: San Diego, California
Old 11-09-2005 , 00:49  
Reply With Quote #4

Start with this in your plugin_init:

Code:
register_menucmd(register_menuid("menu_NAMEHERE"),1023,"DoNAMEHERE");

You also need someway to go to the menu. Let's use a say command.

Code:
register_clcmd("say /menu","NAMEHERE")//Normal chat     register_clcmd("say_team /menu","NAMEHERE")//Team chat

Then make a public, to format the menu.

Code:
public NAMEHERE(id)     {           new menu[192]       format(menu, 191, "TITLE: WHAT TO DO^n1. Option 1^n2. Option 2^n3 Option 3^n^n0. Exit")         new keys = MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_0     show_menu(id, keys, menu, 15, "menu_NAMEHERE")             return PLUGIN_HANDLED }


Then we need to define the "cases" or what happens when a button is pressed.


Code:
public DoChooseType(id, key)     {         if(key == 0) {                 //Code here for Option 1     }                 if(key == 1) {                 //Code here for Option 2     }         if(key == 2) {                 //Code here for Option 3     }             if(key == 0) {         //This Exits the Menu, when they hit Exit.         return PLUGIN_HANDLED     }         return PLUGIN_HANDLED }
Kensai is offline
Send a message via AIM to Kensai Send a message via MSN to Kensai
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 23:39.


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