Raised This Month: $32 Target: $400
 8% 

Problem info_motd plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
pepe_thugs
Senior Member
Join Date: Aug 2010
Location: Portugal , Braga
Old 04-07-2012 , 12:55   Problem info_motd plugin
Reply With Quote #1

Hi guys.
I use this code in my server and i have one problem when someone execute one command don't see the all page. if the page have more 40 lines.
Whats the problem ?


PHP Code:
#include <amxmodx>
#include <amxmisc>
 
#define PLUGIN "On command info"
#define VERSION "0.2"
#define AUTHOR "Solor
 
public plugin_init() 
{
 
register_plugin("Info_motd_ig","0.2","Solor")
 
register_clcmd("say /donate","donate")
 
register_clcmd("say_team /donate","donate")
 
register_clcmd("say /admins","admin")
 
register_clcmd("say_team /admins","admin")
 
register_clcmd("say /website","website")
 
register_clcmd("say_team /website","website")
 
register_clcmd("say /site","site")
 
register_clcmd("say_team /site","site")
 
register_clcmd("say /contact","contact")
 
register_clcmd("say_team /contact","contact")
 
register_clcmd("say /hacker","hacker")
 
register_clcmd("say_team /hacker","hacker")
 
register_clcmd("say /commands","commands")
 
register_clcmd("say_team /commands","commands")
 
register_clcmd("say /servers","servers")
 
register_clcmd("say_team /servers","servers")
 
register_clcmd("say /racism","racism")
 
register_clcmd("say_team /racism","racism")
 
register_clcmd("say /rules","rules")
 
register_clcmd("say_team /rules","rules")
 
register_clcmd("say /motd","motd")
 
register_clcmd("say_team /motd","motd")
 
register_cvar("Advertise","90"
        
set_task(get_cvar_float("Advertise"),"advertise" "b"
}
 
public 
donate(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/donate.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
admin(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/admin.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
website(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/website.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
contact(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/contact.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
hacker(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/hacker.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
site(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/website.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
commands(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/commands.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
servers(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/servers.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
public 
racism(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/hacker.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
rules(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/rules.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
motd(id,level,cid)
{
 new 
configsdir[200]
 new 
MOTDfile[200]
 
 
get_configsdir(configsdir,199)
 
format(MOTDfile,199,"%s/motd.txt",configsdir)
 
 
show_motd(id,MOTDfile)
 
client_print(id,print_chat,"Thank you!")
 
 return 
PLUGIN_HANDLED
}
 
public 
advertise()
{
 
client_print(0,print_chat,"say /commands for all available say commands.")
 return 
PLUGIN_HANDLED

pepe_thugs is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-07-2012 , 13:00   Re: Problem info_motd plugin
Reply With Quote #2

try to save it as .html
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
pepe_thugs
Senior Member
Join Date: Aug 2010
Location: Portugal , Braga
Old 04-07-2012 , 13:41   Re: Problem info_motd plugin
Reply With Quote #3

Quote:
Originally Posted by Bilal Pro View Post
try to save it as .html

Thanks, i tried but not working in same.

Last edited by pepe_thugs; 04-07-2012 at 13:42.
pepe_thugs is offline
Bilal Pro
Senior Member
Join Date: Mar 2012
Location: Holland
Old 04-07-2012 , 18:56   Re: Problem info_motd plugin
Reply With Quote #4

Whats ur problem now?
__________________
  • Point System with rank titles for sale [X] [100% private]
  • VIP Menu for sale [X] [100% private]
  • HnS shop more features for sale [X] [100% private]
Contact: Bilalzaandam1234, on steam if you are interested.
Bilal Pro is offline
bazhenov93
Veteran Member
Join Date: Oct 2010
Old 04-07-2012 , 20:34   Re: Problem info_motd plugin
Reply With Quote #5

Show your html code
bazhenov93 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-08-2012 , 02:07   Re: Problem info_motd plugin
Reply With Quote #6

The MOTD can only display a finite number of characters (1536 IIRC) when the server has to send the client the file.
__________________
fysiks is offline
pepe_thugs
Senior Member
Join Date: Aug 2010
Location: Portugal , Braga
Old 04-08-2012 , 08:12   Re: Problem info_motd plugin
Reply With Quote #7

Quote:
Originally Posted by Bilal Pro View Post
Whats ur problem now?
My problem it's the same.
No results the file in .htm

Quote:
Originally Posted by fysiks View Post
The MOTD can only display a finite number of characters (1536 IIRC) when the server has to send the client the file.
I don't say infinite lines.
But the client can see the page and walk with the scroll.
My page are this :

PHP Code:
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<
html>
<
head>
<
meta http-equiv="Content-Language" content="en-us">
<
title>GFG Server!</title>
<
style type="text/css">
pre font-familyVerdana,Tahomacolor#FFFFFF; }
body backgroundblackmargin-left8pxmargin-top0px; }
text-decorationunderline; }
a:link color#FFFFFF; }
a:visited color#FFFFFF; }
a:active color#FFFFFF; }
a:hover color#FFFFFF; text-decoration: underline; }
</style>
</
head>
 
<
body>
<
pre>
<
font color="#FFFF00"><b>Todos os Comandos Disponiveis do Servidor:</b></font>
<
font color="#FF0000">/menu</font> --> Para abrir o Menu de Cliente
<font color="#FF0000">/rr ; /rts ou /resetscore</font> --> Para apagares o teu score
<font color="#FF0000">/contacto</font> --> Para saber o Contacto Geral do Servidor
<font color="#FF0000">/forum</font> --> Para saber o link para o nosso Forum
<font color="#FF0000">/site</font> --> Para saber o link do nosso Site Oficial
<font color="#FF0000">/xiter</font> --> Para fazer uma Reclamacao sobre um Cheater no Servidor
<font color="#FF0000">/regras</font> --> Para ler todas as Regras do Servidor
<font color="#FF0000">/server</font> --> Para abrir o Menu de todos os Servidores
<font color="#FF0000">/ts3</font> --> Para entrar no nosso TeamSpeak
<font color="#FF0000">/roundsound</font> --> Para Activares ou Desactivares Sons do Servidor
<font color="#FF0000">/vip</font> --> Comprar Vip
<font color="#FF0000">/vipinfo</font> --> Informacoes Vip
<font color="#FF0000">/vantagens</font> --> Informacoes Vip
<br />
</
pre>
</
body
And with this page i walk with scroll and i can't see the all page.
I only see the page head.

Last edited by pepe_thugs; 04-08-2012 at 08:16.
pepe_thugs is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 04-08-2012 , 12:35   Re: Problem info_motd plugin
Reply With Quote #8

You need to describe your problem much better next time. There are two things wrong with your motd. First, like I already said, you can't have more than 1536 characters in a file that is displayed with show_motd(). Second, you can't use a <!DOCTYPE> declaration in any page that you want displayed (and scrolling correctly) in the MOTD screen.
__________________
fysiks is offline
pepe_thugs
Senior Member
Join Date: Aug 2010
Location: Portugal , Braga
Old 04-09-2012 , 08:47   Re: Problem info_motd plugin
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
You need to describe your problem much better next time. There are two things wrong with your motd. First, like I already said, you can't have more than 1536 characters in a file that is displayed with show_motd(). Second, you can't use a <!DOCTYPE> declaration in any page that you want displayed (and scrolling correctly) in the MOTD screen.
Thanks fysiks the scrolling is working well.
But how give the file to the client if the file have more the 1536 charaters?
pepe_thugs is offline
payampap
Junior Member
Join Date: Nov 2011
Old 04-09-2012 , 18:58   Re: Problem info_motd plugin
Reply With Quote #10

if you are reaching the limit ..

upload your html file,
put "http://#$%^!.com/mypage.html" into the show_motd() as message[] ( arg 2 )
payampap is offline
Reply



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:05.


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