AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Fakemeta and Ham (https://forums.alliedmods.net/showthread.php?t=171402)

edgaras85 11-05-2011 13:57

Fakemeta and Ham
 
In one plugin i have all fakemeta and only when player respawning and dieing i use Ham hamsandwich
Should i use All fakemeta like :
PHP Code:

register_forwardFM_Spawn"fw_PlayerSpawn")
 
register_forwardFM_ClientKill"fw_PlayerKilled"

?

Or use
PHP Code:

RegisterHam(Ham_Killed"player""killed")
 
RegisterHam(Ham_Spawn"player""spawn"

And if two modules will it be that
efficient?

Emp` 11-05-2011 14:35

Re: Fakemeta and Ham
 
Use the one you are more comfortable with.

Note that both of the those forwards are not identical at all.

FM_Spawn - called when any entity spawns
FM_ClientKill - called when player uses the kill command in console

Ham_Killed - called when the specified entity class is killed
Ham_Spawn - called when the specified entity class is spawned

edgaras85 11-05-2011 14:39

Re: Fakemeta and Ham
 
Quote:

Originally Posted by Emp` (Post 1590730)
Use the one you are more comfortable with.

Note that both of the those forwards are not identical at all.

FM_Spawn - called when any entity spawns
FM_ClientKill - called when player uses the kill command in console

Ham_Killed - called when the specified entity class is killed
Ham_Spawn - called when the specified entity class is spawned

Oh thanks i was using fakemeta for player :P
Then need to use Ham because fakemeta like you explained called when player use kill command and i can't detect when player killed :)
Thanks
P.S. I thought they are identical ;)


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

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