AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Solved CS:GO Show HUD Text above Crosshair Killed by: "PLAYER" (https://forums.alliedmods.net/showthread.php?t=309060)

iskenderkebab33 07-12-2018 10:26

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

mug1wara 07-12-2018 12:57

Re: CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
 
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);



iskenderkebab33 07-12-2018 15:01

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

Originally Posted by mug1wara (Post 2603164)
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.

mug1wara 07-12-2018 15:10

Re: CS:GO Show HUD Text above Crosshair Killed by: "PLAYER"
 
Updated code above, should fit your benifits

iskenderkebab33 07-12-2018 15:39

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

Originally Posted by mug1wara (Post 2603184)
Updated code above, should fit your benifits

thanks! working fine.


All times are GMT -4. The time now is 06:59.

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