Raised This Month: $ Target: $400
 0% 

execute when player dies


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
claudiuhks
Yam Inside®™℠
Join Date: Jan 2010
Location: Living Randomly
Old 06-17-2012 , 19:03   Re: execute when player dies
Reply With Quote #4

Code:
public plugin_init( )   register_event( "DeathMsg", "CallbackForward", "a" /* It's globaly */, "1!0" /* Killer is not null */ );   /* Killer is first argument which is byte though */   /* Then 1 will be not equal with 0 when executing CallbackForward */ public CallbackForward( /* Null argument */ ) {   static iKiller;   static iVictim;   static iHeadshot;   static cWeapon[ 24 ];   iKiller = read_data( 1 ); /* 1 = Killer */   iVictim = read_data( 2 ); /* 2 = Victim */   iHeadshot = read_data( 3 ); /* 3 = Headshot */   read_data( 4, cWeapon, 23 ); /* 4 = Weapon name */   /*     So, iKiller will be every time higher than zero, as we set the condition in register_event.     That means every time we will have a connected killer which is player.   */ } /*   Type on Google "HL1 Game Events Wiki" to see the full list of events and their bytes, strings, coords, et cetera. */
__________________

Last edited by claudiuhks; 06-17-2012 at 19:04.
claudiuhks is offline
Send a message via MSN to claudiuhks Send a message via Yahoo to claudiuhks Send a message via Skype™ to claudiuhks
 



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 06:14.


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