Raised This Month: $ Target: $400
 0% 

set_task help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 06-08-2005 , 07:32   set_task help
Reply With Quote #1

hmm, i have a problem .

Code:
new dmgtime = get_cvar_num("air_tanktime") set_task(dmgtime,"run_out_of_gas")

It gives me an error, but if i change dmgtime to something like 1.0, it works.

So how can I use set_task with that?
__________________
Plugins:
none

n0obie4life is offline
XunTric
BANNED
Join Date: Jan 2005
Location: Norway/Norge
Old 06-08-2005 , 09:32  
Reply With Quote #2

get_cvar_float instead... I think....
XunTric is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 06-08-2005 , 10:20  
Reply With Quote #3

oops, i typed wrongly, it was suppose to be time

changing to float doens't work either
__________________
Plugins:
none

n0obie4life is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 06-08-2005 , 10:53  
Reply With Quote #4

never mind.

xuntric's method was correct .

after reading through the amx forums
__________________
Plugins:
none

n0obie4life is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-09-2005 , 04:56  
Reply With Quote #5

This should work equally as well:
Code:
set_task(float(get_cvar_num("air_tanktime")),"run_out_of_gas")
__________________
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
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 06-09-2005 , 05:02  
Reply With Quote #6

or you can do

Code:
set_task(get_cvar_num("air_tanktime") * 1.0,"run_out_of_gas")
Freecode is offline
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 06-09-2005 , 07:19  
Reply With Quote #7

thanks guys!
__________________
Plugins:
none

n0obie4life 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 16:47.


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