Raised This Month: $13 Target: $400
 3% 

[CS:GO][REQ]Awp NoScope !crosshair plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LittleShiT
Member
Join Date: Jan 2015
Old 03-30-2020 , 01:55   [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #1

Hi, I'm looking for a plugin that adds a cosshair when you type a command.

I've tried this one, but there's something wrong with translucency: https://forums.alliedmods.net/showthread.php?p=2583748

Help
LittleShiT is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 04-24-2020 , 04:06   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #2

Message me on discord : Pilo#8253
__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$
Pilo is offline
LittleShiT
Member
Join Date: Jan 2015
Old 05-11-2020 , 02:26   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #3

Pilo guy didn't solve my problem, still looking for it
LittleShiT is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 05-11-2020 , 04:05   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #4

You can create a hud with pos -1, -1 and + as a message.

PHP Code:


#include <sourcemod>

public void OnPluginStart()
{
    
CreateTimer(0.1Timer_Hud_TIMER_REPEAT);
}

public 
Action Timer_Hud(Handle timerany data)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i))
        {
            if (
IsPlayerAlive(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"+");
            }
        }
    }

This shows a "+" in the center of the screen whenever you have awp no scoped.
__________________

Last edited by Ilusion9; 05-11-2020 at 06:30.
Ilusion9 is offline
LittleShiT
Member
Join Date: Jan 2015
Old 05-12-2020 , 23:45   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #5

Quote:
Originally Posted by Ilusion9 View Post
You can create a hud with pos -1, -1 and + as a message.

PHP Code:


#include <sourcemod>

public void OnPluginStart()
{
    
CreateTimer(0.1Timer_Hud_TIMER_REPEAT);
}

public 
Action Timer_Hud(Handle timerany data)
{
    for (
int i 1<= MaxClientsi++)
    {
        if (
IsClientInGame(i))
        {
            if (
IsPlayerAlive(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"+");
            }
        }
    }

This shows a "+" in the center of the screen whenever you have awp no scoped.
Thank you for the reply, it really works, but it's a little bit off center.
Also, can you add a command to turn it on/off ?
LittleShiT is offline
Pilo
AlliedModders Donor
Join Date: Jan 2019
Location: Israel
Old 05-13-2020 , 04:18   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #6

Quote:
Originally Posted by LittleShiT View Post
Thank you for the reply, it really works, but it's a little bit off center.
Also, can you add a command to turn it on/off ?

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"+");
            }
        }
    }

__________________

Taking Private(PAID) Plugins In PM
Feel free to Donate with PayPal
Feel free to message me in Discord Pilo#8253
Total donated : 25$

Last edited by Pilo; 05-13-2020 at 04:19.
Pilo is offline
Sandervraun
Senior Member
Join Date: May 2019
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
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 05-25-2020 , 05:41   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #8

SetHudTextParams(-1.0, -1.0, 0.15, 255, 255, 255, 1, 0, 0.0, 0.0, 0.0);

first 3 (from bold text) are rgb colors, and last is alpha.
the crosshair is just hud with '+' character, maybe you can find another character.
__________________

Last edited by Ilusion9; 05-25-2020 at 05:41.
Ilusion9 is offline
LittleShiT
Member
Join Date: Jan 2015
Old 06-04-2020 , 15:29   Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
Reply With Quote #9

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"+");
            }
        }
    }

Thank you <3
LittleShiT is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:01.


Powered by vBulletin®
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Theme made by Freecode