AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   About DeathMsg (https://forums.alliedmods.net/showthread.php?t=273371)

Chihuahuax 10-18-2015 01:00

About DeathMsg
 
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)

Bugsy 10-18-2015 14:45

Re: About DeathMsg
 
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.

Chihuahuax 10-18-2015 19:13

Re: About DeathMsg
 
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

Bugsy 10-18-2015 19:20

Re: About DeathMsg
 
That's because it's a public message. Explain what you are trying to do.

Chihuahuax 10-18-2015 19:32

Re: About DeathMsg
 
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)

wickedd 10-18-2015 23:48

Re: About DeathMsg
 
Just so you know, there are other ways to hook players death. Such as Ham_Killed and client_death.


All times are GMT -4. The time now is 22:04.

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