AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Solved add admin immunity (https://forums.alliedmods.net/showthread.php?t=320176)

generals 12-08-2019 04:28

add admin immunity
 
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


All times are GMT -4. The time now is 15:09.

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