#pragma semicolon 1
#pragma tabsize 0
#include <sourcemod>
#include <sdktools>
public Plugin:myinfo =
{
name = "No Scope",
author = "",
description = "No Scoping Plugin",
version = "0.1b",
url = ""
};
public OnPluginStart()
{
CreateConVar("sm_noscope_version", "0.1b", "No Scope Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY|FCVAR_DONTRECORD);
}
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
static iPrevButtons[66];
if (buttons & 2048)
{
new active_weapon = GetEntPropEnt(client, PropType:0, "m_hActiveWeapon", 0);
if (active_weapon != -1)
{
new String:g_szWeapon[32];
GetEdictClassname(active_weapon, g_szWeapon, 32);
if (StrEqual(g_szWeapon, "weapon_awp", false))
{
buttons = buttons & -2049;
}
if (StrEqual(g_szWeapon, "weapon_scout", false))
{
buttons = buttons & -2049;
}
if (StrEqual(g_szWeapon, "weapon_sg550", false))
{
buttons = buttons & -2049;
}
if (StrEqual(g_szWeapon, "weapon_g3sg1", false))
{
buttons = buttons & -2049;
}
PrintHintText(client, "Без зума");
}
}
iPrevButtons[client] = buttons;
return Plugin_Continue;
}