Raised This Month: $51 Target: $400
 12% 

Kick bot


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Alexmy
Senior Member
Join Date: Oct 2014
Location: Russian Federation
Old 02-25-2017 , 11:01   Kick bot
Reply With Quote #1

Hello, help to solve this problem, you can't kick of the second tank on the server, so that left one tank.
Sorry for bad English.
PHP Code:
public void EventTankSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event,"userid"));
    
SetEntityHealth(clientg_iTankHP);
    {
        for (
int i 1<= 2i++)
        {
            new 
String:class[100];
            
GetClientModel(i, class, sizeof(class));
            if (
GetClientTeam(i)==&& IsFakeClient(i) && (StrContains(class, "hulk"false) == -1))
            {
                
KickClient(i);
            }
        }
    }

Alexmy is offline
sdz
Senior Member
Join Date: Feb 2012
Old 02-25-2017 , 13:46   Re: Kick bot
Reply With Quote #2

PHP Code:
public void EventTankSpawn(Event event, const char[] namebool dontBroadcast)
{
    
int client GetClientOfUserId(GetEventInt(event,"userid"));
    
SetEntityHealth(clientg_iTankHP);
    {
        for (
int i 1<= MaxClientsi++)
        {
            new 
String:class[100];
            
GetClientModel(i, class, sizeof(class));
            if (
GetClientTeam(i)==&& IsFakeClient(i) && (StrContains(class, "hulk"false) == -1))
            {
                
KickClient(i);
            }
        }
    }

MaxClients not 2, you'll want to check all clients in the server
sdz is offline
xerox8521
Senior Member
Join Date: Sep 2011
Old 02-25-2017 , 19:22   Re: Kick bot
Reply With Quote #3

Also instead of using GetClientModel and checking for the string "hulk" you should just use the m_zombieClass net prop (Prop_Send) for the value 8 which is the tank class.
xerox8521 is offline
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 09:37.


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