Raised This Month: $248 Target: $400
 62% 

Clan Sytem tag off


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GaBy96
Member
Join Date: Oct 2012
Location: Romania
Old 09-16-2020 , 12:29   Clan Sytem tag off
Reply With Quote #1

Hello! can someone remove my tag from this plugin?

PHP Code:
#include < amxmodx >
#include < amxmisc >
#include < hamsandwich >
#include < fakemeta >
#include < adv_vault >

/*    ====== START EDIT SECTION ======    */

// Aici setezi numarul maxim de jucatori care se pot conecta la serverul tau
#define MAXPLAYERS 32

#define CLANNAME_LENGHT 20
#define CLAN_MAXMEMBERS 5
#define CLAN_MINMEMBERS 2
#define MENU_TITTLE_LENGHT 128
#define PASSWORD_LENGHT 50

new const MENU_PREFIX[ ] = "\r[ \yAMXX \dCLAN \ySYSTEM \r]\w";
new const 
CHAT_PREFIX[ ] = "!g[ CLAN SYSTEM ]!n";

/*    ==== END EDIT SECTION ====    */

#define MP MAXPLAYERS+1

#define flag_get(%1,%2)        (%1 & (1 << (%2 & 31)))
#define flag_set(%1,%2)        (%1 |= (1 << (%2 & 31)))
#define flag_unset(%1,%2)        (%1 &= ~(1 << (%2 & 31)))

#define TASK_HUD 1000
#define ID_HUD ( taskid - TASK_HUD )

enum 

    
C_MEMBERSHIPC_CLANNAMEC_DATEC_PASSC_PNAMEC_KILLSC_DEATHSC_HS_KILLSC_HS_DEATHS,
    
C_KNIFE_KILLSC_KNIFE_DEATHSC_SUICIDESC_SPAWNSC_RANGEC_CLAN_CHAT,
    
    
C_MAX
}

enum WITHOUT_CLAN 0CLAN_MEMBERCLAN_BOSSCLAN_OWNERMAX_MEMBER_RANGES }
enum LOAD0SAVE }
enum _:RANGES RANGO_NAME50 ], RANGO_FRAGS }
enum NOT_REGISTERED 0REGISTEREDLOGGUEDMAX_STATUS }
enum _:DATA_RANK KILLSDEATHSHS_KILLSHS_DEATHSKNIFE_KILLSKNIFE_DEATHSSUICIDESSPAWNS }
enum _:BITS CONNECTEDALIVECAN_CHANGE_PW }
enum _:MSGS MSG_VGUIMSG_SHOWMENUMSG_SAYTEXTMSG_TEAMINFO }
    
new const 
P_NAME[ ] = "CLAN SYSTEM";
new const 
P_VERSION[ ] = "1.1b";
new const 
P_AUTOR[ ] = "kikizon";

new 
kBits[BITS], kMsg[MSGS];

new 
kClanMembershipMP ], kRangeMP ], kActivatedClanChatMP ];

new 
kInvitedMP ], kClanOwnerMP ], kDataRankMP ][ DATA_RANK ];

new 
kClanNameMP ][ CLANNAME_LENGHT ], kClanNameConfirmatedMP ];

new 
kPlayerNameMP ][ 32 ], kPnameMP ][ 32 ];

new 
vaultkFieldsC_MAX ], kPasswordMP ][ PASSWORD_LENGHT ], kPassword2MP ][ PASSWORD_LENGHT ], kDateMP ][ 32 ], kStatusMP ];

new  
hudSync;

new const 
StatusMAX_STATUS ][ ] = { "UNREGISTERED""REGISTERED""LOGGED" };
new const 
MemberRangeMAX_MEMBER_RANGES ][ ] = { "NO CLAN""MEMBER""BOSS""FOUNDER" };

new const 
Rangos[][RANGES] = 
{
    { 
""},
    { 
"Beginner"100 },
    { 
"Silver I"200 },
    { 
"Silver II"300 },
    { 
"Silver III"500 },
    { 
"Silver IV"700 },
    { 
"Silver Elite"800 },
    { 
"Silver Elite Master"900 },
    { 
"Gold Nova I"1000 },
    { 
"Gold Nova II"1200 },
    { 
"Gold Nova III"1300 },
    { 
"Gold Nova Master"1400 },
    { 
"Master Guardian I",1500 },
    { 
"Master Guardian II"1700 },
    { 
"Master Guardian Elite"1800 },
    { 
"Distinguished Master Guardian"1900 },
    { 
"Legendary Eagle"2000 },
    { 
"Legendary Eagle Master"2100 },
    { 
"Supreme Master First Class"2200 },
    { 
"The Global Elite"2500 }
};


/*    ================    */

public plugin_init() 
{
    
register_pluginP_NAMEP_VERSIONP_AUTOR );
    
    
register_event("DeathMsg""ev_DeathMsg""a");
    
    
RegisterHam(Ham_Killed"player""ham_PlayerKilledPost"true );
    
RegisterHam(Ham_Spawn"player""ham_PlayerSpawnPost"true );
    
    
register_forwardFM_ClientUserInfoChanged"fm_ClientInfoChanged" );
    
    
register_clcmd"say""Block_Say" );
    
register_clcmd"say_team""Block_TeamSay" );
    
register_clcmd"say /clan""cmd_CLAN" );
    
register_clcmd("say /claninfo""INFORMATII")
    
register_clcmd("say","hook_say"); 
    
register_clcmd"JOIN_CLAN_NAME""JoinClanName" );
    
register_clcmd"JOIN_PASSWORD""JoinPassword" );
    
    
    
kMsg[MSG_VGUI] = get_user_msgid("VGUIMenu");
    
kMsg[MSG_SHOWMENU] = get_user_msgid("ShowMenu");
    
kMsg[MSG_SAYTEXT] = get_user_msgid("SayText");
    
kMsg[MSG_TEAMINFO] = get_user_msgid("TeamInfo");
    
//register_message(kMsg[MSG_VGUI], "message_VGUImenu");
    //register_message(kMsg[MSG_SHOWMENU], "message_VGUImenu");
    
    
    
hudSync CreateHudSyncObj();
    
    
    
vault adv_vault_open"CLAN_SYSTEM"true );
     
    
kFieldsC_MEMBERSHIP ] = adv_vault_register_fieldvault"AFFILIATION");
    
kFieldsC_CLANNAME ] = adv_vault_register_fieldvault"CLAN NAME"DATATYPE_STRINGCLANNAME_LENGHT-);
    
kFieldsC_DATE ] = adv_vault_register_fieldvault"DATE"DATATYPE_STRING32 );
    
kFieldsC_PASS ] = adv_vault_register_fieldvault"PASSWORD"DATATYPE_STRINGPASSWORD_LENGHT-);
    
kFieldsC_PNAME ] = adv_vault_register_fieldvault"NAME"DATATYPE_STRING31 );
    
kFieldsC_KILLS ] = adv_vault_register_fieldvault"KILLS" );
    
kFieldsC_DEATHS ] = adv_vault_register_fieldvault"DEATHS" );
    
kFieldsC_HS_KILLS ] = adv_vault_register_fieldvault"HS KILLS" );
    
kFieldsC_HS_DEATHS ] = adv_vault_register_fieldvault"HS DEATHS" );
    
