Raised This Month: $ Target: $400
 0% 

[TFC] Set_Task doesn't start


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vancold
Member
Join Date: Jan 2015
Old 09-01-2015 , 04:53   [TFC] Set_Task doesn't start
Reply With Quote #1

Hey

Code:
new color[3]
 
    for(new i = 0; i < g_SimonIndex[id ]; i++) {
 
        client_print(id,print_chat,"%d",g_ColorArray[id][i])
 
        switch(g_ColorArray[id][i]) {
        
        
        
            case RED: {
        
                color[0] = 255
                color[1] = 0
                color[2] = 0
        
            }
        
        
            case GREEN: {
            
                color[0] = 0
                color[1] = 255
                color[2] = 0
        
            }
        
        
            case BLUE:{
            
                color[0] = 0
                color[1] = 0
                color[2] = 255
        
            }
        
        
            case YELLOW:{
            
                color[0] = 255
                color[1] = 255
                color[2] = 0
        
            }
        }
        
        client_print(id,print_chat,"Red: %d ; Green: %d ; Blue: %d",color[0],color[1],color[2])
        set_user_rendering(id,kRenderFxGlowShell,color[0],color[1],color[2],kRenderNormal,16)
        set_task(0.75,"wait",1)
        
    }

    
    set_user_rendering(id,kRenderFxGlowShell,0,0,0,kRenderNormal,25)
This code should get a color display it, wait for 0.75 seconds and then switch ect, (SimonIndex is a int value ranging from 4 to 10.

The problem is that the code gets rushed through in 0.01 secs or something like that. I don't know why.

Why?
This function gets called by a menu

The function name is wait. no typos. Wait only contains return PLUGIN_CONTINUE.
IDK what to do. Tried everything but it rushes the set_Task.
BTW: I am using 3rd person to watch it, so i am pretty sure that it doesnt work
Vancold is offline
Old 09-01-2015, 07:48
Vancold
This message has been deleted by HamletEagle. Reason: Wait 14 days before bumping.
Vancold
Member
Join Date: Jan 2015
Old 09-01-2015 , 11:06   Re: [TFC] Set_Task doesn't start
Reply With Quote #3

i wasn't bumping, i am just confused as to why it doesn't work.
Why should i bump a topic that is almost in top spot anyways? lol
a bump post would be

bump

or up

...
Vancold is offline
Vancold
Member
Join Date: Jan 2015
Old 09-02-2015 , 06:28   Re: [TFC] Set_Task doesn't start
Reply With Quote #4

Topic can be deleted / closed. Found the reason why.
Thought the ID i call in the task is the user id. It is the task id.
Set up the task ID accordingly to the user.

Now it does work
Vancold 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 22:14.


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