Raised This Month: $ Target: $400
 0% 

Admin Anti Kick Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Puppetmaster
Senior Member
Join Date: Jun 2015
Location: Probably at a computer.
Old 06-15-2015 , 23:49   Re: Admin Anti Kick Plugin
Reply With Quote #1

If you disable the ingame autokick something like this might work depending on the game:

Code:
#include <dbi>
#include <sourcemod> 
#include <cstrike>
#include <clientprefs>
#include <sdktools>


public Plugin:myinfo =
{
    name = "DontKickAdmins",
    author = "Puppetmaster",
    description = "Controls the kicking of admins",
    version = "0.0.0",
    url = "http://gamingzone.ddns.net/"
};

public OnPluginStart()
{
    HookEvent("player_death", Event_PlayerDeath, EventHookMode_Pre);
}



public Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{    


    if ( GetClientTeam(GetClientOfUserId(GetEventInt(event, "userid"))) == GetClientTeam(GetClientOfUserId(GetEventInt(event, "attacker"))) && GetUserAdmin(GetEventInt(event, "attacker")) == INVALID_ADMIN_ID)
    {
        KickClientEx(GetClientOfUserId(GetEventInt(event, "attacker")), "Goodbye");
    }
    return Plugin_Continue;
}
In counterstrike this will kick players that kill a team mate and are not admins.

Last edited by Puppetmaster; 06-17-2015 at 18:08. Reason: Corrections
Puppetmaster 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 04:35.


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