Raised This Month: $ Target: $400
 0% 

damage event


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-22-2007 , 13:52   Re: damage event
Reply With Quote #5

Quote:
Originally Posted by Crusher918 View Post
Does any1 know what the arguments in the code means?

Code:
register_event("Damage","TGdamage","b","2!0","3=0","4!0")
i know i shouldnt be using it if i dont know but it did what i wanted to do in the plugin

any help would be appreciated
2!0 means second (2) parameter must NOT contain null (0)
3=0 means third (3) parameter have to be null (0)
4!0 means fourth (4) parameter must NOT contain null (0)

btw.: param 1 is alway the type of the message for you it would be "Damage"...

example of deathmsg:
Code:
stock make_deathMsg(Killer, Victim, const weapon[])
{
    //message_begin starts a message.  NEVER start two messages at once.
    //MSG_ALL means send the message to everyone
    //get_user_msgid returns the id of a message name
    //{0,0,0} is the origin vector - not used here
    //0 is the target - no specific target here
    message_begin(MSG_ALL, get_user_msgid("DeathMsg"), {0,0,0}, 0) 
    write_byte(Killer)
    write_byte(Victim)
    write_string(weapon)
    message_end()
}
For further information look here: http://www.amxmodx.org/doc/source/sc...ced.htm#events
AND look here: http://forums.alliedmods.net/showthread.php?p=65983

greetz regalis
__________________

Last edited by regalis; 04-22-2007 at 13:55.
regalis 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 06:36.


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