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

[CS:GO] Extended Player Death Info


Post New Thread Reply   
 
Thread Tools Display Modes
GTAmama16
Member
Join Date: Jun 2019
Old 09-17-2019 , 22:49   Re: [CS:GO] Extended Player Death Info
Reply With Quote #11

After today’s update the server will show the files are missinghttps://imgur.com/a/VZZiwF0
GTAmama16 is offline
Hot Dog
Junior Member
Join Date: Oct 2019
Old 10-25-2019 , 07:21   Re: [CS:GO] Extended Player Death Info
Reply With Quote #12

Is it possible to remove all functions except NoScope in AWP or Snipers? I want to avoid downloading so many files from server.
Code:
#pragma semicolon 1
#include sdktools
#include sdkhooks

#define NOSCOP 1
#define FLASH 2
#define SMOKE 4

static const char g_sExtendedInfo[][] = {"n", "f", "nf", "s", "ns", "fs", "nfs"};
static const char g_sWeapons[][] = {"deagle", "elite", "fiveseven", "glock", "ak47", "aug", "awp", "famas", "g3sg1", "galilar", "m249", "m4a1", "mac10", "p90", "mp5sd", "ump45", "xm1014", "bizon", "mag7", "negev", "sawedoff", "tec9", "p2000", "hkp2000", "mp7", "mp9", "nova", "p250", "scar20", "sg556", "ssg08", "m4a1_silencer", "m4a1_silencer_off", "usp_silencer", "usp_silencer_off", "cz75a", "revolver"};
static const char g_sSniperWeapons[][] = {"awp", "g3sg1", "scar20", "ssg08"};

float g_DamagePosition[MAXPLAYERS+1][3];

public Plugin myinfo =
{
	name = "Extended Player Death Info",
	description = "Отображает больше информации при убийстве",
	author = "Phoenix (˙·٠●Феникс●٠·˙), Icons created Bastaz",
	version = "1.0.0",
	url = "zizt.ru hlmod.ru"
};

public void OnPluginStart()
{
	HookEvent("player_death", Event_player_death, EventHookMode_Pre);
	
	for(int i = 1; i <= MaxClients; i++) if(IsClientInGame(i))
	{
		OnClientPutInServer(i);
	}
}

public void OnMapStart()
{
	char sPath[] = "materials/panorama/images/icons/equipment/";
	char sBuf[128];
	for(int i = 0; i < sizeof g_sWeapons; i++)
	{
		FormatEx(sBuf, sizeof sBuf, "%s%s_f_bz.svg", sPath, g_sWeapons[i]);
		AddFileToDownloadsTable(sBuf);
		FormatEx(sBuf, sizeof sBuf, "%s%s_s_bz.svg", sPath, g_sWeapons[i]);
		AddFileToDownloadsTable(sBuf);
		FormatEx(sBuf, sizeof sBuf, "%s%s_fs_bz.svg", sPath, g_sWeapons[i]);
		AddFileToDownloadsTable(sBuf);
	}
	for(int i = 0; i < sizeof g_sSniperWeapons; i++)
	{
		FormatEx(sBuf, sizeof sBuf, "%s%s_n_bz.svg", sPath, g_sSniperWeapons[i]);
		AddFileToDownloadsTable(sBuf);
		FormatEx(sBuf, sizeof sBuf, "%s%s_nf_bz.svg", sPath, g_sSniperWeapons[i]);
		AddFileToDownloadsTable(sBuf);
		FormatEx(sBuf, sizeof sBuf, "%s%s_ns_bz.svg", sPath, g_sSniperWeapons[i]);
		AddFileToDownloadsTable(sBuf);
		FormatEx(sBuf, sizeof sBuf, "%s%s_nfs_bz.svg", sPath, g_sSniperWeapons[i]);
		AddFileToDownloadsTable(sBuf);
	}
}

public void OnClientPutInServer(int iClient)
{
	SDKHook(iClient, SDKHook_OnTakeDamageAlivePost, OnTakeDamageAlivePost);
}

public void OnTakeDamageAlivePost(int iClient, int attacker, int inflictor, float damage, int damagetype, int weapon, const float damageForce[3], const float damagePosition[3], int damagecustom)
{
	g_DamagePosition[iClient] = damagePosition;
}

