Raised This Month: $ Target: $400
 0% 

what is more efficient


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
avril-lavigne
Banned
Join Date: Apr 2009
Old 07-15-2013 , 11:52   what is more efficient
Reply With Quote #1

PHP Code:
    new HPP1 get_user_health(id)
       new 
APP1 get_user_armor(id)
       static 
iWpnIDiClip
       iWpnID 
get_pdata_cbase(idm_pActiveItem5)
       
iClip cs_get_weapon_ammo(iWpnID
   
       
set_hudmessage2002552550.010.9420.14.00.020.02, -)     
       
ShowSyncHudMsgidg_MsgSync"%d       %d          %d" iClipHPP1APP1 

what is better . make new APP1 = get_user_armor(id) or
just use ShowSyncHudMsg( id, g_MsgSync, "%d %d %d" , iClip, get_user_health(id), get_user_armor(id))[/PHP]
__________________
VDS in Europe 1 gb/s unmetered.Any configurations.
I accept Paypal, Moneybookers,etc

Last edited by avril-lavigne; 07-15-2013 at 11:53.
avril-lavigne is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 07-15-2013 , 12:09   Re: what is more efficient
Reply With Quote #2

Trivial. But if there is no point to create a var, don't do it. I would assume that's something it will be called often and it won't help readability, so creating a variable is unnecessary ; even if trivial, you still avoid some memory/CPU operations.
__________________
Arkshine 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 06:25.


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