Raised This Month: $ Target: $400
 0% 

[HELP]Tags Teams


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
#8 SickneSS
BANNED
Join Date: Sep 2008
Location: Here
Old 09-14-2009 , 06:36   [HELP]Tags Teams
Reply With Quote #1

hello, I dont know what is wrong with this code, because when I choose the menu option it gives only 1 player from each team and not all ...:/

Code...

PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN "New Plugin"
#define VERSION "1.0"
#define AUTHOR "#8 SickneSS"

new tagTttagTtSidetagCttagCtSide
new g_tagsON

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_concmd("say /menu","Menu",ADMIN_CVAR)
    
register_concmd("mm_tag","cmdTags",ADMIN_CVAR)
    
g_tagsON register_cvar("mm_enable_tags","0")    
    
tagTt register_cvar("mm_tagtt","Terrrorist")
    
tagCt register_cvar("mm_tagct","Counter-Terrorist")
    
tagTtSide register_cvar("mm_tagtt_side","0")
    
tagCtSide register_cvar("mm_tagct_side","1")        
    
}
public 
cmdTags(id) {
    
    if(
get_pcvar_num(g_tagsON) == 1){ 
    new 
NNick[32]
    new 
Tt[32
    new 
Ct[32]
    new 
Name[32]
    new 
Team[32]
    
    
get_user_team(id,Team,31)
    
get_user_name(id,Name,31
    
get_pcvar_string(tagTtTt31)
    
get_pcvar_string(tagCtCt31)

    if (
strcmp(Team,"TERRORIST") == || strcmp(Team,"@terrorist") == )
    {    
        
    if (
containi(Name,Tt) != -)
    return 
PLUGIN_HANDLED 
    
    
if (get_pcvar_num(tagTtSide) == 1)
    {
        
format(NNick31"%s%s"NameTt)
        
set_user_info(id"name"NNick)
    }
    else
    {
        
format(NNick31"%s%s"TtName)
        
set_user_info(id"name"NNick)    
    }
    
    
client_print(id,print_chat,"The new tag for Terrorists is %s.",Tt)
    
    return 
PLUGIN_HANDLED
    
    
}

    if (
strcmp(Team,"CT") == || strcmp(Team,"@counter") == 0)
    {
        
    if (
containi(Name,Ct) != -)
        return 
PLUGIN_HANDLED 
        
    
if (get_pcvar_num(tagCtSide) == 1)
    {
        
format(NNick31"%s%s"NameCt)
        
set_user_info(id"name"NNick)
    }
    else
    {
        
format(NNick31"%s%s"CtName)
        
set_user_info(id"name"NNick)
    }        
    
    
client_print(id,print_chat,"The new tag for Counter-Terrorists is %s.",Ct

    return 
PLUGIN_HANDLED
    
    
}
    return 
PLUGIN_HANDLED
}
    return 
PLUGIN_HANDLED
}
public 
Menu(id,level,cid) {
    if ( !
cmd_access(idlevelcid1))
    return 
PLUGIN_HANDLED
    
new menu menu_create("Menu","menu_handler")
    
menu_additem(menu"Switch tags on teams""1"0)
    
menu_setprop(menuMPROP_EXITMEXIT_ALL)
    
menu_display(idmenu0)
    return 
PLUGIN_HANDLED
}
public 
Menu_Handler(idmenuitem)
{
    if (
item == MENU_EXIT)
    {
        
menu_destroy(menu)
        return 
PLUGIN_CONTINUE
    
}
    
    new 
iData[6];
    new 
iAccess;
    new 
iCallback;
    new 
iName[64];
    
menu_item_getinfo(menuitemiAccessiData5iName63iCallback)
    
    switch (
str_to_num(iData))
    {
        case 
1:
        {    
            
            for(new 
1<= get_maxplayers(); ++)
            {
            if(
is_user_connected(i))
            
cmdTags(i)
            
menu_destroy(menu)
        }
        }    
    }
    
menu_display(idmenu0)
    return 
PLUGIN_HANDLED 

ps : sorry for my bad english ... im from argentina

Thanks

Last edited by #8 SickneSS; 09-14-2009 at 08:59.
#8 SickneSS is offline
Send a message via MSN to #8 SickneSS Send a message via Skype™ to #8 SickneSS
 



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 22:23.


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