Raised This Month: $ Target: $400
 0% 

About DeathMsg


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-18-2015 , 01:00   About DeathMsg
Reply With Quote #1

What exactly is the difference between
PHP Code:
register_event("DeathMsg""Death""a"
and
PHP Code:
register_event("DeathMsg""Death""b"
?

I only know that a=global and b=specified
Its kinda risky if I change the flag without knowing the consequences (dont ask me why I want to change it, its necessary for my plugin)

Last edited by Chihuahuax; 10-18-2015 at 01:03.
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-18-2015 , 14:45   Re: About DeathMsg
Reply With Quote #2

http://www.amxmodx.org/api/amxmodx/register_event

Something like DeathMsg is sent to everyone so it uses the "a" flag. While the Money or CurWeapon events are specific to a player so they are registered with the "b" flag.
__________________

Last edited by Bugsy; 10-18-2015 at 14:48.
Bugsy is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-18-2015 , 19:13   Re: About DeathMsg
Reply With Quote #3

So far I've only seen ppl using flag 'a' for DeathMsg
But I have to use flag 'b' in order to make the plugin function "properly"
Hope it doesnt takes up high CPU usage or something else
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-18-2015 , 19:20   Re: About DeathMsg
Reply With Quote #4

That's because it's a public message. Explain what you are trying to do.
__________________

Last edited by Bugsy; 10-18-2015 at 19:20.
Bugsy is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 10-18-2015 , 19:32   Re: About DeathMsg
Reply With Quote #5

Plugin = golden ak47
Using flag 'a' : golden ak47 dropped as a normal ak47 when owner dies
Using flag 'b' : dropped as a golden ak47 (which i want it to be)
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
wickedd
Veteran Member
Join Date: Nov 2009
Old 10-18-2015 , 23:48   Re: About DeathMsg
Reply With Quote #6

Just so you know, there are other ways to hook players death. Such as Ham_Killed and client_death.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd 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 22:04.


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