AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ham to fakemeta / engine (https://forums.alliedmods.net/showthread.php?t=161994)

gamer99 07-13-2011 16:29

ham to fakemeta / engine
 
Hi ,

I wanna convert this ham to fakemeta

Quote:

RegisterHam(Ham_Player_PreThink, "player", "client_think", 0)
RegisterHam(Ham_Killed, "player", "player_killed", 1)
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
how i will do that and what i need keep in mind while converting ?
(p.s. engine will also do but fakemeta will be better )

Ty,
Gamer99

Doc-Holiday 07-13-2011 16:36

Re: ham to fakemeta / engine
 
why do you think fm is better then ham?

IMO:
Most servers already have a plugin that has turned on the module ham, fm, and engine, and fun... so if your plugin uses those i don't see where the issue is.

but search your answers are in the fourms.

Hunter-Digital 07-13-2011 16:46

Re: ham to fakemeta / engine
 
For player/entity killed and player/entity spawn, ham is easier and better.

For pre/post think I'd recommend client_PreThink since it's already triggered by the engine module on all plugins, even if you don't include it. Making a new pre/post think hook with fakemeta or ham would be pointless.

fysiks 07-13-2011 16:54

Re: ham to fakemeta / engine
 
Quote:

Originally Posted by gamer99 (Post 1510066)
(p.s. engine will also do but fakemeta will be better )

Fakemeta is not always better. It depends on what you are trying to do. For spawn, you should be using Ham regardless. For killed, you should either use ham or DeathMsg depending on what you are doing with it.

gamer99 07-14-2011 04:37

Re: ham to fakemeta / engine
 
okie ..

Need one more clarification . (I am new sorry for disturbing :( )

Suppose i have an event
Quote:

register_event( "DeathMsg", "eventDeath", "a" )


Now will it be better if I catch that event by this thing or will it be better if i use ham function ? (any how )

Arkshine 07-14-2011 05:39

Re: ham to fakemeta / engine
 
Don't think with "is it better than x ?". First, you should know what you want to do exactly, then you could choose the best method for your need. But for that, you need to learn here and there what are the difference, for example, between DeathMsg event and Ham_Killed.

fysiks 07-14-2011 05:54

Re: ham to fakemeta / engine
 
Quote:

Originally Posted by gamer99 (Post 1510381)
Now will it be better if I catch that event by this thing or will it be better if i use ham function ? (any how )

We would appreciate it if you read what we wrote. It depends on what you are trying to do.

gamer99 07-14-2011 06:03

Re: ham to fakemeta / engine
 
https://forums.alliedmods.net/showthread.php?t=161819
I can't code . I am just learning . One of very good man helped me by this code . Just for my learning sake i am asking is it a good method or we can make it better :) .


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

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