Raised This Month: $32 Target: $400
 8% 

Seach Noscope Plugins for SSG [CSGO]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vicoshow
Junior Member
Join Date: Nov 2017
Location: France
Old 11-21-2017 , 19:43   Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #1

Hello i'm searching a plugin noscop for my server Cs:go, i have a old plugin we works fine on css but it doesnt works on Cs:go,
can we found a plugin which does exactly the same thing : scop = HUD messageand refill of the SSG, thanks you if u help me sorry for my english. (this topics was affiliate whith the one frome below)




Noscope.sp
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#define VERSION "1.0.1"

public Plugin:myinfo =
{
name = "Scout No Scope",
author = "XARiUS",
description = "Plugin which will force scout no scoping!",
version = "1.0.1",
url = "http://www.the-otc.com/"
};

new String:language[4];
new String:languagecode[4];
new bool:g_enabled;
new bool:g_bulletpath;
new g_laser;
new Handle:g_Cvarenabled = INVALID_HANDLE;
new Handle:g_Cvarbulletpath = INVALID_HANDLE;

public OnPluginStart()
{
LoadTranslations("noscope.phrases");
CreateConVar("sm_noscope_version", VERSION, "Scout No Scope Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FC VAR_NOTIFY|FCVAR_DONTRECORD);
g_Cvarenabled = CreateConVar("sm_noscope_enabled", "1", "Enable this plugin. 0 = Disabled");
g_Cvarbulletpath = CreateConVar("sm_noscope_bulletpath", "0", "Show the bullet path using a small laser beam. 0 = Disabled");
GetLanguageInfo(GetServerLanguage(), languagecode, sizeof(languagecode), language, sizeof(language));

HookEvent("weapon_zoom", EventWeaponZoom, EventHookMode_Post);
HookEvent("weapon_fire", EventWeaponFire, EventHookMode_Post);

HookConVarChange(g_Cvarenabled, OnSettingChanged);
HookConVarChange(g_Cvarbulletpath, OnSettingChanged);

g_enabled = GetConVarBool(g_Cvarenabled);
g_bulletpath = GetConVarBool(g_Cvarbulletpath);

g_laser = PrecacheModel("materials/sprites/laser.vmt");
}

public OnSettingChanged(Handle:convar, const StringldValue[], const String:newValue[])
{
if (convar == g_Cvarenabled)
{
if (newValue[0] == '1')
{
PrintHintTextToAll("%t", "Noscope enabled");
EmitSoundToAll("weapons/zoom.wav");
g_enabled = true;
}
else
{
PrintHintTextToAll("%t", "Noscope disabled");
EmitSoundToAll("weapons/zoom.wav");
g_enabled = false;
}
}
if (convar == g_Cvarbulletpath)
{
if (newValue[0] == '1')
{
g_bulletpath = true;
}
else
{
g_bulletpath = false;
}
}
}

public Action:EventWeaponFire(Handle:event,const String:name[],bool:dontBroadcast)
{
if (g_enabled && g_bulletpath)
{

new clientid = GetClientOfUserId(GetEventInt(event, "userid"));
new String:weaponname[32];
GetEventString(event, "weapon", weaponname, sizeof(weaponname));
if (StrEqual(weaponname, "scout", false))
{
DrawLaser(clientid);
}
}
}

public Action:EventWeaponZoom(Handle:event,const String:name[],bool:dontBroadcast)
{
if (g_enabled)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
new String:weaponname[32];
GetClientWeapon(client, weaponname, sizeof(weaponname));
if (StrEqual(weaponname, "weapon_scout", false))
{
new weapon = GetPlayerWeaponSlot(client, 0);
if (IsValidEdict(weapon))
{
RemovePlayerItem(client, weapon);
RemoveEdict(weapon);
CreateTimer(0.1, GiveScout, client);
PrintHintText(client, "%t", "Not Allowed");
}
return Plugin_Continue;
}
return Plugin_Continue;
}
return Plugin_Continue;
}

public Action:GiveScout(Handle:Timer, any:client)
{
GivePlayerItem(client, "weapon_scout");
}