kFieldsC_KNIFE_KILLS ] = adv_vault_register_fieldvault"KNIFE KILLS" );
    
kFieldsC_KNIFE_DEATHS ] = adv_vault_register_fieldvault"KNIFE DEATHS" );
    
kFieldsC_SUICIDES ] = adv_vault_register_fieldvault"SUICIDES" );
    
kFieldsC_SPAWNS ] = adv_vault_register_fieldvault"RESPAWNS" );
    
kFieldsC_RANGE ] = adv_vault_register_fieldvault"RANG" );
    
kFieldsC_CLAN_CHAT ] = adv_vault_register_fieldvault"CLANCHAT" );
    
    
adv_vault_initvault );
}

public 
hook_say(id) {
    static 
s_Args[192]; 
    
    
read_argv(1s_Argssizeof(s_Args) - 1); 
    
    if(
equal(s_Args"/"1)) {
        return 
PLUGIN_HANDLED;
    }
    return 
PLUGIN_CONTINUE;
}

public 
INFORMATII(id)
{
    
show_motd(id"cstrike/addons/amxmodx/configs/claninfo.txt")
}


public 
client_putinserverindex )
{
    
flag_set(kBits[CONNECTED], index);
    
get_user_nameindexkPlayerNameindex ], 31 );
    
get_time"%c"kDateindex ], 31);
    
    
kClanMembershipindex ] = WITHOUT_CLAN;
    
kClanNameindex ] = "^0";
    
kPasswordindex ] = "^0";
    
kClanNameConfirmatedindex ] = false;
    
kRangeindex  ] = 0;
    
kActivatedClanChatindex ] = false;
    
    
DataManagementindexLOAD );
}

public 
client_disconnectindex )
{
    
remove_taskindex+TASK_HUD );
    
DataManagementindexSAVE );
    
    
flag_unset(kBits[CONNECTED], index);
}

public 
Block_Say(index)
{
    static 
said[191];
    
read_args(saidcharsmax(said)); 
    
szRemove_Quotes(saidsaid);
    
replace_all(saidcharsmax(said), "%"""); 
    
replace_all(saidcharsmax(said), "#""");
    
    if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;
    
    static 
color[11], prefix[111], range[64];
    
get_user_team(indexcolorcharsmax(color));
    
    
formatex(rangecharsmax(range), "^x03(^x04 %s^x04 %s^x03)"Rangos[kRange[index]][RANGO_NAME], kClanNameindex ][ ] ? kClanNameindex ] : "NO CLAN" );
    
formatex(prefixcharsmax(prefix), "%s%s^x03 %s"flag_get(kBits[ALIVE],index)?"^x01":"^x01*DEAD* "rangekPlayerName[index]);
    
    if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said);
    
    
format(saidcharsmax(said), "%s^x01 : %s"prefixsaid);
    
    static 
iteam[11];
    
    for (
1<= MAXPLAYERS; ++i)
    {
        if (!
flag_get(kBits[CONNECTED],i)) continue;

        if (
is_user_admin(i) || flag_get(kBits[ALIVE],index) && flag_get(kBits[ALIVE],i) || !flag_get(kBits[ALIVE],index) && !flag_get(kBits[ALIVE],i))
        {
            
get_user_team(iteamcharsmax(team));
            
changeTeamInfo(icolor);
            
writeMessage(isaid);
            
changeTeamInfo(iteam);
        }
    }
    
    return 
PLUGIN_HANDLED_MAIN;
}


public 
Block_TeamSay(index)
{
    static 
said[191];
    
read_args(said190); 
    
szRemove_Quotessaidsaid );
    
replace_all(said190"%"""); 
    
replace_all(said190"#""");
    
    if(
kActivatedClanChatindex ] )
    {
        if(!
ValidMessage(said1) || kClanMembershipindex ] == WITHOUT_CLAN)
        {
            
Color_Printindex"Your message is no valid or you are not in a clan yet.");
            return 
PLUGIN_HANDLED;
        }
    
        static 
iteam[11], color[11], range[128], prefix[111]; 
        
get_user_team(indexcolorcharsmax(color));
        
        
formatex(rangecharsmax(range), "^x03(^x01 PRIVATE CHAT:^x04 %s ^x03)"kClanNameindex ]);
        
formatex(prefixcharsmax(prefix), "%s%s^x03 %s"flag_get(kBits[ALIVE],index)?"^x01":"^x01*DEAD* "rangekPlayerName[index]);
    
        if (
kClanMembershipindex ] == CLAN_OWNER || kClanMembershipindex ] == CLAN_BOSSformat(saidcharsmax(said), "^x04%s"said);
    
        
format(saidcharsmax(said), "%s^x01 : %s"prefixsaid);
    
        for (
1<= MAXPLAYERS; ++i)
        {
            if (!
flag_get(kBits[CONNECTED],i)) continue;

            if ( 
equal(kClanNameindex ], kClanName]) )
            {
                
get_user_team(iteamcharsmax(team));
                
changeTeamInfo(icolor);
                
writeMessage(isaid);
                
changeTeamInfo(iteam);
            }
        }
    }
    else
    {
        if (!
ValidMessage(said1)) return PLUGIN_CONTINUE;

        static 
playerTeamplayerTeamName[19];
        
playerTeam get_user_team(index);
    
        switch (
playerTeam)
        {
            case 
1copy (playerTeamName6"^x03 * CT *");
            case 
2copy (playerTeamName8"^x03 * TT *");
            default: 
copy (playerTeamName11"* SPEC *");
        }
    
        static 
color[11], prefix[111], range[128];
        
get_user_team(indexcolorcharsmax(color));
    
        
formatex(rangecharsmax(range), "^x03(^x04 %s^x04 %s^x03)"Rangos[kRange[index]][RANGO_NAME], kClanNameindex ][ ] ? kClanNameindex ] : "NO CLAN" );
        
formatex(prefixcharsmax(prefix), "%s%s %s^x03 %s"flag_get(kBits[ALIVE],index)?"^x01":"^x01*DEAD* "playerTeamNamerangekPlayerName[index]);
    
        if (
is_user_admin(index)) format(saidcharsmax(said), "^x04%s"said);
    
        
format(saidcharsmax(said), "%s^x01 : %s"prefixsaid);
    
        static 
iteam[11];
        for (
1<= MAXPLAYERS; ++i)
        {
            if (!
flag_get(kBits[CONNECTED],i)) continue;

            if (
get_user_team(i) == playerTeam)
            {
                if (
flag_get(kBits[ALIVE],index) && flag_get(kBits[ALIVE],i) || !flag_get(kBits[ALIVE],index) && !flag_get(kBits[ALIVE],i))
                {
                    
get_user_team(iteamcharsmax(team));
                    
changeTeamInfo(icolor);
                    
writeMessage(isaid);
                    
changeTeamInfo(iteam);
                }
            }
        }    
    }
    
    return 
PLUGIN_HANDLED_MAIN;
}

public 
ham_PlayerKilledPostvictimattackershouldgib )
{
    if( !
is_user_connectedattacker ) || victim == attacker || !attacker )
        return;
        
    if(
get_user_weaponattacker ) == CSW_KNIFE)
    {
        ++
kDataRankattacker ][ KNIFE_KILLS ];
        ++
