Raised This Month: $32 Target: $400
 8% 

player_death.cfg


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Author Message
felsensprenger
New Member
Join Date: Nov 2005
Old 11-04-2005 , 11:01   player_death.cfg
#1

Hi,
I'm looking for a menu, which is displayed when you die. ( with information about how many health the attacker has and such things, like in StatsXS )

I have Matties Event Script installed and I think with help of this it should be possible.

That's what I've done so far:

player_death.cfg:
es ma_msay 5 event_var(es_username) event_var(es_attackername) killed you with event_var(es_attackerweapon), \nhe still has event_var(es_attackerhealth)HP and event_var(es_attackerarmor)AP

Problems:
- The name of the weapon is displayed in the way: weapon_awp
- one line is missing which is important i think: You died X damage to him.

Thx for your help
felsensprenger is offline
ichthys
Veteran Member
Join Date: Dec 2004
Location: []*[]
Old 11-04-2005 , 12:26  
#2

In class and nothing better to do. BTW this is the wrong forum...
This just tracks heath damage done. you might need 'eventscripts_noisy 1' in your autoexec.cfg so that player_hurt.cfg will fire.

server.cfg
Code:
es_xsetinfo dmg_health 0
es_keygroupcreate damage
player_connect.cfg
Code:
es_keycreate damage event_var(userid)
player_disconnect.cfg
Code:
es_keydelete damage event_var(userid)
player_spawn.cfg
Code:
es_keydelete damage event_var(userid)
es_keycreate damage event_var(userid)
player_hurt.cfg
Code:
es_keygetvalue dmg_health damage event_var(attacker) event_var(userid)
es_math dmg_health + event_var(dmg_health)
es_keysetvalue damage event_var(attacker) event_var(userid) server_var(dmg_health)
player_death.cfg
Code:
es_keygetvalue dmg_health damage event_var(attacker) event_var(userid)
es_setinfo dmg_weapon event_var(es_attackerweapon)
//change the "weapon_" to "with "
es_string dmg_weapon replace weapon_ "with "
es ma_msay 5 event_var(es_username) event_var(es_attackername) killed you server_var(dmg_weapon), \nhe still has event_var(es_attackerhealth)HP and event_var(es_attackerarmor)AP \nYou did server_var(dmg_health) damage to him
__________________
ichthys is offline
felsensprenger
New Member
Join Date: Nov 2005
Old 11-04-2005 , 12:44  
#3

Thank you for your help, it works.
But now I've got two more problems:

The weaponname is in brackets:



The damage you made is not shown correctly, I made 107 damage and he still had 100HP and 100AP, can't be
felsensprenger is offline
BAILOPAN
Join Date: Jan 2004
Old 11-04-2005 , 19:14  
#4

This is HL2/SM Coding, go to mattie's forums for his stuff.
__________________
egg
BAILOPAN is offline
Closed Thread



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


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