Raised This Month: $51 Target: $400
 12% 

Noscope and distance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
FreezerPT
Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
Old 03-31-2020 , 18:10   Noscope and distance
Reply With Quote #1

Hello, guys I am looking for a noscope plugin that says how much distance the noscope was! I didnt find one that make this! Can someone tell me?

Thanks
__________________
FreezerPT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-01-2020 , 04:24   Re: Noscope and distance
Reply With Quote #2

Which game ?
__________________
Do not Private Message @me
Bacardi is offline
FreezerPT
Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
Old 04-01-2020 , 06:24   Re: Noscope and distance
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
Which game ?
CSGO
__________________
FreezerPT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-01-2020 , 07:40   Re: Noscope and distance
Reply With Quote #4

I tested in csgo and css.

- Noscope message with distance are printed in chat when get kill.
- If player toggle scope on/off before kill shot, message will not appear.
= Scope need to be off 1 second.

PHP Code:
char weapons_buy [][] = {
    
// CS:GO weapons
    //"glock", "hkp2000", "usp_silencer", "elite", "p250", "tec9", "fn57", "deagle",
    //"galilar", "famas", "ak47", "m4a1", "m4a1_silencer",
    
"ssg08",
    
//"aug",
    //"sg556",
    
"awp",
    
"scar20",
    
"g3sg1",
    
//"nova", "xm1014", "mag7", "m249", "negev", "mac10", "mp9", "mp7", "ump45", "p90", "bizon",
    //"vest", "vesthelm", "taser", "defuser", "heavyarmor",
    //"molotov", "incgrenade", "decoy", "flashbang", "hegrenade", "smokegrenade"

    // CS:S weapons
    //"primammo", "secammo", "vest", "vesthelm", "defuser", "nvgs",
    //"flashbang", "hegrenade", "smokegrenade", "galil", "ak47",
    
"scout",
    
//"sg552",
    
"awp",
    
"g3sg1",
    
//"famas", "m4a1", "aug",
    
"sg550"
    
//"glock", "usp", "p228", "deagle", "elite", "fiveseven",
    //"m3", "xm1014",
    //"mac10", "tmp", "mp5navy", "ump45", "p90",
    //"m249"
};

#include <sdktools>

public void OnPluginStart()
{
    
HookEventEx("player_death"player_death);
}

public 
void player_death(Event event, const char[] namebool dontBroadcast)
{
    
char weapon[MAX_NAME_LENGTH];
    
event.GetString("weapon"weaponsizeof(weapon));

    for(
int x 0sizeof(weapons_buy); x++)
    {
        if(
StrContains(weaponweapons_buy[x], false) != -1)
        {
            
int victim_userid event.GetInt("userid");
            
int victim GetClientOfUserId(victim_userid);
            
int attacker_userid event.GetInt("attacker");
            
int attacker GetClientOfUserId(attacker_userid);

            
// We have both players in game.
            
if(victim == || attacker == || !IsClientInGame(victim) || !IsClientInGame(attacker) || IsFakeClient(attacker))
                break;

            
// Player using scope - skip
            // if(HasEntProp(attacker, Prop_Send, "m_bIsScopedd") && GetEntProp(attacker, Prop_Send, "m_bIsScoped")) // CSGO only ?


            
int m_iDefaultFOV GetEntProp(attackerProp_Send"m_iDefaultFOV");
            
int m_iFOV GetEntProp(attackerProp_Send"m_iFOV");

            
// Bug. Switching weapon reset m_iFOV to 0. After scope zooming m_iFOV get value m_iDefaultFOV.

            // Player use scope - skip
            
if(m_iFOV != && m_iFOV != m_iDefaultFOV)
                break;


            
// Player used scope within 1.0 second - skip
            
if( m_iFOV == m_iDefaultFOV && (GetGameTime() - GetEntPropFloat(attackerProp_Send"m_flFOVTime")) <= 1.0 )
                break;

            
float attacker_pos[3], victim_pos[3];
            
GetClientEyePosition(attackerattacker_pos);
            
GetClientEyePosition(victimvictim_pos);


            
// CS:GO Standing: 73 units
            // 72 units = 1.82m Player height standing. (0.0252777777777778 m per unit)

            // Delay chat message
            
DataPack pack;
            
CreateDataTimer(0.1delaypack);
            
pack.WriteCell(victim_userid);
            
pack.WriteCell(attacker_userid);
            
pack.WriteFloat(GetVectorDistance(attacker_posvictim_pos) * 0.0252777777777778);
            
pack.Reset();

            break;
        }
    }
}

