Raised This Month: $ Target: $400
 0% 

Defines vs Cvars


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 12-22-2009 , 02:01   Defines vs Cvars
Reply With Quote #1

Got a quick question for you folks..

Is it faster and more efficient to use Defines or pcvars?

Pcvar Examples:
PHP Code:
new hpmax
hpmax 
register_cvar("amx_mhp""200")
......
hpm get_pcvar_num(hpmax);

if(
curhp hpm)
{
      
//do stuff

Define Example:
PHP Code:
#define MAX_HP 200
.....
if(
curhp MAX_HP)
{
   
//do stuff

edit: Keep in mine i will have 6 defines for setting health. or 6 pcvars
Doc-Holiday is offline
 



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 04:15.


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