Raised This Month: $ Target: $400
 0% 

cvar thing


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Zenith77
Veteran Member
Join Date: Aug 2005
Old 10-14-2005 , 10:39  
Reply With Quote #2

Code:
register_cvar("amx_cm_awardhp","5") cs_set_user_health(id,"+amx_cm_awardhp")

Several mistakes here.

1) You tried to use a cvar as a string

2) The cvar is not a variable, so it can not be called as a variable, thats why we have get_cvar_num() ;)

3) You + it? + What? Not only that, the compiler would read it as a string at not an operator.

4) do this

Code:
register_cvar("amx_cm_awardhp","5") ... new health = get_user_health(id) new awardhp = get_cvar_num("amx_cm_awardhp") cs_set_user_health(id,health+awardhp)




p.s. cs_set_user_health does not look for a string
__________________
Quote:
Originally Posted by phorelyph View Post
your retatred
Zenith77 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 23:40.


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