Raised This Month: $ Target: $400
 0% 

Style the MOTD window


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ch3cker
Veteran Member
Join Date: Jun 2005
Location: Deutschland / Baden-Würt
Old 10-07-2006 , 18:46   Re: Style the MOTD window
Reply With Quote #9

demolite
your snippet is very usefull for me thanks.
But i need help ^^
I want to show the attackers and victims in a motd window.
here is my code:
Code:
motd_attackers(id, sBuffer[MAX_BUFFER_LENGTH + 1])
{
	new izStats[8], izBody[8]
	new iAttacker
	new iVictim
	new iFound
	new iMaxPlayer = get_maxplayers()
	new line[256]
	new motd[2048]
	
	iFound = 0
	sBuffer[0] = 0
	izStats[STATS_SHOTS] = 0
	iAttacker = g_izKilled[id][KILLED_KILLER_ID]
	
	
	add(motd,2048,"<html><head><style>")
	add(motd,2048,"body { background-color:#182030; font-family:verdana; font-size:10px; color:#FFFFFF; }")
	add(motd,2048,".tabel { background-color: #182030; border-style:solid; border-width:1px; border-color:#416782; font-family:verdana; font-size:10px; color:#e7e7e7; }")
	add(motd,2048,".header { background-color:; font-family:verdana; font-size:10px; color:#FFFFFF; font-weight:800; }")
	add(motd,2048,"</style></head><body>")
	add(motd,2048,"<div align=center><img src=http://www.climbers-germany.de/top15log.jpg> </div>")
	new len = add(motd,2048,"<table border=0 cellspacing=0 cellpadding=1 width=90% align=center class=tabel background=http://climbers-germany.de/e107_themes/cg2k6/images/boxbg.png>")
	len += add(motd[len],2048-len,"<tr><td class=header>Name</td><td class=header>Treffer</td><td class=header>Damage</td></tr>")
	izStats[STATS_SHOTS] = 0
	iAttacker = g_izKilled[id][KILLED_KILLER_ID]
	
	if (iAttacker)
		get_user_astats(id, iAttacker, izStats, izBody)

	// Get and format attacker list
	for (iAttacker = 1; iAttacker <= iMaxPlayer; iAttacker++)
	{
		if (get_user_astats(id, iAttacker, izStats, izBody, t_sWpn, MAX_WEAPON_LENGTH))
		{
			iFound = 1
			get_user_name(iAttacker, t_sName, 32)
			format(line,255,"<tr><td> %s </td><td> %d <td><td> %d</td></tr>", t_sName, izStats[STATS_HITS], id, "HIT_S", izStats[STATS_DAMAGE], id, "DMG")
		}
	}
	        len += add(motd[len], 2048-len, line )
	    format(line, 255, "</table>" )
	    len += format( motd[len], 2048-len, line )
	    add(motd,2048,"</body></html>")
	    show_motd( id, motd, "CG-Climbers")
	    return PLUGIN_HANDLED

	
	if (!iFound)
		sBuffer[0] = 0

	return iFound
}
I have add a picture. It shows only the last player wich I attacked.
So plz help me.
(Kannsch au auf deutsch schreibe und ich hoff mal, man versteht was ich oben auf englisch gechriebe hab ^^)
http://www.fun-elite.de/myhits.bmp
__________________
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 04:57.


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