Raised This Month: $ Target: $400
 0% 

Custom Menu Help :S


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mojeda92
Junior Member
Join Date: May 2010
Old 05-24-2010 , 01:31   Custom Menu Help :S
Reply With Quote #1

I've been trying all day to get a working menu for the Left Fort Dead plugin that will allow players to type in "!build" and a menu comes up with categories "Vehicles, Fences, etc.) but I haven't any clue how to start, I'm new to sourcemod so I need my hand to be held along right now.

I've read: http://forums.alliedmods.net/showthread.php?t=46364

But am not sure where exactly I'm supposed to put the file and if I'm supposed to download something in order for amxmodx to fully work.

Thanks!
mojeda92 is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-24-2010 , 02:54   Re: Custom Menu Help :S
Reply With Quote #2

This is not sourcemod...For the command use:
PHP Code:
public plugin_init() {
    
register_clcmd("say !build""sayBuild");
}

public 
sayBuild(id) {
    new 
menu menu_create("\rBuilding menu:""menu_handler");
    
menu_additem(menu"\wBuild vehicles""1"0);
    
menu_additem(menu"\wBuild Fences""2"0);
    
menu_additem(menu"\wBuild etc""3"0);
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
menu_display(idmenu0);
    return 
PLUGIN_CONTINUE;
}
public 
menu_handler(idmenuitem) {
    if( 
item == MENU_EXIT ) {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    new 
data[6], Name[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata5Name63callback);
    new 
choice str_to_num(data);
    switch(
key)
    {
        case 
1:
        {
            
//Choice 1
        
}
        case 
2:
        {
            
//choice 2
        
}
        case 
3: {
           
//choice 3
        
}
    }
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
 } 
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
mojeda92
Junior Member
Join Date: May 2010
Old 05-24-2010 , 09:28   Re: Custom Menu Help :S
Reply With Quote #3

Where would I put this file?
mojeda92 is offline
Brreaker
Senior Member
Join Date: Oct 2009
Location: Constanta, Romania
Old 05-24-2010 , 10:11   Re: Custom Menu Help :S
Reply With Quote #4

In your plugin...?
__________________
There are 10 kinds of people.Those who understand binary, and those who don't.
Also, for those who understand binary, there is a donation tab too!
No steam || PM support!
Brreaker is offline
Send a message via MSN to Brreaker Send a message via Yahoo to Brreaker
mojeda92
Junior Member
Join Date: May 2010
Old 05-24-2010 , 18:45   Re: Custom Menu Help :S
Reply With Quote #5

I appended the code you gave me to the bottom of the plugin and tried to run compile.exe but it came up with some errors and I never saw the .smx file in the compiled folder.

Take a look at the attatchment.
I've also uploaded the source of the mod I'm trying to create a menu for. (Left Fort Dead by Boikinov URL

your code starts at line 735 when I have it appended to the end. The source I uploaded here, does not have it added...
Attached Thumbnails
Click image for larger version

Name:	compile.png
Views:	132
Size:	31.6 KB
ID:	66360  
Attached Files
File Type: sp Get Plugin or Get Source (leftfortdead.sp - 131 views - 25.0 KB)
mojeda92 is offline
NiQu
Veteran Member
Join Date: Nov 2009
Old 05-24-2010 , 19:16   Re: Custom Menu Help :S
Reply With Quote #6

Go to the sourcemod section, Breaker gave u a code for AMXX not for sourcemod.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
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 05:25.


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