public DrawLaser(client)
{
new Float:clientOrigin[3], Float:impactOrigin[3];
new Float:vAngles[3], Float:vOrigin[3];
GetClientEyePosition(client,vOrigin);
GetClientEyeAngles(client,vAngles);
new color[4];

new Handle:trace = TR_TraceRayFilterEx(vOrigin, vAngles, MASK_SHOT, RayType_Infinite, TraceEntityFilterPlayer, client);

if (TR_DidHit(trace))
{
TR_GetEndPosition(impactOrigin, trace);
GetClientEyePosition(client, clientOrigin);
clientOrigin[2] -= 1;
if (GetClientTeam(client) == 3)
{
color = {75, 75, 255, 255};
}
else
{
color = {255, 75, 75, 255};
}
TE_SetupBeamPoints(clientOrigin, impactOrigin, g_laser, 0, 0, 0, 0.5, 1.0, 1.0, 10, 0.0, color, 0);
TE_SendToAll();
}
CloseHandle(trace);
}

public bool:TraceEntityFilterPlayer(entity, mask, any:data)
{
return data != entity;
}


Noscope.txt
"Phrases"
{
"Not Allowed"
{
"en" "Scoping is not allowed!"
"de" "Verwenden des Zielfernrohrs ist nicht erlaubt!"
}
"Noscope enabled"
{
"en" "Scout No Scoping is ENABLED!"
}

"Noscope disabled"
{
"en" "Scout No Scoping is DISABLED!"
}
}

Thanks More for your Help
__________________

Last edited by Vicoshow; 11-21-2017 at 19:46. Reason: Bad Englich
Vicoshow is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 11-22-2017 , 03:09   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #2

not tested
PHP Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#define VERSION "1.0"

public Plugin myinfo 
{
    
name "Scout No Scope"
    
author "XARiUS, Holder"
    
description "Plugin which will force scout no scoping!"
    
version "1.0"
    
url "http://www.the-otc.com/"
};

char language[4];
char languagecode[4];
bool g_enabled;
bool g_bulletpath;
int g_laser;
Handle g_Cvarenabled INVALID_HANDLE;
Handle g_Cvarbulletpath INVALID_HANDLE;

public 
void OnPluginStart()
{
    
LoadTranslations("noscope.phrases");
    
CreateConVar("sm_noscope_version"VERSION"Scout No Scope Version"FCVAR_NOTIFY FCVAR_REPLICATED FCVAR_SPONLY FCVAR_DONTRECORD);
    
g_Cvarenabled CreateConVar("sm_noscope_enabled""1""Enable this plugin. 0 = Disabled");
    
g_Cvarbulletpath CreateConVar("sm_noscope_bulletpath""0""Show the bullet path using a small laser beam. 0 = Disabled");
    
    
GetLanguageInfo(GetServerLanguage(), languagecodesizeof(languagecode), languagesizeof(language));
    
    
HookEvent("weapon_zoom"EventWeaponZoomEventHookMode_Post);
    
HookEvent("weapon_fire"EventWeaponFireEventHookMode_Post);
    
    
HookConVarChange(g_CvarenabledOnSettingChanged);
    
HookConVarChange(g_CvarbulletpathOnSettingChanged);
    
    
g_enabled GetConVarBool(g_Cvarenabled);
    
g_bulletpath GetConVarBool(g_Cvarbulletpath);
    
    
g_laser PrecacheModel("materials/sprites/laser.vmt");
}

public 
void OnSettingChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    if (
convar == g_Cvarenabled)
    {
        if (
newValue[0] == 1)
        {
            
PrintHintTextToAll("%t""Noscope enabled");
            
EmitSoundToAll("weapons/zoom.wav");
            
g_enabled true;
            
g_bulletpath true;
        }
        else
        {
            
PrintHintTextToAll("%t""Noscope disabled");
            
EmitSoundToAll("weapons/zoom.wav");
            
g_enabled false;
            
g_bulletpath false;
        }
    }
}

public 
Action EventWeaponFire(Event event, const char[] namebool dontBroadcast)
{
    if (
g_enabled && g_bulletpath)
    {
        
int clientid GetClientOfUserId(event.GetInt("userid"));
        
char weaponname[32];
        
int weapon;
        
GetEdictClassname(weaponweaponnamesizeof(weaponname));
        if (
StrEqual(weaponname"weapon_ssg08"))
        {
            
DrawLaser(clientid);
        }
    }
}

public 
Action EventWeaponZoom(Event event, const char[] namebool dontBroadcast)
{
    if (
g_enabled)
    {
        
int client GetClientOfUserId(event.GetInt("userid"));
        
char weaponname[32];
        
GetClientWeapon(clientweaponnamesizeof(weaponname));
        if (
StrEqual(weaponname"weapon_ssg08"))
        {
            
int weapon GetPlayerWeaponSlot(client0);
            if (
IsValidEdict(weapon))
            {
                
RemovePlayerItem(clientweapon);
                
RemoveEdict(weapon);
                
CreateTimer(0.1GiveScoutclient);
                
PrintHintText(client"%t""Not Allowed");
            }
            return 
Plugin_Continue;
        }
        return 
Plugin_Continue;
    }
    return 
Plugin_Continue;
}

