Raised This Month: $ Target: $400
 0% 

set_task problem


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
DarlD
Senior Member
Join Date: Aug 2004
Old 11-06-2005 , 03:24   set_task problem
Reply With Quote #1

Im trying to set a task using set_task:

the "Task" it has to do is supposed to be defined by a variable.

here is my code:
Code:
public level4(id)     {     new frags = get_user_frags(id)     new death = get_user_deaths(id)     if (frags > 59 && death <= 30)         {         new thing[64]         new ONOFF = get_cvar_string("offon",thing,63)         new CsTeams:userTeam = cs_get_user_team(id)         if (userTeam == CS_TEAM_T)             {             client_print(id,print_chat,"[MR]: Congrats!! You have reached Level 4!")             cs_set_user_model(id, "leet_t")             set_task(1.0, ONOFF)         }         else if(userTeam == CS_TEAM_CT)             {             client_print(id,print_chat,"[MR]: Congrats!! You have reached Level 4!")             cs_set_user_model(id, "leet_ct")             set_task(1.0, ONOFF)         }     } }

i want the set_task to be defined by the variable but it doesnt work :S wont compile

Code:
public level4(id)     {     new frags = get_user_frags(id)     new death = get_user_deaths(id)     if (frags > 59 && death <= 30)         {         new thing[64]         new ONOFF = get_cvar_string("offon",thing,63)         new CsTeams:userTeam = cs_get_user_team(id)         if (userTeam == CS_TEAM_T)             {             client_print(id,print_chat,"[MR]: Congrats!! You have reached Level 4!")             cs_set_user_model(id, "leet_t")             set_task(1.0, "ONOFF") // also tried like this but dint work         }         else if(userTeam == CS_TEAM_CT)             {             client_print(id,print_chat,"[MR]: Congrats!! You have reached Level 4!")             cs_set_user_model(id, "leet_ct")             set_task(1.0, "ONOFF") // I ALSO TRIED LIKE THIS BUT DINT WORK         }     } }
__________________
DarlD is offline
Send a message via MSN to DarlD
 



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:36.


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