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

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


Post New Thread Reply   
 
Thread Tools Display Modes
KoST
Senior Member
Join Date: Jul 2005
Old 05-11-2006 , 15:42  
Reply With Quote #11

thx, v3x [updated]
__________________
KoST is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-11-2006 , 16:01  
Reply With Quote #12

Nice!
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
organizedKaoS
Senior Member
Join Date: Feb 2006
Old 05-12-2006 , 03:40  
Reply With Quote #13

So these are basically some engine functions converted to fakemeta, yes?

If so, good job.

Now if only it were easier to learn how to convert all other engine funcs to fakemeta.
organizedKaoS is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-12-2006 , 04:26  
Reply With Quote #14

This should work. If not, lemme know:
Code:
#include <engine_const> stock fm_drop_to_floor(entity) {     return engfunc(EngFunc_DropToFloor , entity); } stock fm_point_contents(const Float:point[3]) {     return engfunc(EngFunc_PointContents , point); } stock fm_remove_entity(entity) {     return engfunc(EngFunc_RemoveEntity , entity); } stock fm_remove_entity_name(const classname[]) {     new ent = -1;     while((ent = fm_find_ent_by_class(ent , classname)) != 0)         fm_remove_entity(ent);     return; } stock fm_find_ent_by_model(const classname[] , const model[]) {     new ent = -1;     while((ent = fm_find_ent_by_class(ent , classname)) != 0) {         new szModel[84];         pev(ent , pev_model , szModel , 83);         if(equal(model , szModel)             return ent;     }     return -1; }
__________________
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
VEN
Veteran Member
Join Date: Jan 2005
Old 05-12-2006 , 12:24  
Reply With Quote #15

Update.

Code:
fm_find_ent_by_model(index, const class[], const model[]) fm_find_ent_in_sphere(index, const Float:origin[3], Float:radius) fm_find_ent_by_edict(index, value, type = pev_owner) fm_get_user_weapon_entity(index, weapon = 0) fm_kill_entity(index) bool:fm_strip_user_gun(index, wid = 0, const wname[] = "")

fm_strip_user_gun is a port of my strip_user_gun function (slightly modified) which uses some other fm_* functions from the list above.
You can test this and other functions using fakemeta_util_test.sma plugin which can be found at the first post of this thread.

Also i've added a fm_is_in_viewcone note and made insignificant change in this function.


Now replies.

v3x: Yes, fm_find_ent_by_* functions works not exactly but in very similar way as in engine module. And thanks for the contributions, will add that in next edition.

Greenberet: :)

Cheap_Suit: thanks!

organizedKaoS: Not only. Currently we have 2 HLSDK functions, 4 my custom functions and 4 engine-like functions.
VEN is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-14-2006 , 11:38   Hurray!
Reply With Quote #16

I'm pleased to announce that the "Fakemeta Utilities" is ready to be the part of the AMXX default package! :o)

Currently nearly all what could be ported is ported from engine module to the "Fakemeta Utilities" including engine's stock functions!
Nearly all fun module natives has also been ported.
All compilation issues has also been fixed.

Also i'v done the following custom functions:
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(index, pev_field, value) fm_find_ent_by_flags(index, pev_field, flags) 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(ent, boxent) Float:fm_boxents_distance(boxent1, boxent2) fm_get_user_weapon_entity(id, wid = 0) fm_kill_entity(index) bool:fm_strip_user_gun(index, wid = 0, const wname[] = "")

This obviously is the last noticeable update.
But you still can contribute/suggest new functions.
VEN is offline
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 05-14-2006 , 12:23  
Reply With Quote #17

Should use #defines, not stocks. Stocks add another function call; #define is direct sub, and thus faster.

Like this:
Attached Files
File Type: inc engine_to_fm_const.inc (465 Bytes, 389 views)
File Type: inc engine_to_fm.inc (7.6 KB, 387 views)
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
VEN
Veteran Member
Join Date: Jan 2005
Old 05-14-2006 , 12:56  
Reply With Quote #18

I think you didn't get the idea. Fakemeta Utilities is the functions which provides the "pseudo" functionality for the fakemeta module. Like engine_const does for the engine but FMU is much more functional.
VEN is offline
Cheap_Suit
Veteran Member
Join Date: May 2004
Old 05-14-2006 , 13:01  
Reply With Quote #19

Nice!
__________________
HDD fried, failed to backup files. Sorry folks, just don't have free time anymore. This is goodbye.
Cheap_Suit is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 05-14-2006 , 13:18  
Reply With Quote #20

Nice. I see that you've got a lot of them. You should add some credits for the people who have contributed
__________________
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 04:30.


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