View Single Post
analepic
Junior Member
Join Date: Apr 2022
Old 06-29-2022 , 18:51   Re: Modify Score csgo
Reply With Quote #2

Quote:
Originally Posted by Gena View Post
How can I do so that a death or kill does not affect the score at certain times, I have something like this, but I know it's wrong.
(It's from a long time ago so it's probably mixed up)
Code:
public Action Event_PlayerDeath(Handle event, const char[] name, bool dontBroadcast)
{
	int client = GetClientOfUserId(GetEventInt(event, "userid"));
	int victim = GetClientOfUserId(GetEventInt(event, "userid"));
	int attacker = GetClientOfUserId(GetEventInt(event, "attacker"));

	if	(g_indm[client])
	{
	        SetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_iDeaths", _, victim);
		SetEntProp(client, Prop_Data, "m_iDeaths", -1);
		
                SetEntProp(attacker, Prop_Data, "m_iKills", GetClientFrags(attacker) -1);
		SetEntProp(GetPlayerResourceEntity(), Prop_Send, "m_iKills", g_indm[attacker], _, attacker);
	}
Would you be comfortable sharing that with us since Im guessing that the original owner stopped updating this plugin. Thanks in advance.
analepic is offline