Raised This Month: $ Target: $400
 0% 

[Help] Menu Plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
manuelpuyol
Junior Member
Join Date: Dec 2010
Location: Brazil
Old 11-08-2011 , 16:33   [Help] Menu Plugin
Reply With Quote #1

Some time ago, I found a menu plugin in the web and i edited it, but when I try to use it, nothing happens. The plugin doesn't work.

here's the code:

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

public plugin_init()
{
    
register_plugin("PLUGIN""VERSION""AUTHOR")    
    
register_clcmd("say /menu""jbmenu")
    
register_clcmd("chooseteam""hooknvg");
}
public 
hooknvg(id)
{
    
jbmenu(id);
    return 
PLUGIN_HANDLED;
}  

public 
jbmenu(id)
{
    new 
Menu menu_create("\r[rL' JB] Menu""antinoobmenu")
    
menu_additem(Menu"\wPassar para o time dos \bPrisioneiros"        "1"0)
    
menu_additem(Menu"\wPassar para o time dos \rGuardas"        "2"0)
    
menu_additem(Menu"\wPassar para \ySPEC"        "3"0)

    
    
menu_setprop(Menu,MPROP_EXITNAME,"Sair")
    
menu_setprop(MenuMPROP_EXITMEXIT_ALL)
    
    
menu_display(idMenu0)
}

public 
antinoobmenu(idMenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(Menu)
        return 
PLUGIN_HANDLED
    
}
    
    
    new 
iData[6];
    new 
iAccess;
    new 
iCallback;
    new 
iName[64];
    
menu_item_getinfo(MenuitemiAccessiData5iName63iCallback)
    
    switch (
str_to_num(iData))
{
        case 
1:
        {
        if(
cs_get_user_team(id) == CS_TEAM_T)  
    {  
        
client_print(idprint_chat"[rL' JB] Voce ja esta no time dos Prisioneiros.")  
    }  
        else  
    {  
        new 
name[32]  
        
get_user_name(id,name,31)  
        if(
is_user_alive(id)) user_kill(id)  
        
cs_set_user_team idCS_TEAM_TCS_T_TERROR)  
        
client_print(0print_chat"[rL' JB] %s trocou para o time dos Prisioneiros."name)  
    }
        }  
      
        case 
2:
       {
             if(
cs_get_user_team(id) == CS_TEAM_CT)  
    {  
        
client_print(idprint_chat"[rL' JB] Voce ja esta no time dos Guardas.")  
        return 
PLUGIN_HANDLED  
    
}  
          else  
    {  
        new 
name[32]  
        
get_user_name(id,name,31)  
        if(
is_user_alive(id)) user_kill(id)  
        
cs_set_user_team idCS_TEAM_CTCS_CT_URBAN)  
        
client_print(0print_chat"[rL' JB] %s trocou para o time dos Guardas."name)  
    }       
       }
       
        case 
3
        {
         if(
cs_get_user_team(id) == CS_TEAM_SPECTATOR)  
    {  
        
client_print(idprint_chat"[rL' JB] Voce ja eh SPEC.")  
        return 
PLUGIN_HANDLED  
    
}  
    else  
    {  
        new 
name[32]  
        
get_user_name(id,name,31)  
        if(
is_user_alive(id)) user_kill(id)  
        
cs_set_user_team idCS_TEAM_SPECTATOR 
        
client_print(0print_chat"[rL' JB] %s foi para SPEC."name)  
    }  
       }

}
return 
PLUGIN_HANDLED

I would be very happy if you can help me.
manuelpuyol is offline
 


Thread Tools
Display Modes

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 14:27.


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