View Single Post
Author Message
hkkelvin1995
Senior Member
Join Date: Jun 2009
Location: Hong Kong
Old 03-10-2020 , 23:52   Can't block kill/explode in TF2
Reply With Quote #1

Is it not possible to block suicide command like 'kill' and 'explode' anymore?
I have written a small plugin like the following:
Code:
public OnPluginStart() 
{
    AddCommandListener(Cmd_Kill, "kill");
    AddCommandListener(Cmd_Explode, "explode");
}

public Action Cmd_Kill(int client, const char[] command, int args)
{
    PrintToChatAll("You're not allowed to suicide");
    return Plugin_Handled;
}

public Action Cmd_Explode(int client, const char[] command, int args)
{
    PrintToChatAll("You're not allowed to suicide");
    return Plugin_Handled;
}
EDIT: Update or Remove old version of https://forums.alliedmods.net/showthread.php?p=2217736, then solved.
__________________
Founder of Reachhl2.com from Hong Kong 🇭🇰
10+ years experience in hosting SCRDS
Best known for our VSH/FF2 server with self-made Bosses, Features, Maps

Last edited by hkkelvin1995; 03-11-2020 at 19:01. Reason: Solved, Old Bumper Car plugin also intercepts kill/explode command
hkkelvin1995 is offline