SA-MP Forums Archive
TextDrawColor not updating - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TextDrawColor not updating (/showthread.php?tid=509051)



TextDrawColor not updating - Dziugsas - 25.04.2014

PHP код:
if(TireInfo[vehicleid][Front_Left_Tire] <= 400 || TireInfo[vehicleid][Front_Left_Tire] >= 300)
                    {
                        
PlayerTextDrawHide(i,PriekineKaire[i]);
                        
PlayerTextDrawColor(iPriekineKaire[i], COLOR_GREEN);
                        
PlayerTextDrawShow(i,PriekineKaire[i]);
                    }
                    else if(
TireInfo[vehicleid][Front_Left_Tire] <= 300 || TireInfo[vehicleid][Front_Left_Tire] >= 200)
                    {
                        
PlayerTextDrawHide(i,PriekineKaire[i]);
                        
PlayerTextDrawColor(iPriekineKaire[i], COLOR_YELLOW);
                        
PlayerTextDrawShow(i,PriekineKaire[i]);
                    }
                    else if(
TireInfo[vehicleid][Front_Left_Tire] <= 200 || TireInfo[vehicleid][Front_Left_Tire] >= 50)
                    {
                        
PlayerTextDrawHide(i,PriekineKaire[i]);
                        
PlayerTextDrawColor(iPriekineKaire[i], COLOR_ORANGE);
                        
PlayerTextDrawShow(i,PriekineKaire[i]);
                    }
                    else if(
TireInfo[vehicleid][Front_Left_Tire] <= 50 || TireInfo[vehicleid][Front_Left_Tire] >= 0)
                    {
                        
PlayerTextDrawHide(i,PriekineKaire[i]);
                        
PlayerTextDrawColor(iPriekineKaire[i], COLOR_RED);
                        
PlayerTextDrawShow(i,PriekineKaire[i]);
                    }
                    
/////////////////////////////////////////////////////////////////////////////////////
                    
if(TireInfo[vehicleid][Front_Right_Tire] <= 400 || TireInfo[vehicleid][Front_Right_Tire] >= 300)
                    {
                        
PlayerTextDrawHide(i,PriekineDesine[i]);
                        
PlayerTextDrawColor(iPriekineDesine[i], COLOR_GREEN);
                        
PlayerTextDrawShow(i,PriekineDesine[i]);
                    }
                    else if(
TireInfo[vehicleid][Front_Right_Tire] <= 300 || TireInfo[vehicleid][Front_Right_Tire] >= 200)
                    {
                        
PlayerTextDrawHide(i,PriekineDesine[i]);
                        
PlayerTextDrawColor(iPriekineDesine[i], COLOR_YELLOW);
                        
PlayerTextDrawShow(i,PriekineDesine[i]);
                    }
                    else if(
TireInfo[vehicleid][Front_Right_Tire] <= 200 || TireInfo[vehicleid][Front_Right_Tire] >= 50)
                    {
                        
PlayerTextDrawHide(i,PriekineDesine[i]);
                        
PlayerTextDrawColor(iPriekineDesine[i], COLOR_ORANGE);
                        
PlayerTextDrawShow(i,PriekineDesine[i]);
                    }
                    else if(
TireInfo[vehicleid][Front_Right_Tire] <= 50 || TireInfo[vehicleid][Front_Right_Tire] >= 0)
                    {
                        
PlayerTextDrawHide(i,PriekineDesine[i]);
                        
PlayerTextDrawColor(iPriekineDesine[i], COLOR_RED);
                        
PlayerTextDrawShow(i,PriekineDesine[i]);
                    }
                    
/////////////////////////////////////////////////////////////////////////////////////
                    
if(TireInfo[vehicleid][Rear_Right_Tire] <= 200 || TireInfo[vehicleid][Rear_Right_Tire] >= 150)
                    {
                        
PlayerTextDrawHide(i,GalineKaire[i]);
                        
PlayerTextDrawColor(iGalineDesine[i], COLOR_GREEN);
                        
PlayerTextDrawShow(i,GalineDesine[i]);
                    }
                    else if(
TireInfo[vehicleid][Rear_Right_Tire] <= 150 || TireInfo[vehicleid][Rear_Right_Tire] >= 100)
                    {
                        
PlayerTextDrawHide(i,GalineKaire[i]);
                        
PlayerTextDrawColor(iGalineDesine[i], COLOR_YELLOW);
                        
PlayerTextDrawShow(i,GalineDesine[i]);
                    }
                    else if(
TireInfo[vehicleid][Rear_Right_Tire] <= 100 || TireInfo[vehicleid][Rear_Right_Tire] >= 50)
                    {
                        
PlayerTextDrawHide(i,GalineKaire[i]);
                        
PlayerTextDrawColor(iGalineDesine[i], COLOR_ORANGE);
                        
PlayerTextDrawShow(i,GalineDesine[i]);
                    }
                    else if(
TireInfo[vehicleid][Rear_Right_Tire] <= 50 || TireInfo[vehicleid][Rear_Right_Tire] >= 0)
                    {
                        
PlayerTextDrawHide(i,GalineKaire[i]);
                        
PlayerTextDrawColor(iGalineDesine[i], COLOR_RED);
                        
PlayerTextDrawShow(i,GalineDesine[i]);
                    }
                    
////////////////////////////////////////////////////////////////////////////////////////////////
                    
if(TireInfo[vehicleid][Rear_Left_Tire] <= 200 || TireInfo[vehicleid][Rear_Left_Tire] >= 150)
                    {
                        
PlayerTextDrawHide(i,GalineKaire[i]);
                        
PlayerTextDrawColor(iGalineKaire[i], COLOR_GREEN);
                        
PlayerTextDrawShow(i,GalineKaire[i]);
                    }
                    else if(
TireInfo[vehicleid][Rear_Left_Tire] <= 150 || TireInfo[vehicleid][Rear_Left_Tire] >= 100)
                    {
                        
PlayerTextDrawColor(iGalineKaire[i], COLOR_YELLOW);
                        
PlayerTextDrawShow(i,GalineKaire[i]);
                    }
                    else if(
TireInfo[vehicleid][Rear_Left_Tire] <= 100 || TireInfo[vehicleid][Rear_Left_Tire] >= 50)
                    {
                        
PlayerTextDrawHide(i,GalineKaire[i]);
                        
PlayerTextDrawColor(iGalineKaire[i], COLOR_ORANGE);
                        
PlayerTextDrawShow(i,GalineKaire[i]);
                    }
                    else if(
TireInfo[vehicleid][Rear_Left_Tire] <= 50 || TireInfo[vehicleid][Rear_Left_Tire] >= 0)
                    {
                        
PlayerTextDrawHide(i,GalineKaire[i]);
                        
PlayerTextDrawColor(iGalineKaire[i], COLOR_RED);
                        
PlayerTextDrawShow(i,GalineKaire[i]);
                    } 
I'm using this on a timer
Код:
maintimer = SetTimer("MainTimer", 1000, true);