Raised This Month: $ Target: $400
 0% 

Register System V9.0 by m0skVi4a ;]


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
NsaGcl
Junior Member
Join Date: Aug 2016
Location: Concepcion, Chile
Old 12-29-2016 , 14:13   Re: Register System V9.0 by m0skVi4a ;]
Reply With Quote #11

In KickFunction not exist a preventive bot kicker, so i edited this for prevent bot kick

PHP Code:
/*==============================================================================
    Start of Kick Player function
================================================================================*/
public KickPlayer(parameters[])
{
    new 
id parameters[0]
    new 
reason parameters[1]

    if(!
is_user_connecting(id) && !is_user_connected(id) && !is_user_bot(id))
        return 
PLUGIN_HANDLED

    
new userid get_user_userid(id)

    switch(
reason)
    {
        case 
1:
        {
            if(
is_registered[id] || is_user_bot(id))
                return 
PLUGIN_HANDLED

            console_print
(id"%L"LANG_SERVER"KICK_INFO")
            
server_cmd("kick #%i ^"%L^""useridLANG_PLAYER"KICK_REG")
        }
        case 
2:
        {
            if(
is_logged[id] || is_user_bot(id))
                return 
PLUGIN_HANDLED

            console_print
(id"%L"LANG_SERVER"KICK_INFO")
            
server_cmd("kick #%i ^"%L^""useridLANG_PLAYER"KICK_LOGIN")
        }
        case 
3:
        {
            if(
TrieGetCell(g_cant_login_timeg_client_data[id], value))
            {
                
console_print(id"%L"LANG_SERVER"KICK_INFO")

                if(!
value)
                {
                    
server_cmd("kick #%i ^"%s^""useridLANG_PLAYER"KICK_ATMP_MAP"get_pcvar_num(g_attempts))
                }
                else
                {
                    new 
cal_time get_pcvar_num(g_time) - (time() - value)
                    
server_cmd("kick #%i ^"%s^""useridLANG_PLAYER"KICK_ATMP_TIME"get_pcvar_num(g_attempts), cal_time)
                }
            }
        }
        case 
4:
        {
            
console_print(id"%L"LANG_SERVER"KICK_INFO")
            
server_cmd("kick #%i ^"%L^""useridLANG_SERVER"KICK_LOGOUT")
        }
    }
    return 
PLUGIN_CONTINUE
}
/*==============================================================================
    End of Kick Player function
================================================================================*/ 
__________________
Just learning
NsaGcl is offline
 



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


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