[HELP] Optimize Code
#1

Hello,
I returned to program pawn a few days and I'm trying to make a code but can not find a solution to optimize it if someone can help me with what function to use for this would be great.

I need to show the player some PlayerTextDraw, but as it is registered or not, takes leave of showing a PlayerTextDraw, as are many did a loop but in time to remove this single PlayerTextDraw not know how to do.


Not optimally, I not found a solution to my problem to optimize it.
PHP код:
for(new i!= 24i++) {
        if(
DOF2_FileExists(File)) {
            
PlayerTextDrawShow(playeridText_Login[0]);
            
PlayerTextDrawShow(playeridText_Login[1]);
            
PlayerTextDrawShow(playeridText_Login[2]);
            
PlayerTextDrawShow(playeridText_Login[3]);
            
PlayerTextDrawShow(playeridText_Login[4]);
            
PlayerTextDrawShow(playeridText_Login[5]);
            
PlayerTextDrawShow(playeridText_Login[6]);
            
PlayerTextDrawShow(playeridText_Login[7]);
            
PlayerTextDrawShow(playeridText_Login[8]);
            
PlayerTextDrawShow(playeridText_Login[9]);
            
PlayerTextDrawShow(playeridText_Login[10]);
            
PlayerTextDrawShow(playeridText_Login[11]);
            
PlayerTextDrawShow(playeridText_Login[12]);
            
PlayerTextDrawShow(playeridText_Login[13]);
            
PlayerTextDrawShow(playeridText_Login[14]);
            
PlayerTextDrawShow(playeridText_Login[15]);
            
PlayerTextDrawShow(playeridText_Login[16]);
            
PlayerTextDrawShow(playeridText_Login[17]);
            
PlayerTextDrawShow(playeridText_Login[18]);
            
PlayerTextDrawShow(playeridText_Login[19]);
            
PlayerTextDrawShow(playeridText_Login[20]);
            
PlayerTextDrawShow(playeridText_Login[21]);
            
PlayerTextDrawShow(playeridText_Login[22]);
            
//PlayerTextDrawShow(playerid, Text_Login[i]);
        
} else {
            
PlayerTextDrawShow(playeridText_Login[0]);
            
PlayerTextDrawShow(playeridText_Login[1]);
            
PlayerTextDrawShow(playeridText_Login[2]);
            
PlayerTextDrawShow(playeridText_Login[3]);
            
PlayerTextDrawShow(playeridText_Login[4]);
            
PlayerTextDrawShow(playeridText_Login[5]);
            
PlayerTextDrawShow(playeridText_Login[6]);
            
PlayerTextDrawShow(playeridText_Login[7]);
            
PlayerTextDrawShow(playeridText_Login[8]);
            
PlayerTextDrawShow(playeridText_Login[9]);
            
PlayerTextDrawShow(playeridText_Login[10]);
            
PlayerTextDrawShow(playeridText_Login[11]);
            
PlayerTextDrawShow(playeridText_Login[12]);
            
PlayerTextDrawShow(playeridText_Login[13]);
            
PlayerTextDrawShow(playeridText_Login[14]);
            
PlayerTextDrawShow(playeridText_Login[15]);
            
PlayerTextDrawShow(playeridText_Login[16]);
            
PlayerTextDrawShow(playeridText_Login[17]);
            
PlayerTextDrawShow(playeridText_Login[18]);
            
PlayerTextDrawShow(playeridText_Login[19]);
            
PlayerTextDrawShow(playeridText_Login[20]);
            
PlayerTextDrawShow(playeridText_Login[22]);
            
PlayerTextDrawShow(playeridText_Login[23]);
            
//PlayerTextDrawShow(playerid, Text_Login[i]);
        

Sorry for my english.
Reply


Messages In This Thread
[HELP] Optimize Code - by EditPawn - 08.11.2015, 07:04
Re: [HELP] Optimize Code - by Sellize - 08.11.2015, 07:54
Re: [HELP] Optimize Code - by ATGOggy - 08.11.2015, 07:55
Re: [HELP] Optimize Code - by Sellize - 08.11.2015, 07:57
Re: [HELP] Optimize Code - by EditPawn - 08.11.2015, 08:49

Forum Jump:


Users browsing this thread: 1 Guest(s)