Raised This Month: $ Target: $400
 0% 

Menu help.


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
iPro
Junior Member
Join Date: Jun 2012
Old 06-27-2012 , 10:39   Re: Menu help.
Reply With Quote #3

Quote:
Originally Posted by Aooka View Post
I do that for you : Do you want that ?
Code:
#include < amxmodx > #include < fun > public plugin_init( ) { &nbsp;&nbsp;&nbsp;&nbsp;register_plugin( "test menu" , "1.0" , "Aooka" ); &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;register_clcmd( "say m" , "CmdMenu" ); } public CmdMenu( const id ) { &nbsp;&nbsp;&nbsp;&nbsp;new iMenu = menu_create( "TITLE OF MY MENU" , "FUNCTION" ); &nbsp;&nbsp;&nbsp;&nbsp;menu_additem( iMenu , "I want an Awp" , "1" , 0 ); &nbsp;&nbsp;&nbsp;&nbsp;menu_additem( iMenu , "I want an Ak" , "2" , 0 ); &nbsp;&nbsp;&nbsp;&nbsp;// you can add other menu_additem &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;menu_display( id , iMenu , 0 ); // show the menu &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;menu_setprop( iMenu , MPROP_EXITNAME , "Exit" ); // Close it } public FUNCTION( const id , iMenu , item ) { &nbsp;&nbsp;&nbsp;&nbsp;if( iMenu != MENU_EXIT ) &nbsp;&nbsp;&nbsp;&nbsp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;switch( item ) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;{ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;case 1: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;give_item( id , "weapon_awp" ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;case 2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;give_item( id , "weapon_ak47" ); &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;} &nbsp;&nbsp;&nbsp;&nbsp;} &nbsp;&nbsp;&nbsp;&nbsp;else &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb sp;return 1; &nbsp;&nbsp;&nbsp;&nbsp;return 0; }
I didnt really want the whole code, but thanx! Now i figured out!
iPro 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 06:14.


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