kDataRankvictim ][ KNIFE_DEATHS ];
    }
    
    ++
kDataRankattacker ][ KILLS ];
    ++
kDataRankvictim ][ DEATHS ];
    
    
flag_unset(kBits[ALIVE],victim);
    
    
UpdateRangeattacker );
}

public 
ham_PlayerSpawnPostindex )
{
    
flag_set(kBits[ALIVE],index);
    
    if( !
flag_get(kBits[ALIVE], index)) return;
    
    ++
kDataRankindex ][ SPAWNS ];
}

public 
ev_DeathMsg()
{
    static 
victimattackerheadshot;
    
    
attacker read_data(1);
    
victim read_data(2);
    
headshot read_data(3);
    
    if( !
attacker || victim == attacker )
    {
        ++
kDataRankvictim ][ SUICIDES ];
        return;
    }
        
    if( 
headshot )
    {
        ++
kDataRankattacker ][ HS_KILLS ];
        ++
kDataRankvictim ][ HS_DEATHS ];
    }
}

/*    ================    */

public cmd_CLANindex )
{
    if( 
kClanMembershipindex ] == WITHOUT_CLAN )
    {
        
ShowMenuCreateClanindex );
        return 
PLUGIN_HANDLED;
    }
    
    
ShowMenuClanindex );
    return 
PLUGIN_HANDLED;
}

public 
JoinClanNameindex )
{
    
read_args(kClanNameindex ], CLANNAME_LENGHT-1);
    
szRemove_Quotes(kClanNameindex ], kClanNameindex ]);
    
trim(kClanNameindex ]);
    
    if( 
kClanNameConfirmatedindex ])
    {
        
client_printindexprint_center"YOU'VE CONFIRMED CLAN'S NAME!");
        
ShowMenuCreateClanindex );
        return;
    }
    
    if( !
kClanNameindex ][ ])
    {
        
client_printindexprint_chat" TYPE THE CLAN'S NAME ");
        
client_cmdindex"messagemode ^"JOIN_CLAN_NAME^"");
        return;
    }
    
    static 
xdxd get_membersnumindex );
    
    if( 
xd )
    {
        
client_printindexprint_center"THIS CLAN NAME IS ALREADY TAKEN");
        
kClanNameindex ] = "^0";
        
ShowMenuCreateClanindex )
        return;
    }
    
    
ShowMenuConfirmateClanNameindex );
}

public 
JoinPasswordindex )
{
    
read_args(kPasswordindex ], PASSWORD_LENGHT-1);
    
szRemove_Quotes(kPasswordindex ], kPasswordindex ]);
    
trim(kPasswordindex ]);
    
    if( !
kPasswordindex ][ ] || containikPasswordindex ], " ") != -)
    {
        
client_printindexprint_center"YOUR PASSWORD, CONTAIN ERRORS" );
        
client_cmdindex"messagemode ^"JOIN_PASSWORD^"");
        return;
    }
    
    switch(
kStatusindex ])
    {
        case 
NOT_REGISTERED:
        {
            
client_printindexprint_center"CONFIRM YOUR PASSWORD TO CONTINUE");
            
copy(kPassword2index ], PASSWORD_LENGHT-1kPasswordindex ]);
            
            
ShowMenuConfirmatePwindex );
        }
        case 
REGISTERED
        {
            new 
buffer[PASSWORD_LENGHT];
            
adv_vault_get_preparevault_kPasswordindex ]);
            
adv_vault_get_fieldvaultkFieldsC_PASS ], buffercharsmax(buffer));
            
            if(! 
equal(bufferkPasswordindex ])) 
            {
                
ShowLogMenuindex );
                
client_printindexprint_center"INCORRECT PASSWORD." );
                return;
            }
            
            
client_printindexprint_center"YOU'VE BEEN SUCCESSFULLY LOGGED TO YOUR ACCOUNT");
            
ForceJoinTeamindex );
        }
        case 
LOGGUED
        {
            if(
flag_get(kBits[CAN_CHANGE_PW], index)) 
            {
                
client_printindexprint_center"YOU HAVE ALREADY CHANGED YOUR PASSWORD ON THIS MAP");
                return;
            }
            
            
client_printindexprint_center"CONFIRM YOUR CURRENT PASSWORD TO CHANGE IT WITH A NEW ONE..." );
            
copy(kPassword2index ], PASSWORD_LENGHT-1kPasswordindex ]);
            
ShowMenuConfirmatePwindex );
        }
    }
}

/*============================
    MENUS
============================*/

ShowMenuCreateClanindex )
{
    static 
menutittle[MENU_TITTLE_LENGHT], membersmembers get_membersnumindex );
    
formatextittleMENU_TITTLE_LENGHT-1"%s CREATE CLAN"MENU_PREFIX );
    
menu menu_createtittle"menu_create_hand" );
    
    
formatextittleMENU_TITTLE_LENGHT-1"CLAN NAME: \d%s"kClanNameindex ] );
    
menu_additemmenu, (!kClanNameindex ][ ])?"TYPE THE CLAN NAME":tittle"1" );
    
    
formatextittleMENU_TITTLE_LENGHT-1"ADD MEMBERS... \d( \r%d \y/ \r%d \d)"membersCLAN_MAXMEMBERS);
    
menu_additemmenu, (!kClanNameindex ][ ])?"\dADD MEMBERS":tittle"2" );
    
    
menu_additemmenu, (members >= CLAN_MINMEMBERS )?"CREATE CLAN":"\dCREATE CLAN""3" );
    
    
menu_displayindexmenu );
}

public 
menu_create_handindexmenuitem )
{
    switch( 
item )
    {
        case 
MENU_EXIT: { menu_destroymenu ); return PLUGIN_HANDLED; }
        
        case 
0:
        {
            if(!
kClanNameConfirmatedindex ] )
            {
                
client_printindexprint_center" TYPE THE CLAN NAME " );
                
client_cmdindex"messagemode ^"JOIN_CLAN_NAME^"" );
                
                return 
PLUGIN_HANDLED;
            }
            
            
client_printindexprint_center"YOU'VE CONFIRMED CLAN'S NAME" );
            
ShowMenuCreateClanindex );
        }
        case 
1
        {
            if(!
kClanNameindex ][ ])
            {
                
client_printindexprint_center"YOU NEED TO CREATE A CLAN'S NAME BEFORE");
                
ShowMenuCreateClanindex );
                return 
PLUGIN_HANDLED;
            }
            
            
ShowInviteMenuindex );
        }
        case 
2
        {
            static 
membersmembers get_membersnumindex );
            
            if(
members >= CLAN_MINMEMBERS )
                
CreateClanindex );
            else
                
client_printindexprint_center"YOU NEED AT LEAST %d MEMBERS TO CREATE THE CLAN"CLAN_MINMEMBERS );
        }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

ShowMenuClanindex )
{
    static 
menutittleMENU_TITTLE_LENGHT ], membersmembers get_membersnumindex );
    
formatextittleMENU_TITTLE_LENGHT-1"%s CLAN MENU: \r%s^n\wMEMBERS: \y%d \d/ \y%d"
    
MENU_PREFIXkClanNameindex ], membersCLAN_MAXMEMBERS );
    