public Action Event_player_death(Event event, const char[] name, bool dontBroadcast)
{
	int userid = event.GetInt("userid"), attacker = event.GetInt("attacker"), iClient, iAttacker;
	
	if(userid != attacker && (iClient = GetClientOfUserId(userid)) && (iAttacker = GetClientOfUserId(attacker)))
	{
		char sWeapon[64];
		event.GetString("weapon", sWeapon, sizeof sWeapon);
		
		if(IsWeaponHasExtendedInfo(sWeapon))
		{
			int ExtendedInfo = 0;
			
			if(!GetEntProp(iAttacker, Prop_Send, "m_bIsScoped") && IsSniperWeapon(sWeapon))
			{
				ExtendedInfo |= NOSCOP;
			}
			
			if (GetEntPropFloat(iAttacker, Prop_Send, "m_flFlashDuration") > 0.0)
			{
				ExtendedInfo |= FLASH;
			}
			
			float from[3];
			GetClientEyePosition(iAttacker, from);
			if(LineGoesThroughSmoke(from, g_DamagePosition[iClient]))
			{
				ExtendedInfo |= SMOKE;
			}
			
			if(ExtendedInfo)
			{
				Format(sWeapon, sizeof sWeapon, "%s_%s_bz", sWeapon, g_sExtendedInfo[ExtendedInfo-1]);
				
				event.BroadcastDisabled = true;
				
				Event event_fake = CreateEvent("player_death", true);
				
				event_fake.SetString("weapon", sWeapon);
				event_fake.SetInt("userid", userid);
				event_fake.SetInt("attacker", attacker);
				event_fake.SetInt("assister", event.GetInt("assister"));
				event_fake.SetBool("headshot", event.GetBool("headshot"));
				event_fake.SetBool("penetrated", event.GetBool("penetrated"));
				event_fake.SetBool("revenge", event.GetBool("revenge"));
				event_fake.SetBool("dominated", event.GetBool("dominated"));
				
				for(int i = 1; i <= MaxClients; i++) if(IsClientInGame(i) && !IsFakeClient(i))
				{
					event_fake.FireToClient(i);
				}
				
				event_fake.Cancel();
				return Plugin_Changed;
			}
		}
	}
	return Plugin_Continue;
}

bool IsWeaponHasExtendedInfo(const char[] sWeapon)
{
	for(int i = 0; i < sizeof g_sWeapons; i++)
	{
		if(strcmp(g_sWeapons[i], sWeapon) == 0)
		{
			return true;
		}
	}
	return false;
}

bool IsSniperWeapon(const char[] sWeapon)
{
	for(int i = 0; i < sizeof g_sSniperWeapons; i++)
	{
		if(strcmp(g_sSniperWeapons[i], sWeapon) == 0)
		{
			return true;
		}
	}
	return false;
}

stock bool LineGoesThroughSmoke(float from[3], float to[3])
{
	static Address TheBots;
	static Handle CBotManager_IsLineBlockedBySmoke;
	static int OS;
	
	if(OS == 0)
	{
		Handle hGameConf = LoadGameConfigFile("LineGoesThroughSmoke.games");
		if(!hGameConf)
		{
			SetFailState("Could not read LineGoesThroughSmoke.games.txt");
			return false;
		}
		
		OS = GameConfGetOffset(hGameConf, "OS");
		
		TheBots = GameConfGetAddress(hGameConf, "TheBots");
		if(!TheBots)
		{
			CloseHandle(hGameConf);
			SetFailState("TheBots == null");
			return false;
		}
		
		StartPrepSDKCall(SDKCall_Raw);
		PrepSDKCall_SetFromConf(hGameConf, SDKConf_Signature, "CBotManager::IsLineBlockedBySmoke");
		PrepSDKCall_AddParameter(SDKType_Vector, SDKPass_Pointer);
		PrepSDKCall_AddParameter(SDKType_Vector, SDKPass_Pointer);
		if(OS == 1) PrepSDKCall_AddParameter(SDKType_Float, SDKPass_Plain);
		PrepSDKCall_SetReturnInfo(SDKType_Bool, SDKPass_Plain);
		if(!(CBotManager_IsLineBlockedBySmoke = EndPrepSDKCall()))
		{
			CloseHandle(hGameConf);
			SetFailState("Failed to get CBotManager::IsLineBlockedBySmoke function");
			return false;
		}
		
		CloseHandle(hGameConf);
	}
	
	if(OS == 1) return SDKCall(CBotManager_IsLineBlockedBySmoke, TheBots, from, to, 1.0);
	return SDKCall(CBotManager_IsLineBlockedBySmoke, TheBots, from, to);
}

Last edited by Hot Dog; 10-25-2019 at 07:42.
Hot Dog is offline
Hot Dog
Junior Member
Join Date: Oct 2019
Old 11-19-2019 , 12:01   Re: [CS:GO] Extended Player Death Info
Reply With Quote #13

Quote:
Originally Posted by gubka View Post

Icons made by: Bastaz
How install: Put unzip folder into the server
Author: komashchenko
Original theme: here
After updating sourcemod generates these errors:
Code:
L 11/19/2019 - 16:54:04: [SM] Exception reported: Failed to get CBotManager::IsLineBlockedBySmoke function
L 11/19/2019 - 16:54:04: [SM] Blaming: ExtendedPlayerDeathInfo.smx
L 11/19/2019 - 16:54:04: [SM] Call stack trace:
L 11/19/2019 - 16:54:04: [SM]   [0] SetFailState
L 11/19/2019 - 16:54:04: [SM]   [1] Line 173, C:\csgo\addons\sourcemod\scripting\ExtendedPlayerDeathInfo.sp::LineGoesThroughSmoke
L 11/19/2019 - 16:54:04: [SM]   [2] Line 80, C:\csgo\addons\sourcemod\scripting\ExtendedPlayerDeathInfo.sp::Event_player_death

