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

Give bots immunity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 12-03-2016 , 20:39   Give bots immunity
Reply With Quote #1

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.
__________________
sneaK is offline
Phire
Junior Member
Join Date: May 2016
Location: Scotland, United Kingdom
Old 12-03-2016 , 23:59   Re: Give bots immunity
Reply With Quote #2

Quote:
Originally Posted by blackhawk74 View Post
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
    
}


Last edited by Phire; 12-04-2016 at 00:09.
Phire is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 12-04-2016 , 18:23   Re: Give bots immunity
Reply With Quote #3

Quote:
Originally Posted by Phire View Post
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.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 12-04-2016 , 18:32   Re: Give bots immunity
Reply With Quote #4

Quote:
Originally Posted by Phire View Post
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!
__________________
sneaK is offline
Reply


Thread Tools
Display Modes

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:43.


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