Senior Member
Join Date: May 2019
Location: Denmark
|
05-24-2020
, 23:16
Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
|
#7
|
Quote:
Originally Posted by Pilo
PHP Code:
#include <sourcemod>
#define PREFIX "[SM]"
bool g_bEnabled[MAXPLAYERS + 1] = false;
public void OnPluginStart()
{
RegConsoleCmd("sm_crosshair", Command_Crosshair);
CreateTimer(0.1, Timer_Hud, _, TIMER_REPEAT);
}
public void OnClientPostAdminCheck(int client)
{
g_bEnabled[client] = false;
}
public void OnClientDisconnect(int client)
{
g_bEnabled[client] = false;
}
public Action Command_Crosshair(int client, int args)
{
if (IsClientInGame(client) && !IsFakeClient(client))
{
g_bEnabled[client] = !g_bEnabled[client];
PrintToChat(client, "%s You %s\x01 crosshair!", PREFIX, g_bEnabled[client] ? "\x04Enabled":"\x02Disabled");
}
return Plugin_Handled;
}
public Action Timer_Hud(Handle timer, any data)
{
for (int i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i) && !IsFakeClient(i))
{
if (IsPlayerAlive(i) && g_bEnabled[i])
{
int currentWeapon = GetEntPropEnt(i, Prop_Send, "m_hActiveWeapon");
if (currentWeapon == -1)
{
SetHudTextParams(-1.0, -1.0, 0.15, 255, 255, 255, 1, 0, 0.0, 0.0, 0.0);
ShowHudText(i, 2, "");
continue;
}
int itemIndex = GetEntProp(currentWeapon, Prop_Send, "m_iItemDefinitionIndex");
if (itemIndex != 9) // weapon awp
{
SetHudTextParams(-1.0, -1.0, 0.15, 255, 255, 255, 1, 0, 0.0, 0.0, 0.0);
ShowHudText(i, 2, "");
continue;
}
int fov = GetEntProp(i, Prop_Data, "m_iFOV");
if (fov > 0 && fov < GetEntProp(i, Prop_Data, "m_iDefaultFOV"))
{
SetHudTextParams(-1.0, -1.0, 0.15, 255, 255, 255, 1, 0, 0.0, 0.0, 0.0);
ShowHudText(i, 2, "");
continue;
}
SetHudTextParams(-1.0, -1.0, 0.15, 255, 255, 255, 1, 0, 0.0, 0.0, 0.0);
ShowHudText(i, 2, "+");
}
}
}
}
|
Really nice plugin, How do I adjust the thickness of the scope? also the scope is nice, but it's too thick..
Also how do I adjust the translucent of it?
|
|