AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Define this please! Briefly (https://forums.alliedmods.net/showthread.php?t=185291)

Waleed 05-15-2012 08:57

Define this please! Briefly
 
public plugin_init() {
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
}



HAM_SPAWN ???
PLAYER ????
FWHAMPLAYERSPAWNPOST ????
1 ????

hornet 05-15-2012 09:19

Re: Define this please! Briefly
 
hamsandwich is the module that your using to "hook" or "catch" the event when the player spawns.

PHP Code:

RegisterHamHam_Spawn"player""fwHamPlayerSpawnPost"

Ham_Spawn - This is the event that you want to hook.
"player" - This is the entity which you want to hook the event for. You've hooked it for players.
"fwHamPlayerSpawnPost" - This is the name that you've given to the function which will be "called" or "executed" when your event takes place.
1 - This means that you've chosen to hook or catch the event just after it occurs ( Also known as "Post" ). If you were to put a 0, then it would be before the event occurs ( Also known as "Pre" ). In this scenario you would not do that, because you can not do anything to a player while they're dead ( Only in advanced circumstances ).

xPaw 05-15-2012 09:24

Re: Define this please! Briefly
 
I wonder why you didn't ask these:
PLUGIN ????
PLUGIN_INIT ????
REGISTERHAM ????

EpicMonkey 05-15-2012 11:38

Re: Define this please! Briefly
 
Quote:

Originally Posted by xPaw (Post 1709361)
I wonder why you didn't ask these:
PLUGIN ????
PLUGIN_INIT ????
REGISTERHAM ????

i lol'ed at this ...

fysiks 05-16-2012 03:22

Re: Define this please! Briefly
 
Quote:

Originally Posted by hornet (Post 1709358)
"player" - This is the entity class (defined as "classname" in the entity info) which you want to hook the event for. You've hooked it for players.

Fixed.


All times are GMT -4. The time now is 00:23.

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