Raised This Month: $32 Target: $400
 8% 

[INC] Fakemeta Utilities [last update: 2007/01/08]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
VEN
Veteran Member
Join Date: Jan 2005
Old 05-11-2006 , 13:58   [INC] Fakemeta Utilities [last update: 2007/01/08]
Reply With Quote #1

Using this is HIGHLY NOT RECOMMENDED!!! Stick with using Engine, Fun, CStrike, Ham, etc. They do all these functions much quicker and more efficiently. You are only teaching yourself bad coding habits by using these.


"Fakemeta Utilities" is a library of functions for the Fakemeta module. It includes:
  • almost all engine/fun natives (represented as a marcos/stocks)
  • engine's stock functions
  • the below custom functions
PHP Code:
bool:fm_is_in_viewcone(index, const Float:point[3])
bool:fm_is_visible(index, const Float:point[3])
fm_set_kvd(entity, const key[], const value[], const class[] = "")
fm_find_ent_by_integer(indexpev_fieldvalue)
fm_find_ent_by_flags(indexpev_fieldflags)
Float:fm_distance_to_box(Float:point[3], Float:mins[3], Float:maxs[3])
Float:fm_boxes_distance(Float:mins1[3], Float:maxs1[3], Float:mins2[3], Float:maxs2[3])
Float:fm_distance_to_boxent(entboxent)
Float:fm_boxents_distance(boxent1boxent2)
fm_get_user_weapon_entity(idwid 0)
fm_kill_entity(index)
bool:fm_strip_user_gun(indexwid 0, const wname[] = "")
bool:fm_transfer_user_gun(index1index2wid 0, const wname[] = "")
Float:fm_distance_to_floor(index)
bool:fm_is_ent_visible(indexentity)
fm_get_aim_origin(indexFloat:origin[3])
bool:fm_get_user_longjump(index)
fm_set_user_longjump(indexbool:longjump truebool:tempicon true)
bool:fm_get_user_suit(index)
fm_set_user_suit(indexbool:suit truebool:sound true)
fm_cs_remove_decals(index 0)
bool:fm_is_ent_classname(index, const classname[])
fm_user_kill(indexflag 0)
Float:fm_get_view_angle_diff(index, const Float:point[3])
fm_get_weaponbox_type(entity)
fm_remove_weaponbox(entity
  • fm_is_in_viewcone and fm_is_visible ported from HLSDK/engine module [thanks to PM for his XS Library and to Damaged Soul for the FOV dotproduct method]
  • fm_create_entity ported by KoST
  • fm_drop_to_floor, fm_remove_entity, fm_point_contents, fm_remove_entity_name ported by v3x
  • fm_set_kvd are based on Basic-Master's set_keyvalue
  • fm_distance_to_floor originally by P34nut, improved
  • fm_get_aim_origin ported from AMXX's core get_user_origin(..., 3) (suggested by Greenberet)
  • fm_user_kill ported from AMXX's core user_kill (scoreboard update fix)
Feel free to contribute/suggest new functions and report any errors/issues.

Tired of fatal error 100: cannot read from file: "fakemeta_util" reports? Here is the solution for you!
Code:
#tryinclude <fakemeta_util>
 
#if !defined _fakemeta_util_included
        #assert Fakemeta Utilities function library required! Read the below instructions:   \
                1. Download it at forums.alliedmods.net/showthread.php?t=28284   \
                2. Put it into amxmodx/scripting/include/ folder   \
                3. Compile this plugin locally, details: wiki.amxmodx.org/index.php/Compiling_Plugins_%28AMX_Mod_X%29   \
                4. Install compiled plugin, details: wiki.amxmodx.org/index.php/Configuring_AMX_Mod_X#Installing
#endif
Note: fakemeta_util_171.zip is a version for AMX Mod X v1.71. I stopped updating this version so it is not include some new functions/cnages/fixes/etc. You can try to perform a "backward upgrade" using the regular version, but i can't guarantee a full compatibility.
Attached Files
File Type: inc fakemeta_util.inc (24.4 KB, 9763 views)
File Type: zip fakemeta_util_171.zip (12.1 KB, 9055 views)

Last edited by YamiKaitou; 02-11-2013 at 19:28.
VEN is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-11-2006 , 14:56  
Reply With Quote #2

Aren't these already amxmodx natives?
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 05-11-2006 , 15:00  
Reply With Quote #3

yes but engine module...
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 05-11-2006 , 15:26  
Reply With Quote #4

Quote:
Originally Posted by Greenberet
yes but engine module...
then why do then have to be in FM to?
wouter is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-11-2006 , 15:30  
Reply With Quote #5

For people who like to use FM instead of Engine.

Do these fm_find_ent_by functions work just like Engine's?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Zenith77
Veteran Member
Join Date: Aug 2005
Old 05-11-2006 , 15:31  
Reply With Quote #6

Because FM > Engine (uses less resources, but yet has more power)
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 is offline
wouter
Senior Member
Join Date: Feb 2005
Location: Belgium
Old 05-11-2006 , 15:32  
Reply With Quote #7

Quote:
Originally Posted by Zenith77
Because FM > Engine (uses less resources, but yet has more power)
but i read some were that with fakemeta you can **** your server if you use it wrong...
wouter is offline
KoST
Senior Member
Join Date: Jul 2005
Old 05-11-2006 , 15:38  
Reply With Quote #8

Code:
stock fm_create_entity(const szClassname[]) {     new classname = engfunc(EngFunc_AllocString, szClassname)     new ent_id = engfunc(EngFunc_CreateNamedEntity,classname)     return ent_id }

[edit] typ0 fixed !
__________________
KoST is offline
Greenberet
AMX Mod X Beta Tester
Join Date: Apr 2004
Location: Vienna
Old 05-11-2006 , 15:39  
Reply With Quote #9

Quote:
Originally Posted by wouter
Quote:
Originally Posted by Zenith77
Because FM > Engine (uses less resources, but yet has more power)
but i read some were that with fakemeta you can **** your server if you use it wrong...
well, just dont use it wrong

other example from the real life:
tnt: you can use it right if you use it in mines.
you can use it wrong if you use it in an war.
Greenberet is offline
Send a message via ICQ to Greenberet Send a message via MSN to Greenberet
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-11-2006 , 15:40  
Reply With Quote #10

KoST, you have a small typo: zsClassname
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x 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 12:40.


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