Raised This Month: $ Target: $400
 0% 

Define this please! Briefly


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Waleed
Senior Member
Join Date: May 2012
Location: Pakistan
Old 05-15-2012 , 08:57   Define this please! Briefly
Reply With Quote #1

public plugin_init() {
RegisterHam(Ham_Spawn, "player", "fwHamPlayerSpawnPost", 1)
}



HAM_SPAWN ???
PLAYER ????
FWHAMPLAYERSPAWNPOST ????
1 ????
Waleed is offline
Send a message via Skype™ to Waleed
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 05-15-2012 , 09:19   Re: Define this please! Briefly
Reply With Quote #2

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 ).
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.

Last edited by hornet; 05-15-2012 at 09:20.
hornet is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-16-2012 , 03:22   Re: Define this please! Briefly
Reply With Quote #3

Quote:
Originally Posted by hornet View Post
"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.
__________________

Last edited by fysiks; 05-16-2012 at 03:22.
fysiks is offline
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 05-15-2012 , 09:24   Re: Define this please! Briefly
Reply With Quote #4

I wonder why you didn't ask these:
PLUGIN ????
PLUGIN_INIT ????
REGISTERHAM ????
__________________
xPaw is offline
EpicMonkey
buttmonkey
Join Date: Feb 2012
Old 05-15-2012 , 11:38   Re: Define this please! Briefly
Reply With Quote #5

Quote:
Originally Posted by xPaw View Post
I wonder why you didn't ask these:
PLUGIN ????
PLUGIN_INIT ????
REGISTERHAM ????
i lol'ed at this ...
EpicMonkey 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 00:23.


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