AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Style the MOTD window (https://forums.alliedmods.net/showthread.php?t=45521)

ch3cker 10-04-2006 16:04

Style the MOTD window
 
Hi Guys
i just want to know how is it possible to style the modt window. You know the motd window of the wc3 FT plugin for the /playerskills command. So how is it possible to fix the Words like in a table and define the colors of words.

Can you make a tutorial or something with me and others can work with ??

dEMolite 10-04-2006 16:32

Re: Style the MOTD window
 
its pure html style witch is passed in amxx.

ch3cker 10-04-2006 16:44

Re: Style the MOTD window
 
but how is it possible to fix some words like in a table ?

stupok 10-04-2006 17:04

Re: Style the MOTD window
 
Use an html program, like Microsoft FrontPage. Or try using the free AMXX-Studio, available on the AMXX homepage. It has a little MOTD generator with html.

dEMolite 10-06-2006 15:34

Re: Style the MOTD window
 
When u don't understand it here is a littel snippet from my top15 list:
Code:
public show_top15_climbers( id ) {     if( !climbtimer_on )         return PLUGIN_HANDLED           //new buffer[2048]     new line[256]         new motd[2048]         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>#</td><td class=header>Name</td><td class=header>Time</td></tr>")     for(new i = 0; i < 15; ++i) {         if( top15_times[i] == CT_MAX_TIME )         {             format(line,255,"<tr><td> %d. <td> %s <td> %s", (i+1), "&lt;----------&gt;", "&lt;not set&gt;")         }         else{             format(line,255,"<tr><td> %d. <td> %s <td> (%d:%02d)", (i+1), top15_names[i], (top15_times[i]/60) , (top15_times[i]%60))         }                         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   }

desert 10-06-2006 15:42

Re: Style the MOTD window
 
demolite what you did is very confusing lol. Using HTML is probably the more easier way. Use Dreamweaver in design mode to create your page then save it as a .txt file and save that in your cstrike folder and your set.

dEMolite 10-06-2006 22:29

Re: Style the MOTD window
 
i only used csstyle in it ;) thats why its confused abit.

desert 10-06-2006 22:49

Re: Style the MOTD window
 
I see. Kinda cool though. <- newbie at plugin creations so im lost with that but ask me pretty much anything bout web design and i know it all :P

well maybe not all but alot :P

ch3cker 10-07-2006 18:46

Re: Style the MOTD window
 
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 :D und ich hoff mal, man versteht was ich oben auf englisch gechriebe hab ^^)
http://www.fun-elite.de/myhits.bmp

ch3cker 10-08-2006 19:08

Re: Style the MOTD window
 
so nobody can help me ??


All times are GMT -4. The time now is 04:57.

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