[CS:GO] !knife !ws !gloves Prevention

Post Reply
User avatar
Andreeas
Hero Member
Hero Member
Posts: 601
Joined: Wed Jan 22, 2020 8:17 pm
Jucator SA:MP ?: Nu
Nick:: Andreeas
Jucator CS ?: Nu

[CS:GO] !knife !ws !gloves Prevention

Post by Andreeas »

Description

Hey there. I run about 3 servers and constantly have people coming in and typing !knife. It annoys me because it's not in the title of my server they just assume it's there and don't realize Valve's set rules. In response to all this, I made a simple chat message plugin when people type !knife it says the phrase:

We do not have this plugin because it's against Valve's TOS. We are children of Jesus.


This plugin is specifically for CS:GO

P.S. I'm fairly new to making plugins so go easy on me. I usually only mess around with HTML.

Commands
sm_knife
Installation
Drag knife.sp into your scripting folder
Drag knife.smx into your plugins folder
Code

Code: Select all

#pragma semicolon 1 
#pragma newdecls required 

#include <sourcemod> 

 public Plugin myinfo =
{
    name = "Prevent !knife !ws !gloves",
    author = "Fig Newtons (Aaronpierce)",
    description = "Any player that executes commands: !knife !ws etc are greeted with a message saying those plugins aren't allowed.",
    version = "1.1",
    url = ""
};

public void OnPluginStart() 
{ 
    RegConsoleCmd("sm_knife", Command_Print);
    RegConsoleCmd("sm_ws", Command_Print);  
    RegConsoleCmd("sm_gloves", Command_Print);  
} 

public Action Command_Print(int client, int args) 
{
    if (IsClientInGame(client))
    {
        PrintToChat(client, "We do not have this plugin because it's against Valve's TOS. We are children of Jesus."); 
    }
    return Plugin_Handled; 
} 


Download
Source
Post Reply

Return to “General Purpose”