menu menu_createtittle"menu_clan" );
    
    
    switch(
kClanMembershipindex ])
    {
        case 
CLAN_OWNER:
        {
            
menu_additemmenu"VIEW MEMBERS""1" );
            
menu_additemmenu"KICK MEMBERS""2" );
            
menu_additemmenu, (members >= CLAN_MAXMEMBERS)?"\dINVITE MEMBERS":"INVITE MEMBERS""3" );
            
menu_additemmenu"EDIT RANK \d( del clan )^n""4" );
            
            
formatex(tittleMENU_TITTLE_LENGHT-1"%s \wCLAN CHAT \y( \dPRIVATE CHAT \d^"\rTEAM SAY\d^"\y)"
            
kActivatedClanChatindex ] ? "\rDISABLE":"\rENABLE");
            
menu_additemmenutittle"5");
        }
        case 
CLAN_BOSS:
        {
            
menu_additemmenu"VIEW MEMBERS""1" );
            
menu_additemmenu"KICK MEMBERS""2" );
            
menu_additemmenu, (members >= CLAN_MAXMEMBERS)?"\dINVITE MEMBERS":"INVITE MEMBERS""3" );
            
            
formatex(tittleMENU_TITTLE_LENGHT-1"%s \wCLAN CHAT \y( \dPRIVATE CHAT \d^"\rTEAM SAY\d^"\y)"
            
kActivatedClanChatindex ] ? "DISABLE":"ENABLE");
            
menu_additemmenutittle"4");
        }
        case 
CLAN_MEMBER:
        {
            
menu_additemmenu"VIEW MEMBERS^n""1" );
            
            
formatex(tittleMENU_TITTLE_LENGHT-1"%s \wCLAN CHAT \y( \dPRIVATE CHAT \d^"\rTEAM SAY\d^"\y)"
            
kActivatedClanChatindex ] ? "DISABLE":"ENABLE");
            
menu_additemmenutittle"2");
        }
    }
    
    
menu_displayindexmenu );
}

public 
menu_clanindexmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    static 
membersmembers get_membersnumindex );
    switch(
kClanMembershipindex ])
    {
        case 
CLAN_OWNER:
        {
            switch( 
item )
            {
                case 
0ShowClanMembersindex );
                case 
1ShowKickMembersMenuindex );
                case 
2
                {
                    if(
members CLAN_MAXMEMBERS)
                    {
                        
ShowInviteMenuindex );
                        return 
PLUGIN_HANDLED;
                    }
                    
                    
Color_Printindex"MAX NUMBER OF MEMBERS WAS REACHED");
                }
                        
                case 
3EditRangesMembersindex );
                case 
4
                {
                    if(
kActivatedClanChatindex ])
                    {
                        
kActivatedClanChatindex ] = false;
                        
ShowMenuClanindex );
                        return 
PLUGIN_HANDLED;
                    }
                    
                    
kActivatedClanChatindex ] = true;
                    
ShowMenuClanindex );
                }
            }
        }
        case 
CLAN_BOSS:
        {
            switch( 
item )
            {
                case 
0ShowClanMembersindex );
                case 
1ShowKickMembersMenuindex );
                case 
2
                {
                    if(
members CLAN_MAXMEMBERS)
                    {
                        
ShowInviteMenuindex );
                        return 
PLUGIN_HANDLED;
                    }
                    
                    
Color_Printindex"MAX NUMBER OF MEMBERS WAS REACHED");
                }
                case 
3
                {
                    if(
kActivatedClanChatindex ])
                    {
                        
kActivatedClanChatindex ] = false;
                        
ShowMenuClanindex );
                        return 
PLUGIN_HANDLED;
                    }
                    
                    
kActivatedClanChatindex ] = true;
                    
ShowMenuClanindex );
                }
            }
        }
        case 
CLAN_MEMBER:
        {
            switch( 
item )
            {
                case 
0ShowClanMembersindex );
                case 
1
                {
                    if(
kActivatedClanChatindex ])
                    {
                        
kActivatedClanChatindex ] = false;
                        
ShowMenuClanindex );
                        return 
PLUGIN_HANDLED;
                    }
                    
                    
kActivatedClanChatindex ] = true;
                    
ShowMenuClanindex );
                }
            }
        }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

ShowInviteMenuindex )
{
    static 
nmenupos[3], tittle[MENU_TITTLE_LENGHT];
    
formatextittleMENU_TITTLE_LENGHT-1"%s SEND INVITE TO AFFILIATE NEW MEMBERS"MENU_PREFIX );
    
menu menu_createtittle"menu_invite_hand" );
    
    for( 
1<= MAXPLAYERS; ++)
    {
        if( !
flag_get(kBits[CONNECTED], n) ) continue;
        
        if( 
kClanMembership] != WITHOUT_CLAN ) continue;
        
        if( 
index == ) continue;
        
        
num_to_strnpos);
        
        
menu_additemmenukPlayerName], pos );
    }
    
    
menu_displayindexmenu );
}

public 
menu_invite_handindexmenuitem )
{
    if( 
item == MENU_EXIT 
    {
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    static 
iKey], iAccessiCallback;
    
    
menu_item_getinfomenuitemiAccessiKeycharsmaxiKey ), __iCallback );
    
kInvitedindex ] = str_to_numiKey );
    
    if( 
get_membersnumindex ) == CLAN_MAXMEMBERS )
    {
        
client_printindexprint_chat"[CLAN-SYSTEM] YOU HAVE REACHED THE MAX NUMBER OF MEMBERS");
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    
client_printindexprint_chat"[CLAN-SYSTEM] YOU'VE INVITED %s TO JOIN YOUR CLAN."kPlayerNamekInvited[index] ] );
    
client_printkInvitedindex ], print_chat"[CLAN-SYSTEM] %s INVITED YOU TO JOIN HIS CLAN: %s"kPlayerNameindex ], kClanNameindex ] );
    
    
kClanOwnerkInvitedindex ] ] = index;
    
    if(
is_user_botkInvitedindex ] ) )
    {
        
kClanMembershipkInvitedindex ] ] = CLAN_MEMBER;
        
copy(kClanNamekInvited[index] ], CLANNAME_LENGHT-1kClanNameindex ] );
        
client_printindexprint_chat"[CLAN-SYSTEM] %s HAS ACCEPTED YOUR INVITATION"kPlayerNamekInvited[index] ] );
        
        
DataManagementkInvitedindex ], SAVE );
        
cmd_CLANindex );
    }
    else    
        
ShowMenuInvitedkInvitedindex ] , index );
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

ShowMenuInvitedinvitedowner )
{
    static 
menutittleMENU_TITTLE_LENGHT ];
    
formatextittleMENU_TITTLE_LENGHT-1"%s \r%s \wHAS SENT YOU AN INVITATION TO JOIN THE CLAN: \y%s",
    
MENU_PREFIXkPlayerNameowner ], kClanNameowner ] );
    
    
menu menu_create(tittle"menu_invited_hand");

    
menu_additemmenu"\yACCEPT""1");
    
    
menu_additemmenu"\rDECLINE""2");
    
    
menu_setpropmenuMPROP_EXITMEXIT_NEVER );
    
    
menu_displayinvitedmenu );
}

public 
menu_invited_handindexmenuitem )
{    
    switch (
item)
    {
        case 
0
        {
            
kClanMembershipindex ] = CLAN_MEMBER;
            
copy(kClanNameindex ], CLANNAME_LENGHT-1kClanNamekClanOwner[index] ]);
            
