Align
#3

My current command is like this:

PHP код:
COMMAND:topgang(playeridparams[])
{
    new 
query[128];
    
mysql_format(connectionquerysizeof(query), "SELECT * FROM `cnr_gang` ORDER BY `score` DESC LIMIT 20");
    
mysql_query(connectionquerytrue);
    new 
ganglist[2500], count cache_num_rows(), TempColor[7], TempName[30];
    if(
count != 0)
    {
        for(new 
0counti++)
        {
            
cache_get_field_content(i"color"TempColor);
            
cache_get_field_content(i"name"TempName);
            new 
gangkills cache_get_field_content_int(0"Kills");
            new 
gangdeaths cache_get_field_content_int(0"Deaths");
            
format(ganglistsizeof(ganglist), "%s%d. {%s}%s {FFFFFF}- Score : %d  \t\t\t\t{23ffaa}Gang Kills: %d \tGang Deaths: %d\n"ganglist, (i+1), TempColorTempNamecache_get_field_content_int(i"score"), gangkillsgangdeaths);
        }
        
format(ganglistsizeof(ganglist), "%s\n* This top list updated every %d minutes"ganglistAUTOSAVE);
        
ShowPlayerDialog(playeridDIALOG_UNUSEDDIALOG_STYLE_MSGBOX"Top Gangs"ganglist"Close""");
    }
    else
        
SendClientMessage(playerid, -1"{FF0000}There's no gangs present!");
    return 
1;

So can i do it like:
PHP код:
format(ganglistsizeof(ganglist), "%s\n Gang Name\tGang Score\tGang Kills\tGang Deaths\n\",ganglist); 
PHP код:
format(ganglistsizeof(ganglist), "%s {%s}%s \t{FFFFFF}%d\t{23ffaa}%d \t%d\n\", ganglist,  TempColor, TempName, cache_get_field_content_int(i, "score"), gangkills, gangdeaths);
format(ganglist, sizeof(ganglist), "
%s\nThis top list updated every %d minutes", ganglist, AUTOSAVE); 
PHP код:
ShowPlayerDialog(playeriddialogidDIALOG_STYLE_TABLIST_HEADERS"Top Gangs",ganglist"Select""Cancel"); 
?
Reply


Messages In This Thread
Align - by iLearner - 28.09.2016, 11:00
Re: Align - by Konstantinos - 28.09.2016, 11:13
Re: Align - by iLearner - 28.09.2016, 11:24
Re: Align - by Konstantinos - 28.09.2016, 11:39
Re: Align - by iLearner - 28.09.2016, 13:08

Forum Jump:


Users browsing this thread: 1 Guest(s)