Hi, how are you?
I have this ranking on my server and I wonder if it is possible to just align the score to the right, as shown in the figure 2?
Have a great day.
Code:
public SQLQueryTop10(Handle:owner, Handle:hndl, const String:error[], any:data) {
new client;
if((client = GetClientOfUserId(data))==0) {
return;
}
if(hndl==INVALID_HANDLE) {
LogError("Query failed: %s", error);
} else {
decl String:qname[64], String:qrating[8], String:buffer[68];
new i = 0;
new num = 1;
new Handle:panel = CreatePanel();
SetPanelTitle(panel, "Top 10 players:");
while(SQL_FetchRow(hndl)) {
SQL_FetchString(hndl, 0, qname, sizeof(qname));
SQL_FetchString(hndl, 1, qrating, sizeof(qrating));
Format(buffer, sizeof(buffer), "%02i. %s pts - %s",num, qrating, qname);
num++;
DrawPanelText(panel, buffer);
i++;
}
DrawPanelItem(panel, "Close");
SendPanelToClient(panel, client, PanelHandlerNothing, 15);
CloseHandle(panel);
}
}