View Single Post
hkkelvin1995
Senior Member
Join Date: Jun 2009
Location: Hong Kong
Old 03-11-2020 , 17:56   Re: Can't block kill/explode in TF2
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
Try this, maybe they use third command.
PHP Code:
public void OnPluginStart()
{
    
AddCommandListener(listener"kill");
    
AddCommandListener(listener"explode");
    
AddCommandListener(listener"hurtme");
}

public 
Action listener(int client, const char[] commandint argc)
{
    if(
client == || !IsClientInGame(client) || IsFakeClient(client) || !IsPlayerAlive(client))
        return 
Plugin_Continue;


    
PrintToChat(client"\x01\x04[SM] \x01Command '%s' is disabled from server"command);

    return 
Plugin_Handled;

Thanks for you help, but I can still kill myself by typing in 'kill' or 'explode' on a non-admin account. Even Freak Fortress 2's built-in kill blocker doesn't work as well, I even tried to unload the entire FF2 plugins and only have mine(with what you gave me above) loaded but it still couldn't block the 'kill' and 'explode' command. There is no any error message in the console, this really drives me crazy.
__________________
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
hkkelvin1995 is offline