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

Solved CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-12-2018 , 10:26   CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
Reply With Quote #1

Hey, i need a Plugin where a HUD Text"Killed by *PLAYER*" will be Shown above the Crosshair when a Player die. Thanks

Last edited by iskenderkebab33; 11-03-2018 at 17:34.
iskenderkebab33 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-12-2018 , 12:57   Re: CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
Reply With Quote #2

PHP Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent("player_death"Event_Death);
}

public 
Action Event_Death(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
int iVictim GetClientOfUserId(hEvent.GetInt("userid"));
    
    
int iAttacker GetClientOfUserId(hEvent.GetInt("attacker"));
    
    
SetHudTextParams(-1.0, -0.951.0255255255255);
    
    
ShowHudText(iVictim, -1"You got killed by %d"iAttacker);


Last edited by mug1wara; 07-12-2018 at 15:09.
mug1wara is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-12-2018 , 15:01   Re: CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
Reply With Quote #3

Quote:
Originally Posted by mug1wara View Post
PHP Code:
#include <sourcemod>

#pragma semicolon 1

public void OnPluginStart()
{
    
HookEvent("player_death"Event_Death);
}

public 
Action Event_Death(Event hEvent, const char[] sNamebool bDontBroadcast)
{
    
int iVictim GetClientOfUserId(hEvent.GetInt("userid"));
    
    
int iAttacker GetClientOfUserId(hEvent.GetInt("attacker"));
    
    
SetHudTextParams(-1.0, -0.951.0255255255255);
    
    for (
int i 1<= MaxClientsi++)
        
ShowHudText(i, -1"%d Killed %d"iAttackeriVictim);

thanks but i mean, only by the Victim will show the HUD Text: You got killed by: *PLAYER*

i have formulated incorrectly sorry, but this code will be also Help full for others.

Last edited by iskenderkebab33; 07-12-2018 at 15:20.
iskenderkebab33 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Old 07-12-2018 , 15:10   Re: CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
Reply With Quote #4

Updated code above, should fit your benifits
mug1wara is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Old 07-12-2018 , 15:39   Re: CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
Reply With Quote #5

Quote:
Originally Posted by mug1wara View Post
Updated code above, should fit your benifits
thanks! working fine.
iskenderkebab33 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 02:20.


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