Raised This Month: $ Target: $400
 0% 

table in motd window


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 07-25-2007 , 15:00   table in motd window
Reply With Quote #1

hey
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.
Here is a picture of th motd window

http://88.198.51.140/myhits.jpg

it should show the name in one line not on 3. Pleaze Help
__________________
SORRY 4 MY BAD ENGLISH
ch3cker is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:26.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode