PDA

View Full Version : Kick clients have ping: ZMBI



maxdamage99
18th November 2015, 14:14
How kick clients-bots (no show for SCORE-MENU) have ping: ZMBI (status)?
Ty)

Ni3ls
18th November 2015, 15:02
free_slot(<clientnum>)
Module: libcod

Summary:
Sets the client's state to CS_FREE (only works for bots).


Required Args:
1 : <clientnum> The bot's client number.

maxdamage99
18th November 2015, 16:28
CAPTAIN OBVIOUS? :)
I dont know GetEntityNumber() bots.
I want to iterate over the array players and kick bots where ping: ZMBI
p.s if(players[i] getping()... no job(

IzNoGoD
18th November 2015, 16:48
then kick the damn bots BEFORE changing map...

maxdamage99
18th November 2015, 17:04
Izno, I did so)

kung foo man
19th November 2015, 03:01
Mitch added if (player getAddressType() == 0): http://killtube.org/showthread.php?1996-Renaming-bots&p=10374&viewfull=1#post10374

Probably if (player getClientState() == 1) would work too:



typedef enum {
0 = CS_FREE, // can be reused for a new connection
1 = CS_ZOMBIE, // client has been disconnected, but don't reuse connection for a couple seconds
2 = CS_CONNECTED, // has been assigned to a client_t, but no gamestate yet
3 = CS_PRIMED, // gamestate has been sent, but client hasn't sent a usercmd
4 = CS_ACTIVE // client is fully in game
} clientState_t;

IzNoGoD
19th November 2015, 04:43
Doesnt work, zmbi players arent script ents. Would require getaddresstype to take a slot number as argument

maxdamage99
6th December 2015, 10:42
I wanted to do well, but the game does not see these players :( and the place they occupy! :( :( :( :( :(
I did EndMap () array bulkhead and the exclusion of certain parameters of the players!

IzNoGoD
6th December 2015, 11:51
Izno, I did so)

Did you also free_slot() before ending the map?
Remember to save the entnum of the bot BEFORE kicking, then free_slot with that entnum afterwards.

maxdamage99
6th December 2015, 16:54
Yes, I did, but occasionally writes to me that something like this:
From terminal server:


Client 2 is not player.

Ni3ls
6th December 2015, 18:16
Show your code

maxdamage99
6th December 2015, 19:48
EndMap()
{
kickbots();
/*
....
*/
}
kickbots() //call in EndMap
{
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
player=players[i];
if((player.name=="^9nL^4.^2[^7Anti-Cheat^2]" || player.name=="^9nL^4.^2[^7Control-Chat^2]") && player.boty)
{
getid = player getEntityNumber();
kick(getid);
free_slot(getid);
}
}
}

IzNoGoD
6th December 2015, 21:37
Even your || && is shitty. It will kick ANY player with anti-cheat name, not just the bots.

maxdamage99
6th December 2015, 21:43
Connect()
{
self.boty=false;
}

addbots()
{
bot.boty=true;
}

Maybe make


if(self getPing()=="999")