Last edited by Hot Dog; 11-19-2019 at 12:01.
Hot Dog is offline
Lubricant Jam
AlliedModders Donor
Join Date: Oct 2016
Location: United Kingdom
Old 11-21-2019 , 03:24   Re: [CS:GO] Extended Player Death Info
Reply With Quote #14

Quote:
Originally Posted by Hot Dog View Post
After updating sourcemod generates these errors:
Code:
L 11/19/2019 - 16:54:04: [SM] Exception reported: Failed to get CBotManager::IsLineBlockedBySmoke function
L 11/19/2019 - 16:54:04: [SM] Blaming: ExtendedPlayerDeathInfo.smx
L 11/19/2019 - 16:54:04: [SM] Call stack trace:
L 11/19/2019 - 16:54:04: [SM]   [0] SetFailState
L 11/19/2019 - 16:54:04: [SM]   [1] Line 173, C:\csgo\addons\sourcemod\scripting\ExtendedPlayerDeathInfo.sp::LineGoesThroughSmoke
L 11/19/2019 - 16:54:04: [SM]   [2] Line 80, C:\csgo\addons\sourcemod\scripting\ExtendedPlayerDeathInfo.sp::Event_player_death
This has been fixed on the Russian alternative however I don't have an account to that site.
__________________
Lubricant Jam is offline
pribekerik
AlliedModders Donor
Join Date: Apr 2018
Old 11-21-2019 , 03:52   Re: [CS:GO] Extended Player Death Info
Reply With Quote #15

Quote:
Originally Posted by Lubricant Jam View Post
This has been fixed on the Russian alternative however I don't have an account to that site.
Here is the original zip from hlmod.ru
Last update 2019.11.19 11:18 AM
Attached Files
File Type: zip ExtendedPlayerDeathInfo.zip (294.5 KB, 313 views)
pribekerik is offline
raj kaul
Senior Member
Join Date: Mar 2018
Location: www.lotgaming.xyz
Old 11-21-2019 , 06:13   Re: [CS:GO] Extended Player Death Info
Reply With Quote #16

Quote:
Originally Posted by pribekerik View Post
Here is the original zip from hlmod.ru
Last update 2019.11.19 11:18 AM
working fine
__________________

Last edited by raj kaul; 11-21-2019 at 06:39.
raj kaul is offline
Enrory
Senior Member
Join Date: Nov 2016
Location: Austria
Old 12-02-2019 , 13:41   Re: [CS:GO] Extended Player Death Info
Reply With Quote #17

Quote:
Originally Posted by pribekerik View Post
Here is the original zip from hlmod.ru
Last update 2019.11.19 11:18 AM
I got this
ExtendedPlayerDeathInfo.smx (Extended Player Death Info): Failed to get CBotManager::IsLineBlockedBySmoke function

Edit: this version works for me too

again russian page version 1.1.0
Attached Files
File Type: zip ExtendedPlayerDeathInfo.zip (294.5 KB, 245 views)
__________________

Last edited by Enrory; 01-04-2020 at 11:22. Reason: Edited
Enrory is offline
Sandervraun
Senior Member
Join Date: May 2019
Location: Denmark
Old 03-13-2020 , 19:35   Re: [CS:GO] Extended Player Death Info
Reply With Quote #18

Files are in the fastDL file from the post... But it gives these errors when joining the server.... This is broken and no longer works.

Spoiler

Last edited by sneaK; 03-22-2020 at 19:56. Reason: spoiler tags
Sandervraun is offline
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-22-2020 , 19:56   Re: [CS:GO] Extended Player Death Info
Reply With Quote #19

Quote:
Originally Posted by Sandervraun View Post
Files are in the fastDL file from the post... But it gives these errors when joining the server.... This is broken and no longer works.
You haven't setup your fastdl properly, or the files aren't in the correct directories.

Just a heads up, this was crashing my Windows servers as of 3/22 update (HL Alyx update), so likely gamedata needs to be changed.
__________________
sneaK is offline
freak.exe_uLow
AlliedModders Donor
Join Date: Jul 2012
Location: Germany
Old 03-23-2020 , 06:22   Re: [CS:GO] Extended Player Death Info
Reply With Quote #20

update 03/23/2020
Quote:
Updated gamedata for Windows
thanks to komashchenko
Attached Files
File Type: txt LineGoesThroughSmoke.games.txt (980 Bytes, 233 views)

Last edited by freak.exe_uLow; 03-23-2020 at 06:23.
freak.exe_uLow 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 08:30.


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