Raised This Month: $ Target: $400
 0% 

execute when player dies


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 06-17-2012 , 18:34   execute when player dies
Reply With Quote #1

Alright guys, its a simple one, but i donno how
I want that when a player dies, to execute a part of the code.

is it this one?: http://www.amxmodx.org/funcwiki.php?go=func&id=898
if yes, why is there killer, victim and such
also i want it to work when also he suicides and such, in the function comments, it says it wont work when someone suicide

isnt there a function that works like client_putinserver(id)
i mean a function that i pass through it the id of the player

thanks in advance

Last edited by n0br41ner; 06-17-2012 at 18:37.
n0br41ner is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 06-17-2012 , 18:47   Re: execute when player dies
Reply With Quote #2

Take a look at this.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 06-17-2012 , 18:54   Re: execute when player dies
Reply With Quote #3

i really dont get it
so i should use it like this?

Code:
register_event("DathMsg", "myfunction")
if not can you please give a small sample?
thanks again

oh and btw where can i see all the messages that can be registered? (for future use)

Last edited by n0br41ner; 06-17-2012 at 18:55.
n0br41ner is offline
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
n0br41ner
Senior Member
Join Date: May 2012
Location: Planet Earth
Old 06-17-2012 , 19:07   Re: execute when player dies
Reply With Quote #5

thank you a lot now i understood
n0br41ner is offline
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 06:14.


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