Raised This Month: $ Target: $400
 0% 

[TFC] Set_Task doesn't start


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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