AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Whats Better: FUN, or FAKEMETA (https://forums.alliedmods.net/showthread.php?t=171074)

MiloSx7 11-01-2011 07:40

Whats Better: FUN, or FAKEMETA
 
In some cases, like giving weapon via (give_item(id, weapon)) is it better to use FUN, or make another Stock with FM and use that to give weapons???

Napoleon_be 11-01-2011 07:42

Re: Whats Better: FUN, or FAKEMETA
 
fun and cstrike.

PHP Code:

give_item(id"weapon_ak47")
cs_set_user_bpammo(idCSW_AK4790


MiloSx7 11-01-2011 08:05

Re: Whats Better: FUN, or FAKEMETA
 
Ok, but i have another way for bpammo:

PHP Code:

new const maxAmmo[31] = {
    
0520901321100901120100100909090100120301202003290,
    
1209023590900100
}

new 
weapons[32]
    new 
weaponsnum
    
    get_user_weapons
(idweaponsweaponsnum)
    
    for(new 
0weaponsnum++)
    {
        if(
is_user_alive(id))
        {
            if(
maxAmmo[weapons[i]] > 0)
            {
                
cs_set_user_bpammo(idweapons[i], maxAmmo[weapons[i]])
            }
        }
    } 

Originally Stolen from QTM.Peyotes COD:MW Mod :)

Put that in SPAWN and it should give everyone a ammo...

Thanks anyway

Napoleon_be 11-01-2011 08:49

Re: Whats Better: FUN, or FAKEMETA
 
Quote:

Originally Posted by MiloSx7 (Post 1587789)
Ok, but i have another way for bpammo:

PHP Code:

new const maxAmmo[31] = {
    
0520901321100901120100100909090100120301202003290,
    
1209023590900100
}

new 
weapons[32]
    new 
weaponsnum
    
    get_user_weapons
(idweaponsweaponsnum)
    
    for(new 
0weaponsnum++)
    {
        if(
is_user_alive(id))
        {
            if(
maxAmmo[weapons[i]] > 0)
            {
                
cs_set_user_bpammo(idweapons[i], maxAmmo[weapons[i]])
            }
        }
    } 

Originally Stolen from QTM.Peyotes COD:MW Mod :)

Put that in SPAWN and it should give everyone a ammo...

Thanks anyway

That code should work.

Erox902 11-01-2011 10:51

Re: Whats Better: FUN, or FAKEMETA
 
You should check this out: Modules and efficient scripting

And decide on your own what would be best in your code.

MiloSx7 11-01-2011 12:53

Re: Whats Better: FUN, or FAKEMETA
 
Thanks :)


All times are GMT -4. The time now is 14:19.

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