Raised This Month: $ Target: $400
 0% 

Help, wiith menu?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-19-2012 , 15:25   Help, wiith menu?
Reply With Quote #1

Hello people,

How can i set for example this is a menu:

PHP Code:
Ban Menu:
1. Test1 (player)
2. Test2 (player)
3. Test3 (Player)

4. Choose length to ban5 minutes 
For example i want that when i press 4 it goes to 10 minutes, and so on how can i set that?
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-19-2012 , 15:32   Re: Help, wiith menu?
Reply With Quote #2

Look in AMX Mod X's plmenu.sma plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-19-2012 , 16:07   Re: Help, wiith menu?
Reply With Quote #3

This .sma looks wicked :S

Like, this is made on a professional level. And im on a LOW level
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.

Last edited by Bilal Pro; 04-19-2012 at 16:10.
Bilal Pro is offline
rak
Veteran Member
Join Date: Oct 2011
Location: banned country
Old 04-19-2012 , 20:07   Re: Help, wiith menu?
Reply With Quote #4

Quote:
Originally Posted by Bilal Pro View Post
Hello people,

How can i set for example this is a menu:

PHP Code:
Ban Menu:
1. Test1 (player)
2. Test2 (player)
3. Test3 (Player)

4. Choose length to ban5 minutes 
For example i want that when i press 4 it goes to 10 minutes, and so on how can i set that?
i kill my head for few hours and i have this

Credits: Shinoda for help me in some stuff

PHP Code:
#include <amxmodx>
#include <fun>

#define PLUGIN "New Plug-In"
#define VERSION "1.0"
#define AUTHOR "[R]ak"

new const VALUE_LIFE[][] = {
    
"1",
    
"50",
    
"100",
    
"250"
}

new const 
MENU_OPTION[] = "Option"

new g_life_key[33], Menu_Item_Option[32]


public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("say test""cmdSay")
}

public 
cmdSay(id) {
    
Menu_Life(id0)
    return 
PLUGIN_HANDLED
}

public 
Menu_Life(idpage) {
    
    new 
Player_Id[3], Name[32], TempidPlayer_NumPlayers[32]
    new 
Menu menu_create("Add Life Menu""menu_handler")
    
    
formatex(Menu_Item_Optioncharsmax(Menu_Item_Option), "Life: %s"VALUE_LIFE[g_life_key[id]])
    
    
get_players(PlayersPlayer_Num)
    
    for(new 
iPlayer_Numi++) {
        
        if(
&& !(6))
            
menu_additem(MenuMenu_Item_OptionMENU_OPTION)
        
        
Tempid Players[i]
        
        
get_user_name(TempidNamecharsmax(Name))
        
num_to_str(TempidPlayer_Idcharsmax(Player_Id))
        
        
menu_additem(MenuNamePlayer_Id)        
    }
    
    
menu_additem(MenuMenu_Item_OptionMENU_OPTION)
    
    
menu_setprop(MenuMPROP_EXITMEXIT_ALL)
    
menu_display(idMenupage)
}

public 
menu_handler(idmenuitem) {
    
    if(
item == MENU_EXIT || !is_user_connected(id)) {
        
menu_destroy(menu)
        return
    }
    
    new 
iKey[7], iAccessiCallbackiName[32]
    
    
menu_item_getinfo(menuitemiAccessiKeycharsmax(iKey), iNamecharsmax(iName), iCallback)
    
    if(
equal(iKeyMENU_OPTION)) {
        if(
g_life_key[id] < sizeof VALUE_LIFE -1)
            
g_life_key[id]++
        else
            
g_life_key[id] = 0
        
        
new pagenewmenuoldmenu
        player_menu_info
(idoldmenunewmenupage)
        
        
Menu_Life(idpage)
        
menu_destroy(menu)
        return
    }
        
    new 
tempid str_to_num(iKey)
    new 
life str_to_num(VALUE_LIFE[g_life_key[id]])
    
set_user_health(tempidlife)

this is a menu to give life
__________________

www.amxmodx-es.com

Steam: Luchokoldo
rak is offline
Send a message via MSN to rak Send a message via Skype™ to rak
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-19-2012 , 22:11   Re: Help, wiith menu?
Reply With Quote #5

What you see in plmenu.sma is the most efficient method. It just takes patience and time testing things to figure it out.
__________________
fysiks 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 07:53.


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