AlliedModders

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

soccdoodcss 01-02-2007 00:43

set_task help needed [Resolved]
 
The set_task function isnt working at all, anyone know why???

Code:

        case 2:
        {   
            sec = 5
            set_user_noclip(id, 1)
           
           
            set_task(1.0, "set_noclip", id,"",20,"a",6)
           
        }
       
    }
}
public set_noclip(id)
{
    sec--
    set_hudmessage(rand2, rand3, rand4, 0.45, 0.5, 0, 6.0, 0.7)
    show_hudmessage(id, "%d/5 seconds of noclip", sec)
    if (sec==0)
    {
        set_user_noclip(id, 0)
    }
}

Please help.:cry:

allenwr 01-02-2007 01:17

Re: set_task help needed
 
post rest of code, it might be public set_noclip code thats not working right. set_task looks fine from a flance, but then again, you can try set_task(1.0, "set_noclip", id) as a test

XxAvalanchexX 01-02-2007 01:27

Re: set_task help needed
 
Since you specify a length for the "parameter" argument (in this case, 20), AMXX looks for the function differently. Since you aren't even using the "parameter" argument, set the length to 0.

soccdoodcss 01-02-2007 12:45

Re: set_task help needed
 
Dude, thanks a shitload. I spent almost an hour yesterday trying to figure out how the hell to do it...


All times are GMT -4. The time now is 22:21.

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