AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   strange motd error (https://forums.alliedmods.net/showthread.php?t=68479)

SchlumPF* 03-17-2008 09:12

strange motd error
 
i already asked alka for this but neither he or me do know why this does happen: this code does just show a white motd without any content

PHP Code:

new dir[128]
get_cvar_string"kz_php_directory"dirsizeof dir )
           
formatdirsizeof dir 1"http://%s/help.htm"dir )
            
show_motdplrdir"Commands" 

the html file looks like this
PHP Code:

<html>
    <
head>
        <
title>Help<title>
        <
style>
            
body {background-color#000000;}
            
.table {border-width0pxfont-size12pxbackground-color#1a1a1a; font-family: Arial, Helvetica, sans-serif;}
            
.header {padding0pxbackground-imageurl(images/table/title_bg.gif); height25px;}
            .
titleline {padding-left40pxbackground-color#000000; color: #ffffff; font-size: 13px;}
            
.mapline {padding-left66pxbackground-color#000000; color: #a0bdff; font-size: 16px;}
            
.footer {padding0pxbackground-color#000000;}
            
.lightblue {color#a0bdff;}
            
.lightblue2 {color#a0bdff; padding-left: 26px;}
            
.medblue {color#5b80d4;}
            
.medblue2 {color#5b80d4; padding-left: 26px;}
            
.darkblue {color#384b78;}
            
.darkblue2 {color#384b78; padding-left: 26px;}
        
</style>
    </
head>
    
    <
body>
        <
table  cellspacing="0" cellpadding="1" width="90%" align="center" class="table">
            <
tr>
                <
td class="titleline" colspan="2" align="left"><b>&raquoSchlumPF's Kreedz Plugin</b></td>
            </tr>
            <tr>
                <td class="mapline" colspan="2" align="left"><b>&raquo; Commands</b></td>
            </tr>
            <tr>
                <td class="header" width="35%"><img src="images/table/help_command.gif"></td>
                <td class="header" width="65%"><img src="images/table/help_description.gif"></td>
            </tr>
            <tr>
                <td class="lightblue2">say /cp, say /check, say /checkpoint</td>
                <td class="lightblue2">Creates a checkpoint at your current position</td>
            </tr>
            <tr>
                <td class="medblue2">say /gc, say /gocheck, say /tp</td>
                <td class="medblue2">Teleports you to your last checkpoint</td>
            </tr>
            <tr>
                <td class="lightblue2">say /stuck, say /unstuck</td>
                <td class="lightblue2">Teleports you back to your previous checkpoint</td>
            </tr>
            <tr>
                <td class="medblue2">say /reset</td>
                <td class="medblue2">Resets your timer, checkpoints and gochecks</td>
            </tr>
            <tr>
                <td class="lightblue2">say /spawn, say /respawn</td>
                <td class="lightblue2">Moves to the spawn place</td>
            </tr>
            <tr>
                <td class="medblue2">say /start, say /restart</td>
                <td class="medblue2">Moves you back to the start button</td>
            </tr>
            <tr>
                <td class="lightblue2">say /finish</td>
                <td class="lightblue2">Moves you to the stop button</td>
            </tr>
            <tr>
                <td class="medblue2">say /weapons, say /scout</td>
                <td class="medblue2">Gives you some extra weapons</td>
            </tr>
            <tr>
                <td class="lightblue2">say /spec</td>
                <td class="lightblue2">Moves you to spectators</td>
            </tr>
            <tr>
                <td class="medblue2">say /ct, say /unspec</td>
                <td class="medblue2">Moves you to CT-Team</td>
            </tr>
            <tr>
                <td class="lightblue2">say /invis</td>
                <td class="lightblue2">Makes players or water invisible to get more fps</td>
            </tr>
                <td class="medblue2">say /measure, say /distance</td>
                <td class="medblue2">Opens a menu to measure jumps</td>
            </tr>
            <tr>
                <td class="lightblue2">say /map</td>
                <td class="lightblue2">show the name of the current map</td>
            </tr>
            <tr>
                <td class="medblue2">say /1337, say /leet</td>
                <td class="medblue2">Shows the current leet climber</td>
            </tr>
            <tr>
                <td class="lightblue2">say /pro10, say /pro15</td>
                <td class="lightblue2">Shows up the pro15 of the current map</td>
            </tr>
            <tr>
                <td class="medblue2">say /nub10, say /nub15</td>
                <td class="medblue2">Shows up the nub15 of the current map</td>
            </tr>
            <tr>
                <td class="lightblue2">say /info, say /help, say /menu</td>
                <td class="lightblue2">Opens the options menu</td>
            </tr>
            <tr>
                <td class="medblue2">say /god, say /godmode</td>
                <td class="medblue2">Enables/disables godmode after you finished the current map, without using checkpoints</td>
            </tr>
            <tr>
                <td class="lightblue2">say /nc, say /noclip</td>
                <td class="lightblue2">Enables/disables noclip after you finished the current map, without using checkpoints</td>
            </tr>
            <tr>
                <td class="medblue2">bind key +hook</td>
                <td class="medblue2">You can use the hook after you finished the current map</td>
            </tr>
            <tr>
                <td class="header"  colspan="7" align="left"><img src="images/table/footer_website.gif"></td>
            </tr>
        </table>
    </body>
</html> 


Sn!ff3r 03-17-2008 13:10

Re: strange motd error
 
Motd can't have more than 1200 chars.

Alka 03-17-2008 13:11

Re: strange motd error
 
Doesn't matter that, his motd is totaly blank...

YamiKaitou 03-17-2008 14:20

Re: strange motd error
 
What is the full url that you are using to display the motd?

ConnorMcLeod 03-17-2008 14:26

Re: strange motd error
 
url doesn't matter, just tried with this motd.txt and result is the same :
This shouldn't amxx related.
PHP Code:

<html>
<
body>
<
br>
<
center>
  <
table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
    <
tr>
      <
td><div align="center"><font size="1" face="trebuchet ms">Loading ... 
          </
font></div></td>
    </
tr>
  </
table>
</
center>
<
meta http-equiv="Refresh" content="0; URL=http://doktor.haze.free.fr/kz/help.htm">
</
body>
</
html


SchlumPF* 03-17-2008 14:41

Re: strange motd error
 
Quote:

Originally Posted by Sn!ff3r (Post 598050)
Motd can't have more than 1200 chars.

it can if you redirect to any webcontent. motd just has a maximum of 1200charakters if you create a motd with amxx which will be shown if im right. samw with php and motd... a motd can just show php if u redirect to any webserver

so what do you guys think should i do? rape google for an answer?!

|PJ| Shorty 03-17-2008 21:37

Re: strange motd error
 
Code:

new dir[128]
get_cvar_string( "kz_php_directory", dir, sizeof dir - 1 )
 
format( dir, sizeof dir - 1, "<IFRAME src=^"http://%s/help.htm^" width=^"100%^" height=^"1000^"></IFRAME>", dir )
 
show_motd( plr, dir, "Commands" )

donīt know sure, but i think you canīt open an url with show_motd() directly.
please try this.

kp_uparrow 03-17-2008 22:10

Re: strange motd error
 
cant open a local html directly, put it on a webserver

SchlumPF* 03-18-2008 08:47

Re: strange motd error
 
shorty that does not work :(
uparrow ill try it

ConnorMcLeod 03-18-2008 11:23

Re: strange motd error
 
Quote:

Originally Posted by SchlumPF* (Post 598328)
uparrow ill try it

Will be the same, as you can see i've already tested on post #5

|PJ| Shorty 03-18-2008 13:06

Re: strange motd error
 
if http://doktor.haze.free.fr/kz/help.htm is your help file url, it is also blank.

problem is your help.htm
PHP Code:

<title>Help<title

should be
PHP Code:

<title>Help</title


SchlumPF* 03-19-2008 00:00

Re: strange motd error
 
ah damn xD ill try it :/
will edit this later

Vet 03-19-2008 00:55

Re: strange motd error
 
Quote:

Originally Posted by kp_uparrow (Post 598231)
cant open a local html directly, put it on a webserver

Not true. If you assign a frame with a precached source that starts with ./ it will load from the client's hard drive,

SchlumPF* 03-19-2008 10:59

Re: strange motd error
 
thx shorty... u found the missing charakter for me... as so often xD


All times are GMT -4. The time now is 08:33.

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