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

css request headshot nade


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Neon123
Senior Member
Join Date: Jan 2016
Old 06-26-2021 , 21:34   css request headshot nade
Reply With Quote #1

how i can give a he grenade when player kills someone with headshot
Neon123 is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 06-27-2021 , 11:22   Re: css request headshot nade
Reply With Quote #2

Code:
public void OnPluginStart()
{
	HookEvent("player_death", Event_OnPlayerDeath);
}

public void Event_OnPlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
	int victim = GetClientOfUserId(event.GetInt("userid"));
	int attacker = GetClientOfUserId(event.GetInt("attacker"));

	if (attacker > 0 && attacker <= MaxClients && IsClientInGame(attacker) && IsPlayerAlive(attacker) && event.GetBool("headshot"))
		GivePlayerItem(attacker, "weapon_hegrenade");
}
Drixevel is offline
Neon123
Senior Member
Join Date: Jan 2016
Old 06-27-2021 , 17:14   Re: css request headshot nade
Reply With Quote #3

thanks i will try
Neon123 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:19.


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