Raised This Month: $ Target: $400
 0% 

Prevent HLTV to get kicked


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
muffin89
Member
Join Date: Aug 2009
Old 06-01-2011 , 05:43   Prevent HLTV to get kicked
Reply With Quote #1

Hello,

Ive googled and i didnt find any plugin that could prevent HLTV from getting votekicked or kicked by admins.

It might be some plugin out there i missed, in that case please fill me in.

Else i would very much appriciate if somone could make a plugin for this.
muffin89 is offline
ecca
Sexy Santa
Join Date: Jan 2011
Old 06-01-2011 , 08:15   Re: Prevent HLTV to get kicked
Reply With Quote #2

Well not sure but try edit the standard kick plugin and put these lines somewhere. I think it would be on preform kick

new String:steamid[64];
GetClientAuthString(target, steamid, sizeof(steamid));
if ((StrEqual(steamid, "STEAM_ID_SERVER"))
return Plugin_Handled;
__________________

Last edited by ecca; 06-01-2011 at 08:18.
ecca is offline
muffin89
Member
Join Date: Aug 2009
Old 06-01-2011 , 08:31   Re: Prevent HLTV to get kicked
Reply With Quote #3

Quote:
Originally Posted by ecca View Post
Well not sure but try edit the standard kick plugin and put these lines somewhere. I think it would be on preform kick

new String:steamid[64];
GetClientAuthString(target, steamid, sizeof(steamid));
if ((StrEqual(steamid, "STEAM_ID_SERVER"))
return Plugin_Handled;
Would very much appriciate if you could post the original plugin with this fix

And ill test it
muffin89 is offline
ecca
Sexy Santa
Join Date: Jan 2011
Old 06-01-2011 , 11:55   Re: Prevent HLTV to get kicked
Reply With Quote #4

Well it didnt work my that solution. But try search logg who kicked out the sourcetv and give him an warning. But im trying to come on a solution to prevent it
__________________
ecca is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 06-01-2011 , 13:09   Re: Prevent HLTV to get kicked
Reply With Quote #5

A solution to prevent it would be to rewrite the kick/ban modules so that they cannot target bots (using IsFakeClient)... something like this:

Code:
if (IsFakeClient(target))
    return Plugin_Handled;
(or return Plugin_Continue;)

This would also prevent other bots from being kicked/votekicked, which would only be a problem if you were trying to kick a bot so someone could switch teams.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
psychonic

BAFFLED
Join Date: May 2008
Old 06-01-2011 , 17:34   Re: Prevent HLTV to get kicked
Reply With Quote #6

You don't need to edit anything. You can give it immunity with a separate plugin.

Code:
#include <sourcemod> new SourceTV = -1; new Replay = -1; #define IMMUNITY_LEVEL 98 /*  * No late-load support since names can be changed,  * and no other id is exposed to SM  */ public OnClientConnected(client) {     if (!IsFakeClient(client))         return;         decl String:name[MAX_NAME_LENGTH];     GetClientName(client, name, sizeof(name));         // this will always be name at the time of initial connect.     // if using tv_name or later var for replay name, it renames later in frame     if (!strcmp(name, "SourceTV"))         SourceTV = client;     else if (!strcmp(name, "Replay"))         Replay = client; } public Action:OnClientPreAdminCheck(client) {     if (client == SourceTV)     {         SetImmunity(client, "SourceTV");         return Plugin_Handled;     }     else if (client == Replay)     {         SetImmunity(client, "Replay");         return Plugin_Handled;     }         return Plugin_Continue;     } public OnClientDisconnect(client) {     if (client == SourceTV)         SourceTV = -1;     else if (client == Replay)         Replay = -1; } SetImmunity(client, const String:name[]) {     new AdminId:admin = CreateAdmin(name);     SetAdminImmunityLevel(admin, IMMUNITY_LEVEL);     SetUserAdmin(client, admin); }
psychonic is offline
muffin89
Member
Join Date: Aug 2009
Old 06-03-2011 , 03:34   Re: Prevent HLTV to get kicked
Reply With Quote #7

Thanks psychonic, ill try this later today and ill post the results.
muffin89 is offline
away000
Veteran Member
Join Date: Sep 2010
Old 06-04-2011 , 00:06   Re: Prevent HLTV to get kicked
Reply With Quote #8

always psychonic saving brains º.°
away000 is offline
muffin89
Member
Join Date: Aug 2009
Old 06-07-2011 , 01:09   Re: Prevent HLTV to get kicked
Reply With Quote #9

And it works like a charm. Thanks again =)!
muffin89 is offline
DarthNinja
SourceMod Plugin Approver
Join Date: Mar 2009
Location: PreThinkHook()
Old 06-07-2011 , 13:19   Re: Prevent HLTV to get kicked
Reply With Quote #10

For anyone reading this later on:
https://forums.alliedmods.net/showthread.php?t=157485

Provides immunity and custom (re)naming for SourceTV and Replay bots.
__________________
DarthNinja 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 10:26.


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