Raised This Month: $51 Target: $400
 12% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Dancing Bread
BANNED
Join Date: Aug 2006
Location: 714 cuz
Old 09-01-2006 , 03:11   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #71

ahhaha yeah it was delted . and no thats cool thanks VEN . I think the update is better . I ll use it on my mod
Dancing Bread is offline
Dancing Bread
BANNED
Join Date: Aug 2006
Location: 714 cuz
Old 09-02-2006 , 07:21   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #72

Ok VEN I have a new problem I liked this util pack so much i was switching over functions from other modules(plugins), I was switching the fun fucntions i had . and i went to compile it and it wont let me use the
Code:
fm_set_user_rendering(id)

It says that it is undefined symbol . but when i had
Code:
fm_set_rendering(id)

it would compile . I was wondering if that is a valid way to do it ? If so ill switch it back to the fm_set_user_rendering
thanks VEN!



EDIT : ALSO VEN , I was wondering if you could port
Code:
set_user_footsteps(index , <0|1>)  //// 0 is normal 1 is silent
becasue this is the only fucntion left from FUN thats you hadnt ported to the util yet . I wanted to use only fakemeta_util instead of a bunch of dif modules

Last edited by Dancing Bread; 09-02-2006 at 07:59.
Dancing Bread is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 09-02-2006 , 12:35   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #73

fm_set_user_rendering and fm_set_rendering is absolutely the same functions
fm_set_user_rendering was represented as a macro that redirect call to the fm_set_rendering. The problem was that the macro doesn't support optional parameters. So when not all parameters is passed macro wasn't recognized. I solved this by converting macro into the stock function.

I didn't included footsteps functions because it can't be stored into the single function. Just paste the code below into your plugin and then use fm_set_user_footsteps and fm_get_user_footsteps functions, the functionality is the same.

Code:
#define STANDARDTIMESTEPSOUND 400 new bool:g_silent[33] fm_set_user_footsteps(index, set = 1) {         if (set) {                                set_pev(index, pev_flTimeStepSound, 999)                 g_silent[index] = true         }         else {                 set_pev(index, pev_flTimeStepSound, STANDARDTIMESTEPSOUND)                 g_silent[index] = false         }         return 1 } fm_get_user_footsteps(index) {         return g_silent[index] } public plugin_init() {         register_forward(FM_PlayerPreThink, "forward_player_prethink") } public forward_player_prethink(index) {         if (g_silent[index])                 set_pev(index, pev_flTimeStepSound, 999) } public client_disconnect(index) {         g_silent[index] = false }
VEN is offline
Dancing Bread
BANNED
Join Date: Aug 2006
Location: 714 cuz
Old 09-02-2006 , 13:55   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #74

sweeet . your the best VEN! now i can drop the fun module from my code completly and just use the fm_util GJ! +karma
Dancing Bread is offline
Dancing Bread
BANNED
Join Date: Aug 2006
Location: 714 cuz
Old 09-03-2006 , 20:15   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #75

hey can you show me how to set_user_money to 0 using the fakemeta util ?this will let me remove cstrike form my code too . im trying to optimize my code by cutting out as many modules as posable.
thanks ven
Dancing Bread is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 09-03-2006 , 20:24   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #76

Quote:
Originally Posted by Dancing Bread View Post
hey can you show me how to set_user_money to 0 using the fakemeta util ?this will let me remove cstrike form my code too . im trying to optimize my code by cutting out as many modules as posable.
thanks ven
Taking out as many modules as possible doesn't optimize it. Can you know what modules the user will be running?
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
Dancing Bread
BANNED
Join Date: Aug 2006
Location: 714 cuz
Old 09-03-2006 , 20:29   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #77

ok but if my plugin has to call to that module , it will be more of a load then if it didnt call to the module , wether the user is using it or not .
Dancing Bread is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 09-04-2006 , 02:46   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #78

You can change the user money with the fakemeta with near the same efficiency, look into my "Buy a Helmet" plugin.
(note: don't afraid large block of defines, it's preprocessed so it will not affect on performance).
VEN is offline
Dancing Bread
BANNED
Join Date: Aug 2006
Location: 714 cuz
Old 09-04-2006 , 03:36   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #79

ok well can you tell me who is right , me or Hawk? its more of a load for a plugin to call to a module if tis not necesary right ? so by cutting out other modules im optimizing my script , and cutting down on some possable lag .
Dancing Bread is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 09-04-2006 , 04:14   Re: [INC] Fakemeta Utilities ready to be the AMXX default!
Reply With Quote #80

In the whole it's a complicated question. For example with the short functions like fm_set_user_gravity FMU is the winner over FUN because efficiency is the same but FUN has an internal forward hooks for some of his natives which slows module down. The same goes for Cstrike. It may be not a bad idea to use FM instead of Cstrike to change some of the player private properties like money, deaths, ammo etc. But for most coders it doesn't worth to port such natives to the FM.

By disabling modules you can't optimize your script. You can increase AMXX runtime performance. But again if you are not understand what would be more efficient in the different situations you probably shouldn't blindly use FM instead of bunch of other modules. So Hawk's "hint" was reasoned.

Also not the last role play the fact of how often you call your function. So for example if you create some armoury entities only at the map startup, you shouldn't bother that fm_set_kvd is a bit slover than DispatchSpawn.

In the most cases using FMU will not hit the performance so you shouldn't bother, but you should also undersant what you are doing.

Last edited by VEN; 09-04-2006 at 04:43.
VEN 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 17:03.


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