[TUT] Fakemeta General Usage
This is a duplicate of the article I made in AMWiki at this URL:
http://wiki.tcwonline.org/index.php/...28AMX_Mod_X%29 Current FakeMeta and Old FakeMeta used to be an internal mini-metamod inside AMX Mod X. This was removed in 1.50, and now only the module remains. The module is an entirely different concept, which extends Metamod HL1 programming powers to scripts. About FakeMeta is an extremely powerful module for AMX Mod X that effectively allows you to write Metamod plugins in Pawn. Unlike Engine, FakeMeta uses no CPU if it is not told to do anything (other than to exist). For this reason, it is recommended to use FakeMeta over Engine. There is nothing in Engine that is not in FakeMeta -- while some functionality might be less abstracted, it is still achievable, and usually with more flexibility. Engine vs. FakeMeta Comparison between Engine and FakeMeta: FakeMeta: Code:
Code:
General Functionality FakeMeta also allows you to do other things, such as retrieve private data (using pev, set_pev / get_pdata_int, get_pdata_float, get_pdata_string, set_pdata_int, set_pdata_float, set_pdata_string), forcing DLL functions to be executed, as well as call Engine (not the module) functions. Entvars It is easy to read entvars in FakeMeta, however it can sometimes cause problems if not done correctly (which is why Engine is more commonly used). Entvars are variables in a player's edict structure (an edict is the basis for an entity). Here is an example of how to retrieve the armor entvar from an entity in FakeMeta: Code:
In DLLs and the Engine, there are functions that are called when certain events happen. These can be forced to be called through FakeMeta. Here is a general example: Code:
Return Values There are 4 return values in FakeMeta:
Constants / General A list of general constants and usage can be found on this page: http://www.amxmodx.org/funcwiki.php?go=module&id=16 |
Re: Fakemeta General Usage
nice hawk this is helpful and has helped me to achieve a higher understanding of something i didn't understand thank you
/bow |
Re: Fakemeta General Usage
Quote:
|
Re: Fakemeta General Usage
So in essence, anything that can be called in engine.inc can be called from fakemeta?
What would be an example of a killblocking function that uses fakemeta instead of client_kill(id)? |
Re: Fakemeta General Usage
Everything and more.
|
Re: Fakemeta General Usage
Quote:
Code:
// in plugin_init: Code:
public ForwardClientKill(id) |
Re: Fakemeta General Usage
Fakemeta is quite strange indeed...
|
Re: Fakemeta General Usage
Don't spam.
|
Re: Fakemeta General Usage
Quote:
|
Re: Fakemeta General Usage
im not sure if this is the right place but is it possible somehow register a touch like in engine or something
|
All times are GMT -4. The time now is 11:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.