client_printkClanOwnerindex ], print_chat"[CLAN-SYSTEM] %s HAS ACCEPTED YOUR REQUEST"kPlayerNameindex ]);
            
            
cmd_CLANkClanOwnerindex ] );
        }
        case 
1
        {
            
client_printkClanOwnerindex ], print_chat"[CLAN-SYSTEM] %s HAS DECLINED YOUR INVITATION"kPlayerNameindex ]);
            
            
cmd_CLANkClanOwnerindex ] );
            
            
kClanMembershipindex ] = WITHOUT_CLAN;
            
kClanOwnerindex ] = 0;
            
kClanNameindex ] = "^0";
        }
         
        case 
MENU_EXIT: { menu_destroy(menu); return PLUGIN_HANDLED; }
    }
    
    
menu_destroy(menu);
    
    return 
PLUGIN_HANDLED;
}

ShowMenuConfirmateClanNameindex )
{
    static 
menutittleMENU_TITTLE_LENGHT ];
    
formatextittleMENU_TITTLE_LENGHT-1"%s CLAN NAME WILL BE: \d%s"MENU_PREFIXkClanNameindex ] );
    
menu menu_createtittle"menu_confirm_hand" );
    
    
menu_additemmenu"YES, CONTINUE""1" );
    
menu_additemmenu"NO, CREATE A NEW ONE""2");
    
    
menu_setpropmenuMPROP_EXITMEXIT_NEVER );
    
menu_displayindexmenu );
}

public 
menu_confirm_handindexmenuitem )
{
    switch( 
item )
    {
        case 
MENU_EXIT: { menu_destroy(menu); return PLUGIN_HANDLED; }
        
        case 
0:
        {
            
client_printindexprint_chat"[CLAN-SYSTEM] CLAN NAME WAS SUCCESSFULLY CREATED." );
            
kClanNameConfirmatedindex ] = true;
            
DataManagementindexSAVE );
            
ShowMenuCreateClanindex );
        }
        case 
1:
        {
            
client_printindexprint_chat" TYPE THE CLAN NAME ");
            
client_cmdindex"messagemode ^"JOIN_CLAN_NAME^"");
        }    
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

ShowClanMembersindex )
{
    static 
menukeyindexszkeyindex[5], item[128], item2[50], tittleMENU_TITTLE_LENGHT ];
    
formatextittleMENU_TITTLE_LENGHT-1"%s CLAN'S MEMBERS LIST: \d %s"MENU_PREFIXkClanNameindex ]);
    
menu menu_createtittle"menu_members_hand");
    
    
adv_vault_find_startvaultkFieldsC_CLANNAME ], kClanNameindex ], FINDFLAGS_EQUAL);
    
    while((
keyindex adv_vault_find_nextvault ))) 
    {
        
adv_vault_get_fieldvaultkFieldsC_PNAME], item2charsmax(item2) );
        
num_to_strkeyindexszkeyindexcharsmax(szkeyindex) );
        
formatexitemcharsmax(item), "%s \d( \y %s \d)"item2MemberRange[adv_vault_get_field(vaultkFields[C_MEMBERSHIP])] );
        
menu_additemmenuitemszkeyindex);
    }
    
    
adv_vault_find_closedvault );
    
    
menu_displayindexmenu );
}

public 
menu_members_handindexmenuitem )
{
    if( 
item == MENU_EXIT)
    {
        
cmd_CLANindex );
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    static 
iKeyszitem[5], keyindex;
    
menu_item_getinfomenuitemiKeyszitemcharsmax(szitem), __iKey );
    
keyindex str_to_num(szitem);
    
    
ShowMenuPlayerStatsindexkeyindex );
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

ShowMenuPlayerStatsindexkeyindex )
{
    new 
name[32], tittleMENU_TITTLE_LENGHT ], menu
    
    
if(!adv_vault_get_preparevault,  keyindex )) 
        return;
        
    
adv_vault_get_fieldvaultkFieldsC_PNAME ],  name31 );
    
formatextittleMENU_TITTLE_LENGHT-1"%s \wINFORMATION: \y%s \r",  MENU_PREFIXname );
    
    
menu menu_createtittle"menu_playerstats_hand" );
    
    
formatextittleMENU_TITTLE_LENGHT-1"\wCLAN RANK: \y%s"
    
MemberRangeadv_vault_get_fieldvaultkFieldsC_MEMBERSHIP]) ]);
    
menu_additemmenutittle"" );
    
    
formatextittleMENU_TITTLE_LENGHT-1"\wGENERAL RANK: \y%s"
    
Rangosadv_vault_get_field(vaultkFields[C_RANGE ]) ][ RANGO_NAME ]);
    
menu_additemmenutittle"" );
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wKILLS: \y%d"adv_vault_get_fieldvaultkFieldsC_KILLS ]) );
    
menu_additemmenu tittle"" );
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wDEATHS: \y%d"adv_vault_get_fieldvaultkFieldsC_DEATHS ]) );
    
menu_additemmenutittle"" );
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wHEADSHOT KILLS: \y%d"adv_vault_get_fieldvaultkFieldsC_HS_KILLS])  );
    
menu_additemmenutittle"");
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wHEADSHOT DEATHS: \y%d"adv_vault_get_fieldvaultkFieldsC_HS_DEATHS])  );
    
menu_additemmenutittle"");
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wKNIFE KILLS: \y%d"adv_vault_get_fieldvaultkFieldsC_KNIFE_KILLS ])  );
    
menu_additemmenutittle"");
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wKNIFE DEATHS: \y%d"adv_vault_get_fieldvaultkFieldsC_KNIFE_DEATHS])  );
    
menu_additemmenutittle"");
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wSUICIDES: \y%d"adv_vault_get_fieldvaultkFieldsC_SUICIDES ]) );
    
menu_additemmenutittle"");
     
    
formatex(tittleMENU_TITTLE_LENGHT-1"\wRESPAWNS: \y%d"adv_vault_get_fieldvaultkFieldsC_SPAWNS ]) );
    
menu_additemmenutittle"");
    
    
menu_displayindexmenu );
}

public 
menu_playerstats_handindexmenuitem )
{
    if( 
item == MENU_EXIT )
    {
        
menu_destroy(  menu );
        return 
PLUGIN_HANDLED;
    }
    
    if(
item <  6)
        
menu_displayindexmenu0);
    else
        
menu_displayindexmenu1);
    
    return 
PLUGIN_HANDLED;
}

ShowKickMembersMenuindex )
{
    static 
menukeyindexszkeyindex[5], item[128], tittleMENU_TITTLE_LENGHT ];
    
formatextittleMENU_TITTLE_LENGHT-1"%s KICK MEMBERS OF THE CLAN: \d %s"MENU_PREFIXkClanNameindex ]);
    
menu menu_createtittle"menu_kick_hand");
    
    
adv_vault_find_startvaultkFieldsC_CLANNAME ], kClanNameindex ], FINDFLAGS_EQUAL);
    
    while((
keyindex adv_vault_find_nextvault ))) 
    {
        
adv_vault_get_fieldvaultkFieldsC_PNAME ], itemcharsmax(item) );
        
