Raised This Month: $ Target: $400
 0% 

About register_event("DeathMsg")


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 04-26-2010 , 00:10   About register_event("DeathMsg")
Reply With Quote #1

Code:
public plugin_init() 
{ 
    register_event("DeathMsg","event_death","a") 
}
When "public event_death() ", it only get the event of death which is the killer kill someone by weapons ?
In other words, if the killer kill someone by skills of warcraft3, the "public event_death() " don`t consider this kill as a death_event ?

My question is : how should it to get the event of death which is the killer kill someone by skills such as skills of warcraft3 ?
Thanks
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.
epic . is offline
Send a message via ICQ to epic .
NiQu
Veteran Member
Join Date: Nov 2009
Old 04-26-2010 , 01:06   Re: About register_event("DeathMsg")
Reply With Quote #2

PHP Code:
public Event_DeathMsg()
{
    
//Get the killer
    
new killer read_data(1);
    
    
//Get the victim
    
new victim read_data(2);

EDIT: You will have to modify WC3 if u want that, the above is how you get the killer and the victim.
__________________
My Projects
  • RoTAPI V0.0.1 ------- Private
    • Progress - [||||||||||]
  • CashMod V0.0.6 ----- Public
    • Progress - [||||||||||]
  • CashMod V0.0.7 ----- Public
    • Progress - [||||||||||]
NiQu is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 04-26-2010 , 01:17   Re: About register_event("DeathMsg")
Reply With Quote #3

I've never scripted or know anything about WC3. Do some testing for yourself to see what happens in the DeathMsg event.

DeathMsg
PHP Code:
register_event"DeathMsg" "DeathMsgEvent" "a" );

public 
DeathMsgEvent()
{
     new 
iKiller read_data);
     new 
iVictim read_data);
     new 
iIsHeadshot read_data);
     new 
szWeapon20 ]; read_dataszWeapon charsmaxszWeapon ) );
     
     
client_printprint_chat "%d %d %d %s" iKiller iVictim iIsHeadshot szWeapon );

__________________
Bugsy is offline
epic .
Senior Member
Join Date: Oct 2009
Location: China
Old 04-26-2010 , 02:11   Re: About register_event("DeathMsg")
Reply With Quote #4

I have tested before I post this thread..
register_event("DeathMsg","event_death","a") don`t consider kill by skills as a death_event
__________________
Quote:
Destinies in my AWP sight are all alike;
Destinies out of my AWP sight in its own way.
epic . is offline
Send a message via ICQ to epic .
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 01:28.


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