public 
Action GiveScout(Handle timerany client)
{
    
GivePlayerItem(client"weapon_ssg08");
}

public 
int DrawLaser(int client)
{
    
float clientOrigin[3], impactOrigin[3];
    
float vAngles[3], vOrigin[3];
    
GetClientEyePosition(clientvOrigin);
    
GetClientEyeAngles(clientvAngles);
    
int color[4];
    
    
Handle trace TR_TraceRayFilterEx(vOriginvAnglesMASK_SHOTRayType_InfiniteTraceEntityFilterPlayerclient);
    
    if (
TR_DidHit(trace))
    {
        
TR_GetEndPosition(impactOrigintrace);
        
GetClientEyePosition(clientclientOrigin);
        
clientOrigin[2] -= 1;
        if (
GetClientTeam(client) == 3)
        {
            
color =  { 7575255255 };
        }
        else
        {
            
color =  { 2557575255 };
        }
        
TE_SetupBeamPoints(clientOriginimpactOriging_laser0000.51.01.0100.0color0);
        
TE_SendToAll();
    }
    
CloseHandle(trace);
}

public 
bool TraceEntityFilterPlayer(int entityint maskany data)
{
    return 
data != entity;

BassPower is offline
Vicoshow
Junior Member
Join Date: Nov 2017
Location: France
Old 11-22-2017 , 05:54   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #3

thanks bro, and how made you to convert a scripting towards a smx?
__________________
Vicoshow is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 11-22-2017 , 13:06   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #4

go http://www.sourcemod.net/compiler.php
BassPower is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 11-22-2017 , 14:32   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #5

https://forums.alliedmods.net/showth...62#post2562262
__________________
ThatOneGuy is offline
Vicoshow
Junior Member
Join Date: Nov 2017
Location: France
Old 11-22-2017 , 15:33   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #6

Sorry but your plugins disarm the SSG after scope :/ if you scope you lost your SSG :/
__________________
Vicoshow is offline
Vicoshow
Junior Member
Join Date: Nov 2017
Location: France
Old 11-22-2017 , 15:42   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #7

Thanks More All for your help ! have got noscope on the server he loook fine ! Big Thanks all
Attached Files
File Type: smx noscope.smx (6.6 KB, 156 views)
File Type: sp Get Plugin or Get Source (noscope.sp - 392 views - 4.3 KB)
File Type: txt noscope.phrases.txt (276 Bytes, 159 views)
__________________
Vicoshow is offline
ThatOneGuy
Veteran Member
Join Date: Jul 2012
Location: Oregon, USA
Old 11-22-2017 , 17:04   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #8

Quote:
Originally Posted by Vicoshow View Post
Sorry but your plugins disarm the SSG after scope :/ if you scope you lost your SSG :/
Hmmm...should give it back after 0.1 seconds and set the ammo back to where it was. I'm guessing the problem is in GetClientWeapon not returning the correct weapon name for use in GivePlayerItem. Might need to append "weapon_" to the output from GetClientWeapon. I made an edit to change that line to use GetEntityClassname instead, which I believe has the "weapon_" in it (I am too lazy to test it right now). Oh well, you have a working plugin from the other guy either way.
__________________
ThatOneGuy is offline
BassPower
Member
Join Date: Mar 2011
Location: Lithuania
Old 11-23-2017 , 03:23   Re: Seach Noscope Plugins for SSG [CSGO]
Reply With Quote #9

You can edit to no remove weapon_ssg08 and add... to just block IN_ATTACK2 button (mouse)

PHP Code:
public Action OnPlayerRunCmd(int clientint &buttonsint &impulsefloat vel[3], float angles[3], int &weapon)
{
    if (!(
buttons IN_ATTACK2))
    {
        return 
Plugin_Continue;
    }
    
char sWeapon[32];
    
GetClientWeapon(clientsWeaponsizeof(sWeapon));
    if ((
StrContains(sWeapon"ssg08") != -1))
    {
        
buttons &= ~IN_ATTACK2;
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;

edited:

PHP Code:
#pragma semicolon 1
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#define VERSION "1.0"

public Plugin myinfo 
{
    
name "Scout No Scope"
    
author "XARiUS, Holder"
    
description "Plugin which will force scout no scoping!"
    
version "1.0"
    
url "http://www.the-otc.com/"
};

char language[4];
char languagecode[4];
bool g_enabled;
bool g_bulletpath;
int g_laser;
Handle g_Cvarenabled INVALID_HANDLE;
Handle g_Cvarbulletpath INVALID_HANDLE;

public 
void OnPluginStart()
{
    
LoadTranslations("noscope.phrases");
    
CreateConVar("sm_noscope_version"VERSION"Scout No Scope Version"FCVAR_NOTIFY FCVAR_REPLICATED FCVAR_SPONLY FCVAR_DONTRECORD);
    
g_Cvarenabled CreateConVar("sm_noscope_enabled""1""Enable this plugin. 0 = Disabled");
    
g_Cvarbulletpath CreateConVar("sm_noscope_bulletpath""0""Show the bullet path using a small laser beam. 0 = Disabled");
    
    
GetLanguageInfo(GetServerLanguage(), languagecodesizeof(languagecode), languagesizeof(language));
    
    
HookEvent("weapon_fire"EventWeaponFireEventHookMode_Post);
    
    
HookConVarChange(g_CvarenabledOnSettingChanged);
    
HookConVarChange(g_CvarbulletpathOnSettingChanged);
    
    
g_enabled GetConVarBool(g_Cvarenabled);
    
g_bulletpath GetConVarBool(g_Cvarbulletpath);
    
    
g_laser PrecacheModel("materials/sprites/laser.vmt");
}

public 
void OnSettingChanged(Handle convar, const char[] oldValue, const char[] newValue)
{
    if (
convar == g_Cvarenabled)
    {
        if (
newValue[0] == 1)
        {
            
PrintHintTextToAll("%t""Noscope enabled");
            
EmitSoundToAll("weapons/zoom.wav");
            
g_enabled true;
            
g_bulletpath true;
        }
        else
        {
            
PrintHintTextToAll("%t""Noscope disabled");
            
EmitSoundToAll("weapons/zoom.wav");
            
g_enabled false;
            
g_bulletpath false;
        }
    }
}

public 
Action EventWeaponFire(Event event, const char[] namebool dontBroadcast)
{
    if (
g_enabled && g_bulletpath)
    {
        
int clientid GetClientOfUserId(event.GetInt("userid"));
        
char weaponname[32];
        
int weapon;
        
GetEdictClassname(weaponweaponnamesizeof(weaponname));
        if (
StrEqual(weaponname"weapon_ssg08"))
        {
            
DrawLaser(clientid);
        }
    }
}

public 
Action OnPlayerRunCmd(int clientint &buttonsint &impulsefloat vel[3], float angles[3], int &weapon)
{
    if (
g_enabled)
    {
        if (!(
buttons IN_ATTACK2))
        {
            return 
Plugin_Continue;
        }
        
char sWeapon[32];
        
GetClientWeapon(clientsWeaponsizeof(sWeapon));
        if ((
StrContains(sWeapon"ssg08") != -1))
        {
            
buttons &= ~IN_ATTACK2;
            return 
Plugin_Changed;
        }
        return 
Plugin_Continue;
    }
    return 
Plugin_Continue;
}

public 
int DrawLaser(int client)
{
    
float clientOrigin[3], impactOrigin[3];
    
float vAngles[3], vOrigin[3];
    
GetClientEyePosition(clientvOrigin);
    
GetClientEyeAngles(clientvAngles);
    
int color[4];
    
    
Handle trace TR_TraceRayFilterEx(vOriginvAnglesMASK_SHOTRayType_InfiniteTraceEntityFilterPlayerclient);
    
    if (
TR_DidHit(trace))
    {
        
TR_GetEndPosition(impactOrigintrace);
        
GetClientEyePosition(clientclientOrigin);
        
clientOrigin[2] -= 1;
        if (
GetClientTeam(client) == 3)
        {
            
color =  { 7575255255 };
        }
        else
        {
            
color =  { 2557575255 };
        }
        
TE_SetupBeamPoints(clientOriginimpactOriging_laser0000.51.01.0100.0color0);
        
TE_SendToAll();
    }
    
CloseHandle(trace);
}

public 
bool TraceEntityFilterPlayer(int entityint maskany data)
{
    return 
data != entity;


Last edited by BassPower; 11-23-2017 at 03:27.
BassPower 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 12:18.


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