Whats wrong with textdraws
#1



I try to reset it everytime when I called textdraw to show up but no its still max value then reset to 0
This is how I used to show them

PHP Code:
CMD:test1(playeridparams[])
{
    
pInfo[playerid][pTextFloat] = 0.0;
    
WorkOn[playerid] = 1;
    
ShowFishTextdraw(playerid1); // Show progress bar normal
    
SCM(playerid, -1"%.1f"pInfo[playerid][pTextFloat]);
    return 
1;
}
public 
SecondCount() 

    foreach (new 
Player
    { 
        if(
WorkOn[i] == 1)
        {
            if(
pInfo[i][pTextFloat] < MAX_VALUE
            { 
                
// Normal bar 
                
PlayerTextDrawTextSize(iTextdraws[i][0],pInfo[i][pTextFloat], 14.0000); 
                
PlayerTextDrawShow(iTextdraws[i][0]); 
                
                
// reset here
                
WorkOn[i] = 0;
                
pInfo[i][pTextFloat] = 0.0;
                
                
// Send to hide all textdraws
                
            
} else { 
                
// Increase every 1 sec 
                
PlayerTextDrawTextSize(iTextdraws[i][0], pInfo[i][pTextFloat], 14.0000);  
                
PlayerTextDrawShow(iTextdraws[i][0]); 
                
pInfo[i][pTextFloat] += 10.0;
            }
        }
    } 
    return 
1

After hide all textdraw then I did /test1 again but its start from MAX_VALUE then reset to pTextFloat
So I lost 2 sec for reset and then get start from pTextFloat
Even my textdraw code from 0.0
PHP Code:
    Textdraws[playerid][0] = CreatePlayerTextDraw(playerid267.066589218.151870"LD_SPAC:white");
    
PlayerTextDrawLetterSize(playeridTextdraws[playerid][0], 0.0000000.000000);
    
PlayerTextDrawTextSize(playeridTextdraws[playerid][0], 0.00000014.029999); // 106.829963 = MAX_VALUE
    
PlayerTextDrawAlignment(playeridTextdraws[playerid][0], 1);
    
PlayerTextDrawColor(playeridTextdraws[playerid][0], 16711935);
    
PlayerTextDrawSetShadow(playeridTextdraws[playerid][0], 0);
    
PlayerTextDrawSetOutline(playeridTextdraws[playerid][0], 0);
    
PlayerTextDrawBackgroundColor(playeridTextdraws[playerid][0], 255);
    
PlayerTextDrawFont(playeridTextdraws[playerid][0], 4);
    
PlayerTextDrawSetProportional(playeridTextdraws[playerid][0], 0);
    
PlayerTextDrawSetShadow(playeridTextdraws[playerid][0], 0); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)