i will show a table with the attackers with name,hits and damage. here is the code for to show the motd window
Code:
public hits(id, sBuffer[MAX_BUFFER_LENGTH + 1])
{
new izStats[8], izBody[8]
new iAttacker
//new iVictim
new iMaxPlayer = get_maxplayers()
new buffer[2048]
new line[256]
sBuffer[0] = 0
izStats[STATS_SHOTS] = 0
iAttacker = g_izKilled[id][KILLED_KILLER_ID]
if (iAttacker)
get_user_astats(id, iAttacker, izStats, izBody)
if (izStats[STATS_SHOTS] && ShowFullStats)
get_user_name(iAttacker, t_sName, MAX_NAME_LENGTH)
new len = format( buffer, 2047, "<table border=1 cellspacing=1 cellpadding=10 width=100% align=center>")
len += format( buffer[len], 2047-len, "<tr><td align=left width=50%> Name <td align=center width=25%> Hits <td align=right width=25%> Damage" )
for (iAttacker = 1; iAttacker <= iMaxPlayer; iAttacker++)
{
if (get_user_astats(id, iAttacker, izStats, izBody, t_sWpn, MAX_WEAPON_LENGTH))
{
get_user_name(iAttacker, t_sName, 32)
len += format( buffer[len], 2047-len , "<tr><td align=left width=50%> %s <td align=center width=25%> %d <td align= rightwidth=25%> %d", t_sName, izStats[STATS_HITS], izStats[STATS_DAMAGE] )
//format(line, 255, "<tr><td align=left width=50%> %s <td align=center width=25%> %d <td align= rightwidth=25%> %d", t_sName, izStats[STATS_HITS], izStats[STATS_DAMAGE] )
len += format( buffer[len], 2047-len, line )
}
}
format(line, 255, "</table>" )
len += format( buffer[len], 2047-len, line )
show_motd(id, buffer, "Attackers and Victims")
}
but it will it not show correct. I`m not so good at scripting I just look at other plugins and try to put the things correctly together.
it should show the name in one line not on 3. Pleaze Help