[CSGO] NoScope / KQLY / JumpScout Detector + Sunet

Descărcări de pluginuri și discuții despre acestea.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
_()_
Membru, skill +1
Membru, skill +1
Posts: 159
Joined: 24 Jun 2017, 02:10
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

19 Aug 2017, 19:47

Descarcare:
Mega || GirlShare || FileShare
NoScopeAnounce.sp | Afiseaza codul
#include <sourcemod>
#include <sdktools>
#include <clientprefs>

Handle: Sound 
Handle: PlaySoundTo
Handle: Message
Handle: ShowMessageTo

new Handle: HearSound

bool: CanHearTheSound[ MAXPLAYERS + 1 ]

public Plugin:myinfo = {
	name = "NoScope Message & Sound",
	author = "tre3fla",
	description = "Arata un mesaj in chat cand cineva da noscope si reda un sunet",
	version = "1.0",
	url = "http://extreamcs.com/forum"
}

public OnPluginStart( ) {
	Sound = CreateConVar( "sm_noscope_play_sound", "1", "0=dezactivat, 1=reda un sunet cand cineva da no scope" )
	PlaySoundTo = CreateConVar( "sm_noscope_sound", "1", "1=toti jucatorii aud sunet, 2=doar cel care a dat noscope" )
	Message = CreateConVar( "sm_noscope_show_message", "1", "0=dezactivat, 1=arata mesaj in chat cand cineva da no scope" )
	ShowMessageTo = CreateConVar( "sm_noscope_message", "1", "1=toti jucatorii vad mesajul din chat, 2=doar cel care dat si a primit no scope" )
	
	HearSound = RegClientCookie( "NoScopeSound", "Sunetul de no scope", CookieAccess_Protected )
	
	RegConsoleCmd( "noscopesounds", Command_NoScopeSounds )
	
	HookEvent( "player_death", Event_PlayerDeath )
	HookEventEx( "player_connect_full", player_connect_full )
}

public OnMapStart( ) {
	PrecacheSound( "*noscope/noscope.mp3" )
	AddFileToDownloadsTable( "sound/noscope/noscope.mp3" )
}

public player_connect_full( Event:event, const String:name[ ], bool:dontBroadcast ) { 
	new client = GetClientOfUserId( GetEventInt( event, "userid" ) )
	
	if( IsClientConnected( client ) && !IsFakeClient( client ) ) {
		char HS[ 5 ]
		GetClientCookie( client, HearSound, HS, sizeof( HS ) )
		
		if( StrEqual( HS, "0" )) {
			CanHearTheSound[ client ] = false
		}
		
		if( StrEqual( HS, "1" ) ) {
			CanHearTheSound[ client ] = true
		}
		
		if( StrEqual( HS, "" )) {
			CanHearTheSound[ client ] = true
		}
	}
}

