TextDrawHide function not being called.
#1

I want the textdraws to hide when the timer reaches 30. In the code, all the statements are working correctly except
PHP код:
HideRSCaptureTD(playerid); 
I have used SendClientMessage to debug the problem but every other line gets excecuted except the line above.
ShowCapturedTD(playerid); works fine (Rechecked by SendClientMessage too)

Heres my code:
PHP код:
public GZCounter(playerid,GZName[])
{
    new 
Counter[6];
    if(!
strcmp(GZName,"RS",true))
    {
        if(
RSPaused == 0RSTimer++;
        
format(Counter,6,"%d/30",RSTimer);
        
TextDrawSetString(GZCapturingRS2,Counter);
        if(
RSTimer == 30)
        {
            
            
HideRSCaptureTD(playerid);
            
ShowCapturedTD(playerid);
            
RSTimer 0;
                    
KillTimer(GZTimerRS);
        }
    }
}
HideRSCaptureTD(playerid)
{
    
TextDrawHideForPlayer(playerid,GZCapturing0);
    
TextDrawHideForPlayer(playerid,GZCapturingRS1);
    
TextDrawHideForPlayer(playerid,GZCapturingRS2);
    
TextDrawHideForPlayer(playerid,GZPaused3);
    
SendClientMessage(playerid,white,"Hiding RS Capture TD");
    return 
1;

Reply
#2

Where are you using SetTimerEx?
Reply
#3

SetTimerEx does not take strings
Reply
#4

The
PHP код:
TextDrawHideForPlayer 
function's format is like that..

PHP код:
TextDrawHideForPlayer(playeridTextdraw(playerid)); 
Reply
#5

Quote:
Originally Posted by Meller
Посмотреть сообщение
Where are you using SetTimerEx?
Im using the SetTimerEx after the Capture Textdraw starts showing. Its called every one second to updte the timer. When The timer reaches 30, the SetTimer is supposed to be killed and the textdraw is supposed to be hidden.
Reply
#6

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
The
PHP код:
TextDrawHideForPlayer 
function's format is like that..

PHP код:
TextDrawHideForPlayer(playeridTextdraw(playerid)); 
I have made it as a global text draw.
And also the code which I have written works when I use HideRSCaptureTD(playerid) under a command and also under OnPlayerUpdate. But it doesnt work in just this scenario(in the Timer function).
Reply
#7

Bump.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)