View Single Post
Sandervraun
Senior Member
Join Date: May 2019
Location: Denmark
Old 05-24-2020 , 23:16   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #7

Quote:
Originally Posted by Pilo View Post
PHP Code:
#include <sourcemod>

#define PREFIX "[SM]"
bool g_bEnabled[MAXPLAYERS 1] = false;

public 
void OnPluginStart()
{
    
RegConsoleCmd("sm_crosshair"Command_Crosshair);

    
CreateTimer(0.1Timer_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 clientint args)
{
    if (
IsClientInGame(client) && !IsFakeClient(client))
    {
        
g_bEnabled[client] = !g_bEnabled[client];
        
PrintToChat(client"%s You %s\x01 crosshair!"PREFIXg_bEnabled[client] ? "\x04Enabled":"\x02Disabled");
    }
    return 
Plugin_Handled;
}

public 
Action Timer_Hud(Handle timerany data)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i) && !IsFakeClient(i))
        {
            if (
IsPlayerAlive(i) && g_bEnabled[i])
            {
                
int currentWeapon GetEntPropEnt(iProp_Send"m_hActiveWeapon");
                if (
currentWeapon == -1)
                {
                    
SetHudTextParams(-1.0, -1.00.15255255255100.00.00.0);
                    
ShowHudText(i2"");
                    continue;
                }
                
                
int itemIndex GetEntProp(currentWeaponProp_Send"m_iItemDefinitionIndex");
                if (
itemIndex != 9// weapon awp
                
{
                    
SetHudTextParams(-1.0, -1.00.15255255255100.00.00.0);
                    
ShowHudText(i2"");
                    continue;
                }
                
                
int fov GetEntProp(iProp_Data"m_iFOV");
                if (
fov && fov GetEntProp(iProp_Data"m_iDefaultFOV"))
                {
                    
SetHudTextParams(-1.0, -1.00.15255255255100.00.00.0);
                    
ShowHudText(i2"");
                    continue;
                }
                
                
SetHudTextParams(-1.0, -1.00.15255255255100.00.00.0);
                
ShowHudText(i2"+");
            }
        }
    }

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?
Sandervraun is offline