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

Efficientness.Set_user_bpammo.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-05-2009 , 10:36   Efficientness.Set_user_bpammo.
Reply With Quote #1

What is more efficient?
Fakemeta:
PHP Code:
/*stock fm_set_user_bpammo(id, iWeapon, iAmount) 

    new iOffset; 
    switch(iWeapon) 
    { 
        case CSW_AWP: iOffset = 377; 
        case CSW_SCOUT, CSW_AK47, CSW_G3SG1: iOffset = 378; 
        case CSW_M249: iOffset = 379; 
        case CSW_FAMAS, CSW_M4A1, CSW_AUG, CSW_SG550, CSW_GALI, CSW_SG552: iOffset = 380; 
        case CSW_M3, CSW_XM1014: iOffset = 381; 
        case CSW_USP, CSW_UMP45, CSW_MAC10: iOffset = 382; 
        case CSW_FIVESEVEN, CSW_P90: iOffset = 383; 
        case CSW_DEAGLE: iOffset = 384; 
        case CSW_P228: iOffset = 385; 
        case CSW_GLOCK18, CSW_MP5NAVY, CSW_TMP, CSW_ELITE: iOffset = 386; 
        case CSW_FLASHBANG: iOffset = 387; 
        case CSW_HEGRENADE: iOffset = 388; 
        case CSW_SMOKEGRENADE: iOffset = 389; 
        case CSW_C4: iOffset = 390; 
        default:return; 
    } 
    set_pdata_int(id, iOffset, iAmount); 
}*/ 
Or cstrike
PHP Code:
cs_set_user_bpammo 
?

Last edited by xbatista; 05-05-2009 at 10:40.
xbatista is offline
Send a message via Skype™ to xbatista
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-05-2009 , 10:52   Re: Efficientness.Set_user_bpammo.
Reply With Quote #2

CStrike.
__________________
hleV is offline
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-05-2009 , 11:03   Re: Efficientness.Set_user_bpammo.
Reply With Quote #3

use cstrike, fakemeta is effective on stuff that can not be done with other modules
__________________
Hunter-Digital is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-05-2009 , 11:09   Re: Efficientness.Set_user_bpammo.
Reply With Quote #4

Okey thanks ;)
How about :
Fakemeta
PHP Code:
set_pev(idpev_healthFloated:health
and Fun:
PHP Code:
set_user_health 
?
xbatista is offline
Send a message via Skype™ to xbatista
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-05-2009 , 11:13   Re: Efficientness.Set_user_bpammo.
Reply With Quote #5

Fun, from what I've seen (profiles done by users around the forum =) ), set_pev() is slower than entity_set_X() and set_user_X()
__________________
Hunter-Digital is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 05-05-2009 , 13:46   Re: Efficientness.Set_user_bpammo.
Reply With Quote #6

I'd go for FM as long as it doesn't require calling additional natives and other stuff.
__________________
hleV is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 05-05-2009 , 14:47   Re: Efficientness.Set_user_bpammo.
Reply With Quote #7

If you use integers, use fun, else if you use floats, use engine or fakemeta, but don't use integers and round them to use engine or fun.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
SchlumPF*
Veteran Member
Join Date: Mar 2007
Old 05-05-2009 , 14:52   Re: Efficientness.Set_user_bpammo.
Reply With Quote #8

Quote:
Originally Posted by ConnorMcLeod View Post
If you use integers, use fun, else if you use floats, use engine or fakemeta, but don't use integers and round them to use engine or fun.
but dont use floats and round them or use integers in combination with float()
__________________
SchlumPF* is offline
Send a message via ICQ to SchlumPF*
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 05-05-2009 , 14:54   Re: Efficientness.Set_user_bpammo.
Reply With Quote #9

Yea know this,thanks all!
xbatista is offline
Send a message via Skype™ to xbatista
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 05-05-2009 , 19:03   Re: Efficientness.Set_user_bpammo.
Reply With Quote #10

Quote:
Originally Posted by SchlumPF* View Post
but dont use floats and round them or use integers in combination with float()
one question about float()... is it better to use float() or add to 0.0 ? ... ex:
PHP Code:
new Float:fVariVar 5
 
fVar 
0.0+iVar
// vs
fVar float(iVar
__________________
Hunter-Digital 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 19:23.


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