Hi all,
I have a stats plugin with sql saving.
All good, but I want to improve a little bit the MOTD for /top15
I have 6 columns in the motd, first one is rank number, then nickname and so on.
I just want to add either in the same column with rank, or separate column between rank and name, an image for each row of the top15. Like separate image from csgo ranks.
Can you please help with what and/or how I should change?
Thanks
Code:
public GiveTopInformation(FailState, Handle:Query, Error[], Errcode, DataPlayer[], DataSize)
{
new id, PlayerName2[32], Number[10], PlayerPoints, iMOTDPos, string[3036], iNumResults;
id = DataPlayer[0], string[0] = EOS;
iMOTDPos = format(string, charsmax(string), "<html><head><style>body{background:#FFF;font-family:Tahoma}th{background:#056B9E;color:#FFF;padding:3px;text-align:left;border-top:4px solid #3986AC}td{background:#CCCCCC;padding:2px 6px;border-bottom:1px dotted}table{color:#006699;background:#FFF;font-size:15px;border:2px solid #006699}</style></head><body><table width=100%% border=0 align=center cellpadding=0 cellspacing=1>");
iMOTDPos += format(string[iMOTDPos], charsmax(string)-iMOTDPos, "<center><img src='https://i.imgur.com/4kypRjN.png'></center><br/><tr><th>Rank<th>Nick<th>Points<th>Kills<th>Deaths<th>HS</tr>");
iNumResults = SQL_NumResults(Query);
if(iNumResults)
{
for(new i; i < iNumResults; i++)
{
SQL_ReadResult(Query, 1, PlayerName2, charsmax(PlayerName2)), PlayerPoints = SQL_ReadResult(Query, 3), AddCommas(PlayerPoints, Number, charsmax(Number));
iMOTDPos += format(string[iMOTDPos], charsmax(string)-iMOTDPos, "<tr><td>%d<td>%s<td>%s<td>#<td>#<td>#</tr>", i+1, PlayerName2, Number);
SQL_NextRow(Query);
}
}
copy(string[iMOTDPos], charsmax(string)-iMOTDPos, "</table><center><img src='https://i.imgur.com/XR2ZufG.png'></center></body></html>");
show_motd(id, string, "PLOIESTI.LaLeagane.Ro");
return PLUGIN_HANDLED;
}