Raised This Month: $ Target: $400
 0% 

MOTD Help


Post New Thread Reply   
 
Thread Tools Display Modes
KMFrog
Senior Member
Join Date: Oct 2007
Old 12-24-2007 , 07:44   Re: MOTD Help
Reply With Quote #11

No...

ShowMOTDPanel needs a string representing the file path / url
you cant send it a handle...

look at the docs.. when it says string, it means it ;]
http://docs.sourcemod.net/api/index....d=show&id=121&

I'm going to have to start showing the MOTD window soon, so if youve not figured it out by then i'll post how i did it
__________________
Was I helpful or not? Rate Me!
KMFrog is offline
TFN|Nick
Senior Member
Join Date: Sep 2007
Old 12-24-2007 , 12:26   Re: MOTD Help
Reply With Quote #12

gah! The forums broken! It says you've posted KM but i can't get onto the second page

Edit: Now i can!

EDIT2: Yeah i read up on it... i was going to suggest the handle to the file and then if that didn't work saving the text into a string buffer and displaying it that way.

@TheDOO: you could try something like this-

PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<
html>
<
head>
<
title>Your Page Title</title>
<
meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
<
BODY>
Optional page text here.
</
BODY>
</
HTML
As opposed to any actual text in there!

Last edited by TFN|Nick; 12-24-2007 at 12:30.
TFN|Nick is offline
Send a message via MSN to TFN|Nick
V0gelz
Senior Member
Join Date: Jun 2004
Old 12-24-2007 , 16:52   Re: MOTD Help
Reply With Quote #13

Quote:
Originally Posted by KMFrog View Post
No...

ShowMOTDPanel needs a string representing the file path / url
you cant send it a handle...

look at the docs.. when it says string, it means it ;]
http://docs.sourcemod.net/api/index....d=show&id=121&

I'm going to have to start showing the MOTD window soon, so if youve not figured it out by then i'll post how i did it
Well can you show us how you did it because i'm trying to add this to and i'm getting some problems to... i tryed to do it with

Code:
new temp[1299];
temp = "My Info!!!";
ShowMOTDPanel(client, "Jetpack INFO", temp, MOTDPANEL_TYPE_INDEX);
but i'm keep getting errors tho :p ( i guess it's the MOTDPANEL_TYPE_INDEX ) but i don't realy know where to find the different type's.. can someone tell me where to find it? was looking in http://docs.sourcemod.net/api/ but no luck there.
V0gelz is offline
pRED*
Join Date: Dec 2006
Old 12-24-2007 , 18:52   Re: MOTD Help
Reply With Quote #14

#define MOTDPANEL_TYPE_TEXT 0 /**< Treat msg as plain text */
#define MOTDPANEL_TYPE_INDEX 1 /**< Msg is auto determined by the engine */
#define MOTDPANEL_TYPE_URL 2 /**< Treat msg as an URL link */
#define MOTDPANEL_TYPE_FILE 3 /**< Treat msg as a filename to be openned */
pRED* is offline
TheDOO
Member
Join Date: Nov 2007
Old 12-24-2007 , 22:02   Re: MOTD Help
Reply With Quote #15

Quote:
Originally Posted by TFN|Nick View Post
gah! The forums broken! It says you've posted KM but i can't get onto the second page

Edit: Now i can!

EDIT2: Yeah i read up on it... i was going to suggest the handle to the file and then if that didn't work saving the text into a string buffer and displaying it that way.

@TheDOO: you could try something like this-

PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<
html>
<
head>
<
title>Your Page Title</title>
<
meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>
<
BODY>
Optional page text here.
</
BODY>
</
HTML
As opposed to any actual text in there!
Yeah, I knew about the webpage way, but was trying to have it just display the file from the server. How would you go about saving the text into a string buffer?

KMFrog, if you could show me how you do it, i'd be very grateful.

Thanks for your help everyone!

Last edited by TheDOO; 12-25-2007 at 01:25.
TheDOO is offline
V0gelz
Senior Member
Join Date: Jun 2004
Old 12-25-2007 , 05:03   Re: MOTD Help
Reply With Quote #16

Thanks again pred with MOTDPANEL_TYPE_TEXT it works perfect.
V0gelz is offline
TheDOO
Member
Join Date: Nov 2007
Old 12-28-2007 , 02:00   Re: MOTD Help
Reply With Quote #17

Yeah I still can't get it to work. When I use MOTDPANEL_TYPE_FILE, it's not reading from the server, just the client, so it's not showing anything.
TheDOO is offline
V0gelz
Senior Member
Join Date: Jun 2004
Old 12-28-2007 , 15:16   Re: MOTD Help
Reply With Quote #18

then i guess we will have to make them download the .txt :/
V0gelz is offline
TheDOO
Member
Join Date: Nov 2007
Old 12-29-2007 , 05:17   Re: MOTD Help
Reply With Quote #19

Well I want it to show a serverside motd.html since text is limited on how much is displayed. And they can't download a .html file, at least I couldn't get it to work. There must be something I'm doing wrong.
TheDOO is offline
V0gelz
Senior Member
Join Date: Jun 2004
Old 12-29-2007 , 09:54   Re: MOTD Help
Reply With Quote #20

Well ye, and if we make a change they won't see the changes in the html or txt file..
V0gelz 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 07:13.


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