num_to_strkeyindexszkeyindexcharsmax(szkeyindex) );
        
menu_additemmenuitemszkeyindex);
    }
    
    
adv_vault_find_closedvault );
    
    
menu_displayindexmenu );
}

public 
menu_kick_handindexmenuitem )
{
    if( 
item == MENU_EXIT)
    {
        
cmd_CLANindex );
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    static 
iKeyszitem[5], keyindex;
    
menu_item_getinfomenuitemiKeyszitemcharsmax(szitem), __iKey );
    
keyindex str_to_num(szitem);
    
    if(!
adv_vault_get_preparevault,  keyindex )) 
        return 
PLUGIN_HANDLED;
        
    static 
levelname[32]; 
    
adv_vault_get_fieldvaultkFieldsC_PNAME ], name31);
    
level adv_vault_get_fieldvaultkFieldsC_MEMBERSHIP]);
    
    if(
equal(namekPlayerNameindex ]) )
    {
        
Color_Printindex"YOU CAN'T KICK YOURSELF");
        
ShowMenuClanindex );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
level == CLAN_OWNER)
    {
        
Color_Printindex"YOU CAN'T KICK THE FOUNDER");
        
ShowMenuClanindex );
        return 
PLUGIN_HANDLED;
    }
    
    
adv_vault_set_startvault )
    
adv_vault_set_fieldvaultkFieldsC_CLANNAME ], "^0");
    
adv_vault_set_fieldvaultkFieldsC_MEMBERSHIP ], WITHOUT_CLAN );
    
adv_vault_set_fieldvaultkFieldsC_CLAN_CHAT ], false);
    
adv_vault_set_endvault_name);
    
    
Color_Print(index"YOU'VE KICKED: %s"name );
    
ShowMenuClanindex );
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

EditRangesMembersindex )
{
    static 
menukeyindexszkeyindex[5], item[128], item2[50], tittleMENU_TITTLE_LENGHT ];
    
formatextittleMENU_TITTLE_LENGHT-1"%s CLAN'S RANK EDITOR: \d %s"MENU_PREFIXkClanNameindex ]);
    
menu menu_createtittle"menu_ranges_hand");
    
    
adv_vault_find_startvaultkFieldsC_CLANNAME ], kClanNameindex ], FINDFLAGS_EQUAL);
    
    while((
keyindex adv_vault_find_nextvault ))) 
    {
        
adv_vault_get_fieldvaultkFieldsC_PNAME], item2charsmax(item2) );
        
num_to_strkeyindexszkeyindexcharsmax(szkeyindex) );
        
formatexitemcharsmax(item), "%s \d( \y %s \d)"item2MemberRange[adv_vault_get_field(vaultkFields[C_MEMBERSHIP])] );
        
menu_additemmenuitemszkeyindex);
    }
    
    
adv_vault_find_closedvault );
    
    
menu_displayindexmenu );
}

public 
menu_ranges_handindexmenuitem )
{
    if( 
item == MENU_EXIT)
    {
        
cmd_CLANindex );
        
menu_destroymenu );
        return 
PLUGIN_HANDLED;
    }
    
    static 
iKeyszitem[5], keyindex;
    
menu_item_getinfomenuitemiKeyszitemcharsmax(szitem), __iKey );
    
keyindex str_to_num(szitem);
    
    if(!
adv_vault_get_preparevault,  keyindex )) 
        return 
PLUGIN_HANDLED;
        
    static 
levelname[32]; 
    
adv_vault_get_fieldvaultkFieldsC_PNAME ], name31);
    
level adv_vault_get_fieldvaultkFieldsC_MEMBERSHIP]);
    
    if(
equal(namekPlayerNameindex ]) )
    {
        
Color_Printindex"YOU CAN'T CHANGE YOUR RANK");
        
ShowMenuClanindex );
        return 
PLUGIN_HANDLED;
    }
    
    if( 
level == CLAN_OWNER)
    {
        
Color_Printindex"YOU CAN'T CHANGE FOUNDER'S RANK");
        
ShowMenuClanindex );
        return 
PLUGIN_HANDLED;
    }
    
    
adv_vault_set_startvault )

    if( 
level == CLAN_MEMBER )
        
adv_vault_set_fieldvaultkFieldsC_MEMBERSHIP ], CLAN_BOSS );
    else if( 
level == CLAN_BOSS )
        
adv_vault_set_fieldvaultkFieldsC_MEMBERSHIP ], CLAN_MEMBER );
    
    
adv_vault_set_endvault_name);
    
    
Color_Print(index"YOU'VE CHANGED THE RANK OF: %s"name );
    
ShowMenuClanindex );
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

/*    ACCOUNT SYSTEM        */

ShowLogMenuindex
{
    static 
menutittle[MENU_TITTLE_LENGHT];
    
formatex(tittleMENU_TITTLE_LENGHT-1"Account system by \dkikizon^n\wWelcome \r%s^n\wSTATS: \r%s^n\wYOUR LAST VISIT WAS: \r%s"
    
kPlayerNameindex ], StatuskStatusindex ] ], kDateindex ] );
    
    
menu menu_createtittle"menu_log_hand" );
    
    
menu_additem(menu, (kStatusindex ] == REGISTERED ) ? "LOG IN":"\dLOG IN""1" );
    
menu_additem(menu, (kStatusindex ] == NOT_REGISTERED ) ? "REGISTER^n":"\dREGISTER^n""2" );
    
menu_additem(menu, (kStatusindex ] == LOGGUED && !flag_get(kBits[CAN_CHANGE_PW],index)) ? "CHANGE PASSWORD":"\dCHANGE PASSWORD""3" );
    
    
menu_setpropmenuMPROP_EXITMEXIT_NEVER );
    
    
menu_displayindexmenu );
}

public 
menu_log_handindexmenuitem )
{
    switch( 
item )
    {
        case 
0
        {
            if(
kStatusindex ] == REGISTERED)
            {
                
client_printindexprint_center"CONFIRM THE PASSWORD TO JOIN YOUR ACCOUNT" );
                
client_cmdindex,"messagemode ^"JOIN_PASSWORD^"" );
            } 
            else 
            {
                
client_printindexprint_center"YOU CAN'T USE THIS OPTION");
                
ShowLogMenuindex );
                return 
PLUGIN_HANDLED;
            }
        }
        case 
1
        {
            if(
kStatusindex ] == NOT_REGISTERED )
            {
                
client_printindexprint_center"TYPE A PASSWORD TO CREATE A NEW ACCOUNT" );
                
client_cmdindex ,"messagemode ^"JOIN_PASSWORD^"" );
            } 
            else 
            {
                
client_printindexprint_center"YOU CAN'T USE THIS OPTION" );
                
ShowLogMenuindex );
                return 
PLUGIN_HANDLED;
            }    
        }
        case 
2
        {
            if(
kStatusindex ] == LOGGUED && !flag_get(kBits[CAN_CHANGE_PW],index))
            {
                
client_printindexprint_center"CONFIRM YOUR NEW PASSWORD" );
                
client_cmdindex,"messagemode ^"JOIN_PASSWORD^"");
            } 
            else 
            {
                
client_printindexprint_center"YOU ARE NOT LOGGED OR YOU'VE CHANGED YOUR PASSWORD DURING THIS MAP" );
                
