Raised This Month: $71 Target: $400
 17% 

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
Location: de_alliedmods
Old 07-12-2018 , 11: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 18:34.
iskenderkebab33 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Location: Not your business.
Old 07-12-2018 , 13: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);

__________________
Taking requests, add me on Steam.

People make themselves understood in a way, others understand in another.

Last edited by mug1wara; 07-12-2018 at 16:09.
mug1wara is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Location: de_alliedmods
Old 07-12-2018 , 16: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 16:20.
iskenderkebab33 is offline
mug1wara
AlliedModders Donor
Join Date: Jun 2018
Location: Not your business.
Old 07-12-2018 , 16:10   Re: CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
Reply With Quote #4

Updated code above, should fit your benifits
__________________
Taking requests, add me on Steam.

People make themselves understood in a way, others understand in another.
mug1wara is offline
iskenderkebab33
Senior Member
Join Date: Jun 2018
Location: de_alliedmods
Old 07-12-2018 , 16: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 21:46.


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