Raised This Month: $ Target: $400
 0% 

[TF2] Hide and create custom death msgs (Top Right Hand Corner)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 08-01-2008 , 15:27   [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #1

Hey does anyone know how to Hide or Create custom death messages as shown here...?



I remember in amxmodx there was a command that was something like CreateDeathMsg(Client, Attacker, Weapon);

I'm looking for something like that, but I've failed to find a command or a way to do it.

Any help would be great; Thanks,
Pink
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 08-01-2008 , 15:46   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #2

Just create and fire a custom player_death event.
bl4nk is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 08-01-2008 , 15:49   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #3

Fire player_death manually with CreateEvent/FireEvent. You can make a wrapper like:

Code:
stock CreateDeathMsg(client, attacker, const String:weapon[], bool:headshot)
{
    new Handle:hPlayerDeath = CreateEvent("player_death", true);
    
    SetEventInt(hPlayerDeath, "userid", GetClientUserId(client));
    SetEventInt(hPlayerDeath, "attacker", GetClientUserId(attacker));
    SetEventString(hPlayerDeath, "weapon", weapon);
    SetEventBool(hPlayerDeath, "headshot", headshot);
    
    FireEvent(hPlayerDeath);
}
That's for CSS, you'll have to look up the player death event in the tf folder in resource/modevents.res and set the right event data.

EDIT: bl4nk beat me.
__________________
Greyscale is offline
DiscoBBQ
Veteran Member
Join Date: Jan 2005
Location: Clemson, South Carolina
Old 08-01-2008 , 16:13   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #4

TY, Karma for both.

& Greyscale, The keyvalues havn't crashed or reset.
Thank you very, very much
__________________
"Every man is guilty of all the good he did not do"
DiscoBBQ is offline
Scuzzy
Senior Member
Join Date: Oct 2007
Old 08-02-2008 , 10:11   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #5

Dumb question: When you create events like this does it trigger other things? For instance if you triggered "game_over" or something, would it actually end the game and restart to a new map? Or just display the game over message and keep playing?

Scuzzy
Scuzzy is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-02-2008 , 10:15   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #6

The latter, events don't trigger anything, they're just a notification that something happened.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 08-02-2008 , 13:07   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #7

Quote:
Originally Posted by Scuzzy View Post
Dumb question: When you create events like this does it trigger other things? For instance if you triggered "game_over" or something, would it actually end the game and restart to a new map? Or just display the game over message and keep playing?

Scuzzy
You can always create the game_end entity and fire it's EndGame input.
bl4nk is offline
Muridias
Member
Join Date: Feb 2008
Old 08-04-2008 , 17:03   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #8

Does everyone see the message or can you filter who can see the event notification?
Muridias is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 08-04-2008 , 17:10   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #9

Everyone sees it.
bl4nk is offline
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 08-06-2008 , 13:01   Re: [TF2] Hide and create custom death msgs (Top Right Hand Corner)
Reply With Quote #10

I think logs and events are seperate, but maybe someone else knows more about that.
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami 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 21:46.


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