Raised This Month: $ Target: $400
 0% 

CS:GO HUD player death PROBLEM !!!


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Walgrim
AlliedModders Donor
Join Date: Dec 2015
Location: France
Old 12-10-2017 , 07:03   Re: CS:GO HUD player death PROBLEM !!!
Reply With Quote #4

Try this:
PHP Code:
#include <sourcemod>

static Handle HudText null;

public 
void OnPluginStart() {
  
HudText CreateHudSynchronizer();
  
HookEvent("player_death"OnPlayerDeathEventHookMode_Pre);
}

public 
Action OnPlayerDeath(Handle hEvent, const char[] namebool dontBroadcast) {
  
char text[64];
  
int attacker GetClientOfUserId(GetEventInt(hEvent"attacker"));
  if (
IsValidClient(attacker)) {
    
Format(textsizeof(text), "You killed an ennemy!");
    
SetHudTextParams(1.00.59999.0100025571);
    
ShowSyncHudText(attackerHudTexttext);  
  }
}

stock bool IsValidClient(int client) {
    if (
client <= || client MaxClients || !IsClientInGame(client)) {
        return 
false;
    }
    return 
true;

(Not sure why you want to hold the text during 9999.0 seconds).
__________________
Walgrim is offline
 



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:09.


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