Raised This Month: $ Target: $400
 0% 

CVAR question


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Dark Kingdom
BANNED
Join Date: Apr 2007
Location: VT
Old 04-09-2007 , 16:20   CVAR question
Reply With Quote #1

Is it possible to set a cvar through scripting thats allready a built-in cvar?

EXAMPLE:
mp_timelimit
Dark Kingdom is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 04-09-2007 , 16:29   Re: CVAR question
Reply With Quote #2

Code:
set_cvar_num("mp_timelimit", 10);

Other way is pcvar
Code:
new mp_timelimit = get_cvar_pointer("mp_timelimit"); new timelimit = get_pvar_num(mp_timelimit);

If your going to use this cvar alot I would store the pointer in an global variable and would use pcvar vs the old cvar retrieval
__________________
No private support via Instant Message
GunGame:SM Released
teame06 is offline
Send a message via AIM to teame06
Dark Kingdom
BANNED
Join Date: Apr 2007
Location: VT
Old 04-09-2007 , 16:36   Re: CVAR question
Reply With Quote #3

Thanks, i'm doing a simple plugin and didn't know how

EDIT: Would I have to register anything if i'm JUST setting that cvar and a message?
Dark Kingdom 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:45.


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