Raised This Month: $ Target: $400
 0% 

how would u combining a cvar into a task


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Crazywelder1
Member
Join Date: Mar 2004
Location: CA
Old 02-27-2005 , 18:35   how would u combining a cvar into a task
Reply With Quote #1

Example:
of what i want combined
so that when u change the cvar(mp_afktime) to something else that it changes the time when the task is done


Code:
register_cvar("mp_afktime", "90", FCVAR_SERVER) set_task(90.0,"isplayer",_,_,_,"b")

would u have to make a float or define??

like so
Code:
#define AFKTASK 5 register_cvar("mp_afktime", "90", FCVAR_SERVER) set_task(float(AFKTASK),"isplayer",_,_,_,"b")

then put down ways
new afktime get_cvar_num("mp_afktime")
AFKTASK += afktime

but that wouldn't work becuase it would be too late so i know that is wrong do u guys know what i should do?? (plz tell me if u dont understand what i mean ill explain it with more detail)
__________________
AKA = oM`|Garrett
oM CLAN
Soon to have a server in Soon
Crazywelder1 is offline
Send a message via MSN to Crazywelder1
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-27-2005 , 18:58  
Reply With Quote #2

Code:
register_cvar("mp_afktime", "90") new Float:afktime = get_cvar_float("mp_afktime") set_task(afktime,"isplayer",_,_,_,"b")
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Crazywelder1
Member
Join Date: Mar 2004
Location: CA
Old 02-27-2005 , 20:06  
Reply With Quote #3

thank you evne tho i have tried it but it doesn't work other make it slower and not do the task??
__________________
AKA = oM`|Garrett
oM CLAN
Soon to have a server in Soon
Crazywelder1 is offline
Send a message via MSN to Crazywelder1
Twilight Suzuka
bad
Join Date: Jul 2004
Location: CS lab
Old 02-27-2005 , 21:57  
Reply With Quote #4

well, what vex just suggests should change the time based on the cvar. Which means you need to reset the cvar to something lower or higher for the desired effect.
__________________
Twilight Suzuka is offline
Send a message via AIM to Twilight Suzuka Send a message via MSN to Twilight Suzuka
Reply


Thread Tools
Display Modes

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 14:01.


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