Raised This Month: $ Target: $400
 0% 

[Help] menu Mistake


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Xpawn
Junior Member
Join Date: Dec 2011
Old 12-02-2011 , 13:17   [Help] menu Mistake
Reply With Quote #1

Help me to correct a mistake in this script

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>

public plugin_init()
 {
     
register_plugin("Menu test""0.1""Xpawn")
    
register_clcmd"my_awesome_menu","AwesomeMenu")
 }
public 
AwesomeMenu(id)
 {
    new 
menu menu_create("\rShow ??:""menu_handler")
    
menu_additem(menu"\wShow IP""1"0)
    
menu_additem(menu"\wShow PING""2"0)
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
 }
 
 public 
menu_handler(idmenuitem)
 {
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
    
}

    new 
data[6], szName[64]
    new 
accesscallback
    menu_item_getinfo
(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback)

    new 
key str_to_num(data)

    switch(
key)
    {
        case 
1:
        {
        new 
ip[60]
        
get_user_ip(id"ip"591)
        
client_print(idprint_chat"You IP is: %s"ip)
        
menu_destroy(menu)
        return 
PLUGIN_HANDLED
        
}
        case 
2:
        {
        new 
ping[5]
        
get_user_ping(idping4)
        
client_print(idprint_chat"Your ping is: %s"ping)
        return 
PLUGIN_HANDLED
        
}
    
menu_destroy(menu)
    return 
PLUGIN_HANDLED
 

__________________
New Member
Xpawn is offline
Send a message via MSN to Xpawn
 



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 08:29.


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