AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   General (https://forums.alliedmods.net/forumdisplay.php?f=58)
-   -   Give bots immunity (https://forums.alliedmods.net/showthread.php?t=291191)

sneaK 12-03-2016 20:39

Give bots immunity
 
Is there any way to give bots immunity with SM? I'm trying to avoid them from being able to get kicked by admins, but still able to be punted when I wish to disable them altogether.

Phire 12-03-2016 23:59

Re: Give bots immunity
 
Quote:

Originally Posted by blackhawk74 (Post 2474947)
Is there any way to give bots immunity with SM? I'm trying to avoid them from being able to get kicked by admins, but still able to be punted when I wish to disable them altogether.

Honestly, I'm not too sure but couldn't you just tell the admins to refrain from kicking the bots?

This is untested but it might work.

PHP Code:

public void OnClientPostAdminCheck(int client)
{
    if(
IsFakeClient(client)) // If the client is fake (bot)
    
{
        
SetAdminImmunityLevel(client60); //60 being the immunity level
    
}



Powerlord 12-04-2016 18:23

Re: Give bots immunity
 
Quote:

Originally Posted by Phire (Post 2474964)
Honestly, I'm not too sure but couldn't you just tell the admins to refrain from kicking the bots?

This is untested but it might work.

PHP Code:

public void OnClientPostAdminCheck(int client)
{
    if(
IsFakeClient(client)) // If the client is fake (bot)
    
{
        
SetAdminImmunityLevel(client60); //60 being the immunity level
    
}



You'd probably want OnClientPostAdminFilter instead so it applies before other plugins do OnClientPostAdminCheck.

Then again, it probably doesn't matter for this.

sneaK 12-04-2016 18:32

Re: Give bots immunity
 
Quote:

Originally Posted by Phire (Post 2474964)
Honestly, I'm not too sure but couldn't you just tell the admins to refrain from kicking the bots?

This is untested but it might work.

PHP Code:

public void OnClientPostAdminCheck(int client)
{
    if(
IsFakeClient(client)) // If the client is fake (bot)
    
{
        
SetAdminImmunityLevel(client60); //60 being the immunity level
    
}



Long story short, I'm using cksurf and sometimes the replay bots stop working, so there's a few things we try to get them back to work, although at times some steps aren't necessary. A bit confusing but at some points I'd like them to be able to be kicked by a server config that admins can execute.

I'll try this out along with Powerlord's suggestion, thank you both!


All times are GMT -4. The time now is 23:01.

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