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
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 12-14-2007 , 20:44   Re: How to detect a player suicide, like a fall?
Reply With Quote #3

Code:
public client_death( killer, victim, wpnindex, hitplace, TK ) {     if( !killer && !wpnindex )         // falled }


or using event :


Code:
public pluglin_init() {     register_event( "DeathMsg", "eDeathMsg", "a" ); } public eDeathMsg() {     new iKiller = read_data(1);     new iVictim = read_data(2);         static sWeapon[16];     read_data( 4, sWeapon, sizeof( sWeapon ) - 1 );                 if( iKiller == iVictim && equal( sWeapon, "world", 5 ) )         // suicide             if( !iKiller && equal( sWeapon, "world", 5 ) )         // falled             if( !iKiller && equal( sWeapon, "door", 4 ) )         // door             if( !iKiller && equal( sWeapon, "trigger_hurt", 12 ) )         // trigger }
__________________

Last edited by Arkshine; 12-14-2007 at 21:11.
Arkshine 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 11:08.


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