SA-MP Forums Archive
Help optimize team head broke already - 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: Help optimize team head broke already (/showthread.php?tid=497197)



Help optimize team head broke already - Size - 25.02.2014

Hello.

Please help optimize command the whole head is broken, because a noob zayuzat already 2 array to 2000

PHP код:
CMD:bizzlist(playeridparams[]) 

    if(!
IsMafia(playerid)) return true
    new 
ross_big_string[2000]; 
    new 
ross_string[2000]; 
    new 
TOTALBUSINES 0
    for(new 
1<= TOTALBIZZb++) 
    { 
        if(
PlayerInfo[playerid][pMember] != BizzInfo[b][bRoof]) continue; 
        
TOTALBUSINES++; 
        
format(ross_stringsizeof (ross_string), "{FFFFFF}%d. %s [%d] прибыль в час {0BDA51}500 {FFFFFF}долларов\n",TOTALBUSINES,  BizzInfo[b][bName], b); 
        
strcat(ross_big_stringross_string); 
    } 
    if(
strlen(ross_big_string) < 5) return ShowPlayerDialog(playerid,0,DIALOG_STYLE_MSGBOX,"Бизлист","\tВладений нет!","Закрыть",""); 
    
format(nsasizeof(nsa), "{FFFFFF}Бизнесы под контролем: %d"TOTALBUSINES); 
    
ShowPlayerDialog(playerid,0,DIALOG_STYLE_LIST,nsa,ross_big_string,"Закрыть",""); 
    
//ShowPlayerDialog(playerid, 0, DIALOG_STYLE_LIST, "{FFFFFF}Бизнесы под контролем: %d", "Выбрать", CloseDialog, TOTALBUSINES); 
    
return true