public Action: Event_PlayerDeath( Handle:event, const String:name[ ], bool:dontBroadcast ) {
	new victim = GetClientOfUserId( GetEventInt( event, "userid" ) )
	new attacker = GetClientOfUserId( GetEventInt( event, "attacker" ) )
	
	if( IsValidClient( attacker ) && IsValidClient( victim ) && victim != attacker ) {
		char Weapon[ 64 ]
		GetEventString( event, "weapon", Weapon, sizeof( Weapon ) )
		
		if( StrContains( Weapon, "awp" ) != -1 || StrContains( Weapon, "ssg08" ) != -1 ) {
			decl String: AttackerName[ 32 ]
			GetClientName( attacker, AttackerName, sizeof( AttackerName ) )
			
			decl String: VictimName[ 32 ]
			GetClientName( victim, VictimName, sizeof( VictimName ) )
			
			if( StrContains( Weapon, "awp" ) != -1 && GetEntProp( attacker, Prop_Data, "m_iFOV" ) == 0 && !( GetEntityFlags( attacker ) & FL_ONGROUND ) ) {
				if( GetConVarBool( Sound ) ) {
					switch( GetConVarInt( PlaySoundTo ) ) {
						case 1: {
							PlaySoundToAll( )
						}
						case 2: {
							EmitSoundToClient( attacker, "*noscope/noscope.mp3" )
						}
					}
				}
				
				if( GetConVarBool( Message ) ) {
					switch( GetConVarInt( ShowMessageTo ) ) {
						case 1 : {
							PrintToChatAll( "*\x03 %s\x01 did a\x02 KQLY style\x01 to\x0C %s\x01!", AttackerName, VictimName )
						}
						case 2: {
							PrintToChat( attacker, "* You did a\x02 KQLY style\x01 to\x0C %s\x01!", VictimName )
							PrintToChat( victim, "*\x09 %s\x01 did you a\x02 KQLY style\x01!", AttackerName )
						}
					}
				}
			}
			else if( StrContains( Weapon, "awp" ) != -1 && GetEntProp( attacker, Prop_Data, "m_iFOV" ) == 0 ) {
				if( GetConVarBool( Sound ) ) {
					switch( GetConVarInt( PlaySoundTo ) ) {
						case 1: {
							PlaySoundToAll( )
						}
						case 2: {
							EmitSoundToClient( attacker, "*noscope/noscope.mp3" )
						}
					}
				}
				
				if( GetConVarBool( Message ) ) {
					switch( GetConVarInt( ShowMessageTo ) ) {
						case 1 : {
							PrintToChatAll( "*\x03 %s\x02 noscoped\x04 %s\x01! Git rekt n00b!", AttackerName, VictimName )
						}
						case 2: {
							PrintToChat( victim, "* \x03%s\x02 noscoped\x04 you!", AttackerName )
							PrintToChat( attacker, "*\x04 You\x02 noscoped\x02 %s", VictimName )
						}
					}
				}
			}
			
			if( StrContains( Weapon, "ssg08" ) != -1 && GetEntProp( attacker, Prop_Data, "m_iFOV" ) == 0 && !( GetEntityFlags( attacker ) & FL_ONGROUND ) ) {
				if( GetConVarBool( Sound ) ) {
					switch( GetConVarInt( PlaySoundTo ) ) {
						case 1: {
							PlaySoundToAll( )
						}
						case 2: {
							EmitSoundToClient( attacker, "*noscope/noscope.mp3" )
						}
					}
				}
				
				if( GetConVarBool( Message ) ) {
					switch( GetConVarInt( ShowMessageTo ) ) {
						case 1 : {
							PrintToChatAll( "*\x03 %s\x02 jumpscouted and noscoped\x0C %s", AttackerName, VictimName )
						}
						case 2: {
							PrintToChat( attacker, "* You\x02 jumpscouted and noscoped\x0C %s\x01!", VictimName )
							PrintToChat( victim, "*\x09 %s\x02 jumpscouted and noscoped\x0C you", AttackerName )
						}
					}
				}
			}
			else if( StrContains( Weapon, "ssg08" ) != -1 && !( GetEntityFlags( attacker ) & FL_ONGROUND ) ) {
				if( GetConVarBool( Sound ) ) {
					switch( GetConVarInt( PlaySoundTo ) ) {
						case 1: {
							PlaySoundToAll( )
						}
						case 2: {
							EmitSoundToClient( attacker, "*noscope/noscope.mp3" )
						}
					}
				}
				
				if( GetConVarBool( Message ) ) {
					switch( GetConVarInt( ShowMessageTo ) ) {
						case 1 : {
							PrintToChatAll( "*\x03 %s\x02 jumpscouted\x0C %s", AttackerName, VictimName )
						}
						case 2: {
							PrintToChat( attacker, "* You\x02 jumpscouted\x0C %s\x01!", VictimName )
							PrintToChat( victim, "*\x09 %s\x02 jumpscouted\x0C you", AttackerName )
						}
					}
				}
			}
			else if( StrContains( Weapon, "ssg08" ) != -1 && GetEntProp( attacker, Prop_Data, "m_iFOV" ) == 0 ) {
				if( GetConVarBool( Sound ) ) {
					switch( GetConVarInt( PlaySoundTo ) ) {
						case 1: {
							PlaySoundToAll( )
						}
						case 2: {
							EmitSoundToClient( attacker, "*noscope/noscope.mp3" )
						}
					}
				}
				
				if( GetConVarBool( Message ) ) {
					switch( GetConVarInt( ShowMessageTo ) ) {
						case 1 : {
							PrintToChatAll( "*\x03 %s\x02 noscoped\x0C %s", AttackerName, VictimName )
						}
						case 2: {
							PrintToChat( attacker, "* You\x02 noscoped\x0C %s\x01!", VictimName )
							PrintToChat( victim, "*\x09 %s\x02 noscoped\x01 you!", AttackerName )
						}
					}
				}
			}
		}
	}
}

