Raised This Month: $ Target: $400
 0% 

How to detect a player suicide, like a fall?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
waage
Junior Member
Join Date: Dec 2007
Location: Sao Paulo/Brazil
Old 12-14-2007 , 20:20   How to detect a player suicide, like a fall?
Reply With Quote #1

I'm trying to create an event when the user commits a suicide, like HE explosion, falls, etc.

Changing the client_death function (miscstats.sma), I have already detected when he dies of a HE explosion, with this code:

Code:
 
if (killer == victim)
{
 new victim_name[32]
 get_user_name(victim, victim_name, 31)
 set_hudmessage(255, 0, 255, -1.0, 0.35, 0, 6.0, 6.0, 0.5, 0.15, -1)
 ShowSyncHudMsg(0, g_center1_sync, "%s has lost the will to live...", victim_name)
 play_sound("misc/suicide")
}
But I can't find how to detect when the player dies of a fall. Does anybody know?

Last edited by waage; 12-14-2007 at 20:24.
waage is offline
 


Thread Tools
Display Modes

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 11:08.


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