Quote:
Originally Posted by Crusher918
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
__________________