Raised This Month: $ Target: $400
 0% 

Bots using menu


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
akysiev
Junior Member
Join Date: Mar 2006
Location: Earth
Old 03-22-2006 , 13:47  
Reply With Quote #5

You'll have to change this within the source code of the script itself. First off, a bot won't ever receive a menu to choose from, and thus won't call the function that handles a menu choice. That means that you'll have to change the part of code that dispatches the menu to all the players. When it loops through all the players, you'll need to emulate a vote choice by directly calling the handling function.

Code:
public plugin_init() {     new keys = MENU_KEY_0|MENU_KEY_1|MENU_KEY_2     register_menucmd(register_menuid("Which useless choice"), keys, "handleMenu"); } // Fake menu maker public dispatchMenus() {     new iPlayers[32];     new iNumPlayers;     get_players(iPlayers, iNumPlayers);     for(new i = 0; i < iNumPlayers; i++)     {         // if its a bot, go straight to menu choice         // otherwise, show the menu         if (is_user_bot(iPlayers[i]))         {             handleMenu(iPlayers[i], random_num(0,2));         }         else         {             //menu crap             new menu[192];             format(menu, 191, "Which useless choice do you want?^n^n1. 1^n^n2. 2^n^n3. 3");             show_menu(id, keys, menu);         }     } } // takes care of menu choice public handleMenu(id, key) {     switch(key)     {         // all that other stuff     } }

Kinda like that. Just don't try to copy paste that cause it doesn't do jack.
akysiev is offline
 



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 16:33.


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