public Action: Command_NoScopeSounds( client, args ) {
	if( CanHearTheSound[ client ] ) {
		CanHearTheSound[ client ] = false
		
		SetClientCookie( client, HearSound, "0" )
		
		PrintToChat( client, "*\x02 The\x04 noscope\x02 sound has been disabled" )
	}
	else {
		CanHearTheSound[ client ] = true
		
		SetClientCookie( client, HearSound, "1" )
		
		PrintToChat( client, "*\x04 The\x02 noscope\x04 sound has been enabled" )
	}
}

public PlaySoundToAll( ) {
	for( new i = 1; i < MaxClients; i++ ) {
		if( IsClientInGame( i ) && CanHearTheSound[ i ] ) {
			EmitSoundToClient( i, "*noscope/noscope.mp3" )
		}
	}
}

stock bool: IsValidClient( int client ) {
	if( client > 0 && client <= MaxClients && IsClientInGame( client ) ) {
		return true
	}
	else {
		return false
	}
}
Nume: NoScope / Kqly / Jumpscout detector
Versiune: 1.0
Autor: tre3fla

Descriere:
Acest plugin detecteaza atunci cand un jucator da noscope, kqly, si/sau jumpscout si arata un mesaj cu numele celui care a dat noscope,etc si numele celui care l-a primit si reda un sunet. Jucatori pot dezactiva sau activa acel sunet cu ajutorul unei comenzi in chat care se salveaza, nu trebuie folosita de fiecare daca cand intri pe server.

Convar-uri (se adauga in autoexec.cfg)
  • sm_noscope_play_sound - 0=dezactivat, 1=reda un sunet cand cineva da noscope, jumpshot, etc
  • sm_noscope_show_message - 0=dezactivat, 1=arata un mesaj in chat cand cineva da noscope, jumpscout, etc
  • sm_noscope_sound - Cui sa redea sunetul. 1=tuturor jucatorilor, 2=doar celui care a dat noscope, etc
  • sm_noscope_message - Cine sa vada mesajele de noscope, jumpscout, etc. 1=toti jucatorii, 2=doar cel care a dat si cel care a primit
Comenzi:
  • !noscopesounds - Activeaza / dezactiveaza sunetul de la noscope, jumpscout, etc
Instalare:
  • Pur si simplu trageti continutul folderului NoScopeAnounce in folderul csgo de pe serverul vostru!
Daca vreti pot adauga sunete pentru fiecare arma in parte si pentru fiecare trickshot in parte in functie de arma, doar sa-mi lasati sunetele (ca mie mi-e lene sa le caut) si eu le pun in plugin si updatez postul.

Nu ofer modificari private prin pm. Orice modificare se cere si se ofera in topicul asta.
Last edited by _()_ on 19 Aug 2017, 22:38, edited 1 time in total.
RoyalServer 2
Zynrox
Membru, skill 0
Membru, skill 0
Posts: 25
Joined: 13 Jul 2017, 21:28
Detinator Steam: Da
CS Status: Frec menta.
Detinator server CS: Arena.Addicted2.Ro
SteamID: Zynroxc
Fond eXtream: 0
Contact:

19 Aug 2017, 21:43

Vezi ca ai scris 'Connect Announce' la nume. ;)
_()_
Membru, skill +1
Membru, skill +1
Posts: 159
Joined: 24 Jun 2017, 02:10
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

19 Aug 2017, 22:40

Zynrox wrote:Vezi ca ai scris 'Connect Announce' la nume. ;)
Ms. De fapt ala trebuia sa-l postez dar uitasem ca are un mic bug ce trebuia rezolvat si l-am postat pe asta primul si a ramas numele asa. Oricum postasem sursa de test cu niste comenzi care le folosisem la testarea unor native si a trebuit sa reuploadez totul. Sper ca n-am postat alta sursa in zip'u ala :))
Post Reply

Return to “Pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest