AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [CS:GO][REQ]Awp NoScope !crosshair plugin (https://forums.alliedmods.net/showthread.php?t=322558)

LittleShiT 03-30-2020 01:55

[CS:GO][REQ]Awp NoScope !crosshair plugin
 
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 :(

Pilo 04-24-2020 04:06

Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
 
Message me on discord : Pilo#8253

LittleShiT 05-11-2020 02:26

Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
 
Pilo guy didn't solve my problem, still looking for it

Ilusion9 05-11-2020 04:05

Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
 
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.

LittleShiT 05-12-2020 23:45

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

Originally Posted by Ilusion9 (Post 2699416)
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 ?

Pilo 05-13-2020 04:18

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

Originally Posted by LittleShiT (Post 2699851)
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"+");
            }
        }
    }



Sandervraun 05-24-2020 23:16

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

Originally Posted by Pilo (Post 2699873)
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?

Ilusion9 05-25-2020 05:41

Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
 
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.

LittleShiT 06-04-2020 15:29

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

Originally Posted by Pilo (Post 2699873)
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

will_rock 02-10-2021 15:22

Re: [CS:GO][REQ]Awp NoScope !crosshair plugin
 
@Pilo, pls made for Counter-Strike Source


All times are GMT -4. The time now is 06:10.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.