public 
Action delay(Handle timerDataPack pack)
{
    
int victim GetClientOfUserId(pack.ReadCell());
    
int attacker GetClientOfUserId(pack.ReadCell());
    
float distance pack.ReadFloat();

    
char buffer[255];

    
// The [Name of player] was noscoped by [Name of attacker]! Distance: %0.1fm 

    
if(victim != && IsClientInGame(victim))
    {
        
Format(buffersizeof(buffer), "The [%N] was noscoped by"victim);
    }
    else
    {
        
Format(buffersizeof(buffer), "The [ ? ] was noscoped by");
    }

    if(
attacker != && IsClientInGame(attacker))
    {
        
Format(buffersizeof(buffer), "%s [%N]! Distance: %0.1fm "bufferattackerdistance);
    }
    else
    {
        
Format(buffersizeof(buffer), "%s [ ? ]! Distance: %0.1fm "bufferdistance);
    }

    
PrintToChatAll("%s"buffer);

    return 
Plugin_Continue;



old
__________________
Do not Private Message @me

Last edited by Bacardi; 04-01-2020 at 14:45.
Bacardi is offline
FreezerPT
Senior Member
Join Date: Mar 2017
Location: 127.0.0.1
Old 04-01-2020 , 14:14   Re: Noscope and distance
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
I tested in csgo and css.

- Noscope message with distance are printed in chat when get kill.
- If player toggle scope on/off before kill shot, message will not appear.
= Scope need to be off 1 second.

PHP Code:

char weapons_buy 
[][] = {
    
// CS:GO weapons
    //"glock", "hkp2000", "usp_silencer", "elite", "p250", "tec9", "fn57", "deagle",
    //"galilar", "famas", "ak47", "m4a1", "m4a1_silencer",
    
"ssg08",
    
//"aug",
    //"sg556",
    
"awp",
    
"scar20",
    
"g3sg1",
    
//"nova", "xm1014", "mag7", "m249", "negev", "mac10", "mp9", "mp7", "ump45", "p90", "bizon",
    //"vest", "vesthelm", "taser", "defuser", "heavyarmor",
    //"molotov", "incgrenade", "decoy", "flashbang", "hegrenade", "smokegrenade"

    // CS:S weapons
    //"primammo", "secammo", "vest", "vesthelm", "defuser", "nvgs",
    //"flashbang", "hegrenade", "smokegrenade", "galil", "ak47",
    
"scout",
    
//"sg552",
    
"awp",
    
"g3sg1",
    
//"famas", "m4a1", "aug",
    
"sg550"
    
//"glock", "usp", "p228", "deagle", "elite", "fiveseven",
    //"m3", "xm1014",
    //"mac10", "tmp", "mp5navy", "ump45", "p90",
    //"m249"
};

#include <sdktools>

public void OnPluginStart()
{
    
HookEventEx("player_death"player_death);
}

public 
void player_death(Event event, const char[] namebool dontBroadcast)
{
    
char weapon[MAX_NAME_LENGTH];
    
event.GetString("weapon"weaponsizeof(weapon));

    for(
int x 0sizeof(weapons_buy); x++)
    {
        if(
StrContains(weaponweapons_buy[x], false) != -1)
        {
            
int victim GetClientOfUserId(event.GetInt("userid"));
            
int userid event.GetInt("attacker");
            
int attacker GetClientOfUserId(userid);

            
// We have both players in game.
            
if(victim == || attacker == || !IsClientInGame(victim) || !IsClientInGame(attacker) || IsFakeClient(attacker))
                break;

            
// Player using scope - skip
            // if(HasEntProp(attacker, Prop_Send, "m_bIsScopedd") && GetEntProp(attacker, Prop_Send, "m_bIsScoped")) // CSGO only ?

            
int m_iDefaultFOV GetEntProp(attackerProp_Send"m_iDefaultFOV")
            
int m_iFOV GetEntProp(attackerProp_Send"m_iFOV");

            
// Bug. Switching weapon reset m_iFOV to 0. After scope zooming m_iFOV get value m_iDefaultFOV.

            // Player use scope - skip
            
if(m_iFOV != && m_iFOV != m_iDefaultFOV)
                break;


            
// Player used scope within 1.0 second - skip
            
if( m_iFOV == m_iDefaultFOV && (GetGameTime() - GetEntPropFloat(attackerProp_Send"m_flFOVTime")) <= 1.0 )
                break;

            
float attacker_pos[3], victim_pos[3];
            
GetClientEyePosition(attackerattacker_pos);
            
GetClientEyePosition(victimvictim_pos);


            
// CS:GO Standing: 73 units
            // 72 units = 1.82m Player height standing. (0.0252777777777778 m per unit)

            // Delay chat message
            
DataPack pack;
            
CreateDataTimer(0.1delaypack);
            
pack.WriteCell(userid);
            
pack.WriteFloat(GetVectorDistance(attacker_posvictim_pos) * 0.0252777777777778);
            
pack.Reset();

            break;
        }
    }
}

public 
Action delay(Handle timerDataPack pack)
{
    
int attacker GetClientOfUserId(pack.ReadCell());

    if(
attacker == || !IsClientInGame(attacker))
        return 
Plugin_Continue;

    
float distance pack.ReadFloat();

    
PrintToChat(attacker"[SM] NOSCOPE Distance: %0.1fm"distance);

    return 
Plugin_Continue;

Thats really nice, but can you add something like! The [Name of player] was noscoped by [Name of attacker]! Distance: %0.1fm
__________________
FreezerPT is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 04-01-2020 , 14:23   Re: Noscope and distance
Reply With Quote #6

I sure can... Can you tell in first post, which game and what all things you like in plugin ?
This isn't wahtsapp


*edit
I updated new version in previous post.

Last edited by Bacardi; 04-01-2020 at 14:46.
Bacardi is offline
Reply



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 09:18.


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