AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   set_task help (https://forums.alliedmods.net/showthread.php?t=14069)

n0obie4life 06-08-2005 07:32

set_task help
 
hmm, i have a problem :D.

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?

XunTric 06-08-2005 09:32

get_cvar_float instead... I think.... :lol:

n0obie4life 06-08-2005 10:20

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

changing to float doens't work either :roll:

n0obie4life 06-08-2005 10:53

never mind.

xuntric's method was correct :D.

after reading through the amx forums :P

v3x 06-09-2005 04:56

This should work equally as well:
Code:
set_task(float(get_cvar_num("air_tanktime")),"run_out_of_gas")

Freecode 06-09-2005 05:02

or you can do

Code:
set_task(get_cvar_num("air_tanktime") * 1.0,"run_out_of_gas")

n0obie4life 06-09-2005 07:19

:D:D thanks guys!


All times are GMT -4. The time now is 16:47.

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