Raised This Month: $ Target: $400
 0% 

about kick "[16bpp]" problem


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-02-2009 , 01:16   about kick "[16bpp]" problem
Reply With Quote #1

yesterday, i wrote a code can kick the player name that add "[16bpp]" in front

the code:
PHP Code:
#include <amxmodx>
#include <amxmisc>
#define PLUGIN_NAME "16bpp_kick"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "K.K.Lv"
public plugin_init()
{
 
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR)
 
set_task(0.1"kick"___"b")
}
public 
kick()
{
 new 
players[32], pnum
 
new playersid
 get_players
(playerspnum)
 for (new 
0pnumi++)
 {
  new 
name[32]
  
playersid players[i]
  if (
is_user_connected(playersid))
  {
   
get_user_name(playersidname31)
   if(
contain(name"[16bpp]") != -1)
   {
    
server_cmd("kick #%d ^"For 16bpp^""get_user_userid(playersid))
   }
  }
 }
 return 
PLUGIN_CONTINUE

any problem here???
K.K.Lv is offline
Send a message via MSN to K.K.Lv
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 06-02-2009 , 01:23   Re: about kick "[16bpp]" problem
Reply With Quote #2

PHP Code:
#include <amxmodx>

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

public 
client_putinserver(id)
{
    new 
sz_nick[32]
    
get_user_name(idsz_nick31)

    if (
containi(sz_nick"[16bpp]"))
        
server_cmd("kick #%i For 16bpp"get_user_userid(id))


Last edited by TheRadiance; 06-02-2009 at 03:28.
TheRadiance is offline
Send a message via ICQ to TheRadiance
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-02-2009 , 01:47   Re: about kick "[16bpp]" problem
Reply With Quote #3

You can also try this :

PHP Code:
#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(idszName)
}

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

CheckPlayer(id, const szName[])
{
    if( 
containi(szName"[16bpp]") )
    {
        
server_cmd("kick #%d ^"For 16bpp^""get_user_userid(id))
    }

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 06-02-2009 at 01:53.
ConnorMcLeod is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-02-2009 , 02:32   Re: about kick "[16bpp]" problem
Reply With Quote #4

any body know the sXe Injected v7.8,
when a player who video settings are 16-bit has put in server
his name will changed like this:
"playername" ==> "[16bpp] playername"
so ,i want to kick "[16bpp]"
i'm sorry for my bad english!!
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 06-02-2009 , 02:36   Re: about kick "[16bpp]" problem
Reply With Quote #5

The Conditions:
1.player has put in server
2.add "[16bpp]" at the front of player name

result:
KICK!!
K.K.Lv is offline
Send a message via MSN to K.K.Lv
Old 06-02-2009, 03:29
TheRadiance
This message has been deleted by TheRadiance.
TheRadiance
Senior Member
Join Date: Nov 2007
Location: Kazakhstan
Old 06-02-2009 , 03:32   Re: about kick "[16bpp]" problem
Reply With Quote #6

Quote:
The Conditions:
1.player has put in server
2.add "[16bpp]" at the front of player name

result:
KICK!!
Posts #2 & #3.

offtop:
for scripters: is there any client command/amx method to detect which mode(16/32bpp) player is using?
TheRadiance is offline
Send a message via ICQ to TheRadiance
stupok
Veteran Member
Join Date: Feb 2006
Old 06-02-2009 , 05:20   Re: about kick "[16bpp]" problem
Reply With Quote #7

nope
__________________
stupok is offline
K.K.Lv
Veteran Member
Join Date: Aug 2008
Location: GameFolder
Old 06-02-2009 , 08:18   Re: about kick "[16bpp]" problem
Reply With Quote #8

Thanks all !!
The problem has been solved !!
K.K.Lv is offline
Send a message via MSN to K.K.Lv
soik
Member
Join Date: Dec 2007
Location: Hellcife
Old 04-15-2010 , 09:58   Re: about kick "[16bpp]" problem
Reply With Quote #9

KKLv, could you post you plugin?
soik is offline
Send a message via MSN to soik Send a message via Skype™ to soik
soik
Member
Join Date: Dec 2007
Location: Hellcife
Old 04-15-2010 , 13:04   Re: about kick "[16bpp]" problem
Reply With Quote #10

#2 and #3 were kicking everyone from the server, even who doesn't use 16bpp.
soik is offline
Send a message via MSN to soik Send a message via Skype™ to soik
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 23:23.


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