AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Which prethink? (https://forums.alliedmods.net/showthread.php?t=140872)

bibu 10-17-2010 07:42

Which prethink?
 
I am currently using much modules (engine, ham, fakemeta) in my plugin and wanted to ask which prethink is better? Engines? Fakemetas? or Ham's? It will be used for cs.

PHP Code:

register_forward(FM_PlayerPreThink"PreThink"

PHP Code:

RegisterHam(Ham_Player_PreThink"player""Ham__CBasePlayer_PreThink__Post"true


Vechta 10-17-2010 07:51

Re: Which prethink?
 
Retard search

hleV 10-17-2010 09:38

Re: Which prethink?
 
If Ham's included - Ham.
Else if Engine's included - Engine.
Else if Fakemeta's included - Fakemeta.
Else - include Ham and use it.

That's how I use it for whatever reason.

Exolent[jNr] 10-17-2010 17:39

Re: Which prethink?
 
Quote:

Originally Posted by hleV (Post 1327393)
If Ham's included - Ham.
Else if Engine's included - Engine.
Else if Fakemeta's included - Fakemeta.
Else - include Ham and use it.

That's how I use it for whatever reason.

That's a poor method of deciding.
There's nothing wrong with having all 3 of those modules loaded.

Hunter-Digital 10-18-2010 09:18

Re: Which prethink?
 
AFAIK engine's pre/post think are multi-forwards and they're executed on all plugins anyway, fakemeta and ham create new forwards, that's why they use register_forward()/RegisterHam().

So basically, you could just use engine's way because it's already executed instead of creating a new one via fameketa or ham.

Arkshine 10-18-2010 09:28

Re: Which prethink?
 
Again, all is depending the need, if you need to register/unregister one or severals times at specific moment, or/and of you need to hook pre/post, use either fakemeta/ham. Except that, all are fine and it doesn't matter.

abdul-rehman 10-18-2010 09:48

Re: Which prethink?
 
For ham u need to register them seperately for CZ bots

ConnorMcLeod 10-18-2010 11:16

Re: Which prethink?
 
Engine prethink forward is a multiforward.

hleV 10-18-2010 12:59

Re: Which prethink?
 
Quote:

Originally Posted by Exolent[jNr] (Post 1327862)
That's a poor method of deciding.
There's nothing wrong with having all 3 of those modules loaded.

How is it poor? If I already use Ham - I'll use Ham to register prethink. If I use FM - I'll use FM for prethink too. Why would I need to add a module when I can do the same thing with the module I already use?

bibu 10-18-2010 13:17

Re: Which prethink?
 
Quote:

Originally Posted by Arkshine (Post 1328343)
Again, all is depending the need, if you need to register/unregister one or severals times at specific moment, or/and of you need to hook pre/post, use either fakemeta/ham. Except that, all are fine and it doesn't matter.

Thanks for your helpful answer Arkshine. :wink:


All times are GMT -4. The time now is 10:29.

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