AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   fakemeta and fun (https://forums.alliedmods.net/showthread.php?t=316850)

Fuck For Fun 06-13-2019 15:46

fakemeta and fun
 
I keep using fm_ and read guides that are more convenient to use fun, why?

Example:
Code:

public Ham_PlayerSpawn_Post(pPlayer) {
        if(is_user_alive(pPlayer))
        {
                fm_strip_user_weapons(pPlayer);
                fm_give_item(pPlayer, "weapon_knife");
                fm_give_item(pPlayer, "weapon_scout");
                cs_set_user_bpammo(pPlayer, CSW_SCOUT, 10);
               
                g_bFrostSmoke[pPlayer] = true;
                fm_give_item(pPlayer, "weapon_smokegrenade");
               
                fm_give_item(pPlayer, "weapon_flashbang");
                fm_give_item(pPlayer, "weapon_flashbang");
                fm_give_item(pPlayer, "weapon_hegrenade");
                set_pev(pPlayer, pev_armorvalue, 0.0);
        }
}

Code:

        if(pPlayer == g_iPlayer)
                fm_set_rendering(pPlayer, kRenderFxGlowShell, random_num(0, 255), random_num(0, 255), random_num(0, 255), kRenderTransAlpha, 25);
        else
                fm_set_rendering(pPlayer, kRenderFxNone, 0, 0, 0, kRenderNormal, 0);


HamletEagle 06-13-2019 16:21

Re: fakemeta and fun
 
It's not more convenient to use fun, it's better(there's a difference).

Let me ask one question, why are you using fm util in the first place?

Fuck For Fun 06-14-2019 00:48

Re: fakemeta and fun
 
Quote:

Originally Posted by HamletEagle (Post 2655459)
It's not more convenient to use fun, it's better(there's a difference).

Let me ask one question, why are you using fm util in the first place?

I used to use this from past and so I went back to dealing with it so I asked ... I saw some codes that no one uses fm, anyway I would be happy to explain why it is better to use what use / action in everything and what prevents

<VeCo> 06-14-2019 11:52

Re: fakemeta and fun
 
fm stocks use multiple natives

fun uses only 1, under the hood everything is done by the module at once, which has way less overhead than multiple AMXX->module calls, and it is much more efficient/faster

It was an old fad when fakemeta came out and people thought it was the new sliced bread that's gonna replace everything. There's no reason in using it to replicate other modules' functionality.


All times are GMT -4. The time now is 17:20.

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