ShowLogMenuindex );
                return 
PLUGIN_HANDLED;
            }
        }
        
        case 
MENU_EXIT: { menu_destroymenu ); return PLUGIN_HANDLED; }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

ShowMenuConfirmatePwindex )
{
    static 
menuTitMENU_TITTLE_LENGHT ];
    
formatexTitMENU_TITTLE_LENGHT-1,"PASSWORD WILL BE \r%s^n^n\yCONFIRM?"kPassword2index ]);
    
    
menu menu_createTit"menu_confirmpw_hand" );
    
    
menu_additemmenu,"\rYES\w, CONFIRM","1" );
    
menu_additemmenu,"\rNO\w, TYPE A NEW ONE","2" );
    
    
menu_setpropmenuMPROP_EXITMEXIT_NEVER );
    
    
menu_displayindexmenu );
}

public 
menu_confirmpw_handindexmenuitem )
{
    switch(
item
    {
        case 
0
        {
            if( 
kStatusindex ] == LOGGUED )
            {
                
copy(kPasswordindex ], PASSWORD_LENGHT-1kPassword2index ]);
                
DataManagementindexSAVE );
                
client_printindexprint_center"YOUR PASSWORD HAS BEEN CHANGED SUCCESSFULLY");
                
flag_set(kBits[CAN_CHANGE_PW], index);
            }
            else 
            {
                
copy(kPasswordindex ], PASSWORD_LENGHT-1kPassword2index ]);
                
client_printindexprint_center"YOUR NEW ACCOUNT HAS BEEN CREATED" );
                
DataManagementindexSAVE );
                
ForceJoinTeamindex );
            }
        }
        case 
1
        {
            
menu_destroy(menu);
            
            
client_cmdindex"messagemode ^"JOIN_PASSWORD^"" );
            
            if( 
kStatusindex ] == LOGGUED )
                
client_printindexprint_center"TYPE YOUR NEW PASSWORD" );
            else
                
client_printindexprint_center"TYPE THE PASSWORD OF YOUR NEWEST ACCOUNT" );
        }
        
        case 
MENU_EXIT: { menu_destroymenu ); return PLUGIN_HANDLED; }
    }
    
    
menu_destroymenu );
    return 
PLUGIN_HANDLED;
}

/*============================
    STOCKS
============================*/

stock szRemove_Quotes( const szStr[ ], szOut[ ] )
{
    if ( !
szStr]  )
    {
        
szOut] = EOS;
        return 
0;
    }
    
    
copyszOutstrlenszStr )-2szStr] );
    
trimszOut );
    
    static 
iLeni;
    
iLen strlenszOut );
    
    for ( 
0iLen; ++i)
    {
        if (
szOut] == '"')
            return 
0;
    }
    
    return 
iLen;
}

stock ValidMessage(text[], maxcount
{
    static 
lenicount;
    
len strlen(text);
    
count 0;
    
    if (!
len) return false;
    
    for (
0len; ++i
    {
        if (
text[i] != ' '
        {
            ++
count;
            
            if (
count >= maxcount)
                return 
true;
        }
    }
    
    return 
false;
}

public 
changeTeamInfo(playerteam[])
{
    
message_begin(MSG_ONEkMsg[MSG_TEAMINFO], _player);
    
write_byte(player);
    
write_string(team);
    
message_end();
}

public 
writeMessage(playermessage[])
{
    
message_begin(MSG_ONEkMsg[MSG_SAYTEXT], {000}, player);
    
write_byte(player);
    
write_string(message);
    
message_end();
}

stock Color_Print(const id, const input[], any:...)
{    
    new 
count 1players[32];
    static 
msg[191], len;
    
    
len formatex(msgcharsmax(msg), "%s "CHAT_PREFIX);
    
vformat(msg[len], 190 leninput3);
    
    
replace_all(msg190"!g""^4");
    
replace_all(msg190"!n""^1");
    
replace_all(msg190"!t""^3");
    
    
    if(
id
        
players[0] = id;
    else 
        
get_players(playerscount"ch");
             
    for (new 
0count; ++i)
    {
        if(
flag_get(kBits[CONNECTED], players[i]))
        {
            
message_begin(MSG_ONE_UNRELIABLEkMsg[MSG_SAYTEXT], _players[i]);  
            
write_byte(players[i]);
            
write_string(msg);
            
message_end();                
        }        
    }

}

public 
message_VGUImenumsgiddestindex 
{
    if( 
kStatusindex ] != LOGGUED )
        
ShowLogMenuindex );

    return 
1;
}

public 
DataManagementindextype )
{
    if( !
flag_get(kBits[CONNECTED],index) ) return;
    
    if(
type == LOAD)
    {
        if( !
adv_vault_get_preparevault_kPlayerNameindex ] ) ) 
        {
            
kStatusindex ] = NOT_REGISTERED;
            return;
        } 
        else 
        {
            
kStatusindex ] = REGISTERED;
            
            
kClanMembershipindex ] = adv_vault_get_fieldvaultkFieldsC_MEMBERSHIP ] );
            
adv_vault_get_fieldvaultkFieldsC_CLANNAME ], kClanNameindex ], CLANNAME_LENGHT );
            
adv_vault_get_fieldvaultkFieldsC_DATE ], kDateindex ], 31);
            
adv_vault_get_fieldvaultkFieldsC_PASS ], kPasswordindex ], PASSWORD_LENGHT-1);
            
adv_vault_get_fieldvaultkFieldsC_PNAME ], kPnameindex ], 31 );
            
kDataRankindex ][ KILLS ] = adv_vault_get_fieldvaultkFieldsC_KILLS ] );
            
kDataRankindex ][ DEATHS ] = adv_vault_get_fieldvaultkFieldsC_DEATHS ] );
            
kDataRankindex ][ HS_KILLS ] = adv_vault_get_fieldvaultkFieldsC_HS_KILLS ] );
            
kDataRankindex ][ HS_DEATHS ] = adv_vault_get_fieldvaultkFields[C_HS_DEATHS ] );
            
kDataRankindex ][ KNIFE_KILLS ] = adv_vault_get_fieldvaultkFields[C_KNIFE_KILLS ] );
            
kDataRankindex ][ KNIFE_DEATHS ] = adv_vault_get_fieldvaultkFields[C_KNIFE_DEATHS ] );
            
kDataRankindex ][ SUICIDES ] = adv_vault_get_fieldvaultkFields[C_SUICIDES ] );
            
kDataRankindex ][ SPAWNS ] = adv_vault_get_fieldvaultkFields[C_SPAWNS ] );
            
kActivatedClanChatindex ] = adv_vault_get_fieldvaultkFieldsC_CLAN_CHAT ] );
        }
    }
    else
    {
        
copy(kPnameindex ], 31kPlayerNameindex ]);
        
adv_vault_set_startvault );
        
        
adv_vault_set_fieldvaultkFieldsC_MEMBERSHIP ], kClanMembershipindex ] );
        
adv_vault_set_fieldvaultkFieldsC_CLANNAME ], kClanNameindex ] );
        
adv_vault_set_fieldvaultkFieldsC_DATE ], kDateindex ]);
        
adv_vault_set_fieldvaultkFieldsC_PASS ], kPasswordindex ]);
        
adv_vault_set_fieldvaultkFieldsC_PNAME ], kPnameindex ]);
        
