View Single Post
papel
Junior Member
Join Date: Jul 2017
Old 08-24-2020 , 12:41   Re: [HELP] How to align right scored
Reply With Quote #8

Quote:
Originally Posted by Bacardi View Post
...problem start at beginning with characters in menu. "space" is short and doesn't line well.
So need double spaces.

PHP Code:
public void OnPluginStart()
{
    
RegConsoleCmd("sm_test"test);
}

public 
Action test(int clientint args)
{

    
Panel panel = new Panel();
    
panel.SetTitle("Top Players");

    
char bufferpoints[20];
    
char buffer[200];
    
char names[][] = {"""<- This exceed by one""Harry""Matt""John""Lisa""George""Alpha""Beta""Omega""Apple"};
    
int points[] = {021111100023333002220017700800509751};
    
    for(
int x 1<= 10x++)
    {
        
Format(bufferpointssizeof(bufferpoints), "%8d"points[x]);
        
        
int index FindCharInString(bufferpoints' 'true);
        
PrintToServer("index %i"index);
        
        
// double spaces
        
for(int a 0<= indexa++)
        {
            
Format(bufferpointssizeof(bufferpoints), " %s"bufferpoints);
        }

        
Format(buffersizeof(buffer), "%02i. %s - %s"xbufferpointsnames[x]);
        
panel.DrawText(buffer);
        
PrintToServer("%s"buffer);
    }

    
panel.Send(clientpanel_handler20);
    
delete panel;

    return 
Plugin_Handled;
}

public 
int panel_handler(Menu menuMenuAction actionint param1int param2) {} 

Wow, unbelievable !! Thank you very much Bacardi. I will try now. Have a great day!
MAGNAT2645, Ilusion9, thank you so much for all your help.

Last edited by papel; 08-24-2020 at 12:43.
papel is offline