Raised This Month: $ Target: $400
 0% 

16 bit not give kick :|


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jellytin
Junior Member
Join Date: May 2011
Old 05-13-2011 , 09:20   16 bit not give kick :|
Reply With Quote #1

Quote:
#include <amxmodx>
#include <fakemeta>

public plugin_init()
{
register_plugin("[16bpp]", "1.0", "K.K.Lv")

register_forward(FM_ClientConnect, "ClientConnect", 1)
register_forward(FM_SetClientKeyValue, "SetClientKeyValue", 1)
}

public
ClientConnect(id, const szName[])
{
CheckPlayer(id, szName)
}

public
SetClientKeyValue(id, InfoBuffer, szKey[], szValue[])
{
if(
equal(szKey, "name") )
{
CheckPlayer(id, szValue)
}
}

CheckPlayer(id, const szName[])
{
if(
containi(szName, "[16bpp]") != -1 )
{
server_cmd("kick #%d ^"For 16bpp^"", get_user_userid(id))
}
}
what do plz help
jellytin is offline
SonicSonedit
Veteran Member
Join Date: Nov 2008
Location: Silent Hill
Old 05-13-2011 , 12:14   Re: 16 bit not give kick :|
Reply With Quote #2

add
PHP Code:
server_exec() 
after
PHP Code:
server_cmd("kick #%d ^"For 16bpp^""get_user_userid(id)) 
Also I'm not sure that FM's clientconnect passes player name after id.
__________________


Last edited by SonicSonedit; 05-13-2011 at 12:16.
SonicSonedit is offline
jellytin
Junior Member
Join Date: May 2011
Old 05-13-2011 , 13:35   Re: 16 bit not give kick :|
Reply With Quote #3

plz help :O fix this plugin i need 2 this is give kick who play witch 16 bit from my server ty.

Last edited by jellytin; 05-13-2011 at 13:44.
jellytin is offline
biscuit628
Senior Member
Join Date: Jun 2007
Location: 香港HongKong
Old 05-13-2011 , 17:05   Re: 16 bit not give kick :|
Reply With Quote #4

PHP Code:
#include <amxmodx>

public plugin_init()
{
    
register_plugin("Kick 16bpp name""1.0""Biscuit")
}

public 
client_putintserver(id)
{
    if(
is_user_connected(id))
    {
        static 
name[33]
        
get_user_name(id,name,32)
        
        if( 
containi(name"[16bpp]") != -)
        {
            
server_cmd("kick #%d ^"For 16bpp^""get_user_userid(id))
        }
    }

try this
__________________
My Plugins

C4man with fun

Sniper Skill bonus
-------------------------
Sorry for my poor English!

Last edited by biscuit628; 05-14-2011 at 15:08.
biscuit628 is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 05-13-2011 , 21:21   Re: 16 bit not give kick :|
Reply With Quote #5

OMG, this connor's code !
IMO, check player name when player put in server, and client info changed !
I think that is enough !

edited:un-test!
Code:
#include <amxmodx>
 
#define PLUGIN_NAME        "Kick 16-bit"
#define PLUGIN_VERSION        "1.0"
#define PLUGIN_AUTHOR        "K.K.Lv"
 
public plugin_init()
{
        register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
}
 
public client_putinserver(id)
{
        if (!is_user_connected(id))
                return;
        static szName[32];
        get_user_name(id, szName, charsmax(szName));
 
        if (contain(szName, "[16bpp]") != -1) {
                server_cmd("kick #%d ^"for 16-bit set^"", get_user_userid(id));
       }
}
 
public client_infochanged(id)
{
        if (!is_user_connected(id))
                return ;
 
        static szNewName[32], szOldName[32];
 
        get_user_name(id, szOldName, charsmax(szOldName));
        get_user_info(id, "name", szNewName, charsmax(szNewName));
 
        if (!equal(szNewName, szOldName)) {
                if (contain(szNewName, "[16bpp]") != -1) {
                        server_cmd("kick #%d ^"for 16-bit set^"", get_user_userid(id));
                }
        }
}
__________________
QQ:116268742

Last edited by K.K.Lv; 05-13-2011 at 22:26.
K.K.Lv is offline
Send a message via MSN to K.K.Lv
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 05-13-2011 , 21:25   Re: 16 bit not give kick :|
Reply With Quote #6

Quote:
Also I'm not sure that FM's clientconnect passes player name after id.
FM_ClientConnect, // bool ) (ent, const szName[], const szAddress[], const szRejectReason[128])
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
jellytin
Junior Member
Join Date: May 2011
Old 05-14-2011 , 03:13   Re: 16 bit not give kick :|
Reply With Quote #7

Quote:
Originally Posted by K.K.Lv View Post
OMG, this connor's code !
IMO, check player name when player put in server, and client info changed !
I think that is enough !

edited:un-test!
Quote:
Originally Posted by K.K.Lv View Post

Code:
#include <amxmodx>
 
#define PLUGIN_NAME        "Kick 16-bit"
#define PLUGIN_VERSION        "1.0"
#define PLUGIN_AUTHOR        "K.K.Lv"
 
public plugin_init()
{
        register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
}
 
public client_putinserver(id)
{
        if (!is_user_connected(id))
                return;
        static szName[32];
        get_user_name(id, szName, charsmax(szName));
 
        if (contain(szName, "[16bpp]") != -1) {
                server_cmd("kick #%d ^"for 16-bit set^"", get_user_userid(id));
       }
}
 
public client_infochanged(id)
{
        if (!is_user_connected(id))
                return ;
 
        static szNewName[32], szOldName[32];
 
        get_user_name(id, szOldName, charsmax(szOldName));
        get_user_info(id, "name", szNewName, charsmax(szNewName));
 
        if (!equal(szNewName, szOldName)) {
                if (contain(szNewName, "[16bpp]") != -1) {
                        server_cmd("kick #%d ^"for 16-bit set^"", get_user_userid(id));
                }
        }
}


this give kick when i change in server for 16 bit i need when player come to my serve and the mode give him kick because he use 16 bit

jellytin is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-14-2011 , 03:16   Re: 16 bit not give kick :|
Reply With Quote #8

Which program is adding [16bpp] to players names ?
If you hope that those plugins will kick 16bit players without any external program, you are wrong, and if you run any of those external programs, aren't those programs capable to force players to use 32bits ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 05-14-2011 , 04:21   Re: 16 bit not give kick :|
Reply With Quote #9

Quote:
Originally Posted by ConnorMcLeod View Post
Which program is adding [16bpp] to players names ?
the sXe will check your video setting !
will adding "[16bpp]" to player's name when check the video setting is 16-bit !
__________________
QQ:116268742
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Reply



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


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