adv_vault_set_fieldvaultkFieldsC_KILLS ], kDataRankindex ][ KILLS ]);
        
adv_vault_set_fieldvaultkFieldsC_DEATHS ], kDataRankindex ][DEATHS]);
        
adv_vault_set_fieldvaultkFieldsC_HS_KILLS ], kDataRankindex ][ HS_KILLS ]);
        
adv_vault_set_fieldvaultkFieldsC_HS_DEATHS ], kDataRankindex ][ HS_DEATHS ]);
        
adv_vault_set_fieldvaultkFieldsC_KNIFE_KILLS ], kDataRankindex ][ KNIFE_KILLS ]);
        
adv_vault_set_fieldvaultkFieldsC_KNIFE_DEATHS], kDataRankindex ][ KNIFE_DEATHS ]);
        
adv_vault_set_fieldvaultkFieldsC_SUICIDES], kDataRankindex ][ SUICIDES ]);
        
adv_vault_set_fieldvaultkFieldsC_SPAWNS ], kDataRankindex ][ SPAWNS ]);
        
adv_vault_set_fieldvaultkFieldsC_CLAN_CHAT ], kActivatedClanChatindex ] );
        
        
adv_vault_set_endvault0kPlayerNameindex ] );
    }
}

public 
fm_ClientInfoChangedindexbuffer )
{
    if( 
flag_get(kBits[CONNECTED],index) ) 
    {
        if(
kStatusindex ] == LOGGUED)
        {
            static 
OldName[33];
            
            
engfunc(EngFunc_InfoKeyValuebuffer"name"OldNamesizeof OldName 1);
            
            if(
equal(OldNamekPlayerNameindex ])) 
                return 
FMRES_IGNORED;
            
            
set_user_infoindex"name"kPlayerNameindex ]);
            
client_cmdindex"setinfo ^"name^" ^"%s^""kPlayerNameindex ]);
        }
    }
    
    return 
FMRES_IGNORED;    
}

public 
ForceJoinTeamindex )
{
    static 
teammsg_blockteammsg_block_vguirestorevgui;
    
    
restore get_pdata_intindex510 );
    
vgui restore & (1<<0);
    
    if ( 
vgui set_pdata_intindex510restore & ~(1<<0) );
    
    
teammsg_block get_msg_blockkMsg[MSG_SHOWMENU] );
    
teammsg_block_vgui get_msg_blockkMsg[MSG_VGUI] );
    
    
set_msg_blockkMsg[MSG_SHOWMENU], BLOCK_ONCE );
    
set_msg_blockkMsg[MSG_VGUI], BLOCK_ONCE );
    
    
engclient_cmdindex"jointeam""5" );
    
engclient_cmdindex"joinclass""5" );
    
    
set_msg_blockkMsg[MSG_SHOWMENU], teammsg_block);
    
set_msg_blockkMsg[MSG_VGUI], teammsg_block_vgui);
    
    if (
vguiset_pdata_intindex510restore );
        
    
kStatusindex ] = LOGGUED;
    
    
set_task1.0"ShowHUD"index TASK_HUD__"b" );
}

public 
ShowHUDtaskid )
{
    static 
indexindex =  ID_HUD;
    
    if ( !
is_user_alive(index) )
    {
        
index pevindexpev_iuser2 );
        
        if ( !
flag_get(kBits[ALIVE],index))  return;
    }
    
    
    if( 
index != ID_HUD)
    {
        
set_hudmessage(2552002200.600.5006.01.10.00.0, -1);
        
ShowSyncHudMsg(indexhudSync"%s^nCLAN: %s || RANK: %s"
        
kPlayerNameindex ], kClanName[index][0]?kClanName[index]:"Sin Clan"Rangos[kRange[index]][RANGO_NAME] );
    }
    else
    {
        
set_hudmessage(025500.00.006.01.10.00.0, -1);
        
ShowSyncHudMsg(indexhudSync"RANK: %s^nCLAN: %s^nFRAGS: %d / %d"
        
RangoskRange[index] ][ RANGO_NAME ], kClanNameindex ][0]?kClanNameindex ]:"NO CLAN"kDataRankindex ][ KILLS ], RangoskRange[index] ][ RANGO_FRAGS ] );
    }
}

UpdateRangeindex )
{
    static 
rangerange kRangeindex ];
    
    while( 
kDataRankindex ][ KILLS ] >=RangoskRange[index] ][ RANGO_FRAGS ])
        ++
kRangeindex ];
        
    if(
kRangeindex ] > range )
        
Color_Printindex"CONGRATS, YOU'VE PASSED TO: !g%s"RangoskRange[index] ][RANGO_NAME]);
}

public 
get_membersnumindex )
{
    if( !
kClanNameindex ][ ]) return 0;
    
    static 
numkeyindexkeyname[32]; num 0;

    
adv_vault_find_startvaultkFieldsC_CLANNAME ], kClanNameindex ], FINDFLAGS_EQUAL );
    
    while((
keyindex adv_vault_find_nextvault )))
    {
        
adv_vault_get_keynamevaultkeyindexkeyname31 );
        ++
num;
    }
    
    
adv_vault_find_closedvault );
    
    if(!
num) return 0;
    
    return 
num;
}

CreateClanindex )
{
    if(!
flag_get(kBits[CONNECTED],index) ) return;
    
    
kClanMembershipindex ] = CLAN_OWNER;
    
    
DataManagementindexSAVE );
     
    
cmd_CLANindex );

__________________
Power is in the family

Last edited by GaBy96; 09-16-2020 at 12:29.
GaBy96 is offline
Send a message via Skype™ to GaBy96
Supremache
Veteran Member
Join Date: Sep 2019
Old 09-16-2020 , 16:19   Re: Clan Sytem tag off
Reply With Quote #2

Your Tag ??!!!!
Do you mean chat prefix ???

Code:
new const CHAT_PREFIX[ ] = "!g[ CLAN SYSTEM ]!n";

Last edited by Supremache; 09-16-2020 at 16:19.
Supremache is offline
GaBy96
Member
Join Date: Oct 2012
Location: Romania
Old 09-16-2020 , 23:47   Re: Clan Sytem tag off
Reply With Quote #3

No, when you make a clan you are tagged with the clan you are in and when you are not in the clan you have the tag (no clan) and I want to remove them because it affects all commands with /
__________________
Power is in the family
GaBy96 is offline
Send a message via Skype™ to GaBy96
Supremache
Veteran Member
Join Date: Sep 2019
Old 09-17-2020 , 12:29   Re: Clan Sytem tag off
Reply With Quote #4

Quote:
Originally Posted by GaBy96 View Post
No, when you make a clan you are tagged with the clan you are in and when you are not in the clan you have the tag (no clan) and I want to remove them because it affects all commands with /
Just disable those clcmd:
PHP Code:
register_clcmd"say""Block_Say" );
    
register_clcmd"say_team""Block_TeamSay" ); 
Supremache is offline
GaBy96
Member
Join Date: Oct 2012
Location: Romania
Old Yesterday , 10:59   Re: Clan Sytem tag off
Reply With Quote #5

shows me 2 times in chat with tag and once without
__________________
Power is in the family
GaBy96 is offline
Send a message via Skype™ to GaBy96
Reply


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


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