Thread: [Solved] add admin immunity
View Single Post
Author Message
generals
Senior Member
Join Date: Aug 2018
Old 12-08-2019 , 04:28   add admin immunity
Reply With Quote #1

hi guys

somebody can help me to add admin and spec immunity to this plugin with cvar?

cvars:
admin_immunity 0-1
spec_immunity 0-1

PHP Code:
#include <sourcemod>
#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent"player_disconnect"Event_DisconnectEventHookMode_Pre);
}

public 
Action Event_Disconnect(Event event, const char[] namebool dbc)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));

    
BanClient(client1440BANFLAG_AUTO"Ban");

Edit:

Solevd

Last edited by generals; 12-08-2019 at 05:24.
generals is offline