Raised This Month: $ Target: $400
 0% 

How to get how a player dies


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sub
Senior Member
Join Date: Nov 2004
Location: Morristown, New Jersey
Old 10-17-2006 , 19:28   How to get how a player dies
Reply With Quote #1

How can I get liek what the player died from, ie from an ak from a glock from an awp?
sub is offline
Send a message via AIM to sub Send a message via MSN to sub
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-17-2006 , 20:07   Re: How to get how a player dies
Reply With Quote #2

Code:
public plugin_init() {      register_event("DeathMsg","event_deathmsg","a"); } public event_deathmsg() {      new weaponName[32];      read_data(4,weaponName,31); }

weaponName would then be "ak47", "m4a1", "worldspawn", etcetera.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
knekter
Senior Member
Join Date: Mar 2004
Location: PA
Old 10-17-2006 , 20:46   Re: How to get how a player dies
Reply With Quote #3

you should do:
Code:
static weaponName[32]; read_data(4, weaponName, 31);
__________________
More updates for Matrix Mod!
knekter is offline
Send a message via AIM to knekter Send a message via MSN to knekter
sub
Senior Member
Join Date: Nov 2004
Location: Morristown, New Jersey
Old 10-17-2006 , 21:16   Re: How to get how a player dies
Reply With Quote #4

Thansk +Karma

edit: How do I maek it so it gives the weapon id. What I want to do with this is when a player dies a certain way, when they spawn it will have a different effect from each type of death.

Last edited by sub; 10-17-2006 at 21:20.
sub is offline
Send a message via AIM to sub Send a message via MSN to sub
Lord_Destros
Veteran Member
Join Date: Jul 2004
Location: With stupid.
Old 10-17-2006 , 21:47   Re: How to get how a player dies
Reply With Quote #5

lol the bottem part of avalanches code

(the code within the DeathMsg)
__________________
Quote:
Originally Posted by Twilight Suzuka
Don't worry m'lord. The turtles day will come.

Last edited by Lord_Destros; 10-17-2006 at 21:55.
Lord_Destros is offline
Send a message via AIM to Lord_Destros
sub
Senior Member
Join Date: Nov 2004
Location: Morristown, New Jersey
Old 10-17-2006 , 21:57   Re: How to get how a player dies
Reply With Quote #6

Okay well I was just a little confused. Thanks to you too.
sub is offline
Send a message via AIM to sub Send a message via MSN to sub
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 10-17-2006 , 22:38   Re: How to get how a player dies
Reply With Quote #7

You could just make a global variable that contains the weapon a user was killed with:
Code:
new killedWith[33][32];
And then on death, save the weapon to that instead:
Code:
read_data(4,killedWith[read_data(2)],31);
Then when a user spawns, do what you want based upon what is in that variable.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 10-18-2006 , 13:59   Re: How to get how a player dies
Reply With Quote #8

note that DeathMsg event is only called in Games that
actually display a Message when a Player dies. For example,
SvenCoop does not.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
sub
Senior Member
Join Date: Nov 2004
Location: Morristown, New Jersey
Old 10-18-2006 , 15:16   Re: How to get how a player dies
Reply With Quote #9

Thanks Again, Yeah the Mod im Working with does use death messages.
sub is offline
Send a message via AIM to sub Send a message via MSN to sub
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 14:18.


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