AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Explain] register_event (https://forums.alliedmods.net/showthread.php?t=237126)

ezio_auditore 03-18-2014 12:17

[Explain] register_event
 
To hook player damage, i saw this on a tutorial
PHP Code:

public plugin_init(){
.
.
.
register_event("Damage""funcName"/*something like "2!0" etc*/

so, can anyone explain what exactly are 'things like "2!0"'

YamiKaitou 03-18-2014 12:20

Re: [Explain] register_event
 
https://hg.alliedmods.net/amxmodx-ce...xmodx.inc#l141

ezio_auditore 03-18-2014 23:41

Re: [Explain] register_event
 
That was a pretty long page
PHP Code:

public plugin_init(){
          .
          .
          .
          
register_event("Damage""PlayerTookDamage""b""2!0""3=0""4!0")


I am still confused what "b", "2!0", "3=0", "4!0" means...
:shock:

YamiKaitou 03-19-2014 06:23

Re: [Explain] register_event
 
I sent you to the function header. Try reading just the comment block I showed you

DavidJr 03-19-2014 06:27

Re: [Explain] register_event
 
Try to look into amxmodx.org
http://www.amxmodx.org/funcwiki.php?...vent&go=search

ezio_auditore 03-19-2014 10:23

Re: [Explain] register_event
 
ah.
thanks
it means the second parameter is not 0, 3rd parameter is 0, 4th parameter is not 0


All times are GMT -4. The time now is 05:56.

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