Raised This Month: $ Target: $400
 0% 

How do i send a motd window to a client?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
EKS
Veteran Member
Join Date: Mar 2004
Location: Norway
Old 01-14-2006 , 20:22   How do i send a motd window to a client?
Reply With Quote #1

The one you get when you connect from motd.txt ? Basicly i wanna send a custom one with a url or text in it.
EKS is offline
Elbandi
Member
Join Date: Jun 2005
Location: Budapest, Hungary
Old 01-14-2006 , 21:13  
Reply With Quote #2

check PsychoViewer 1.2 source
__________________
8 hobbit = 1 hobbyte?
Elbandi is offline
Send a message via ICQ to Elbandi Send a message via MSN to Elbandi
showdax
Senior Member
Join Date: Dec 2004
Old 01-14-2006 , 21:31  
Reply With Quote #3

Code:
KeyValues *panel = new KeyValues("", "msg", [address], "title", [title]);
panel->SetInt("type", TYPE_URL);

CBasePlayer *player = [get player's object];
player->ShowViewPortPanel("info", [load hidden: true/false], panel);

panel->deleteThis();
Replace the stuff in square brackets and that should work. Don't forget to compile KeyValues.cpp.

Oh and TYPE_URL is defined in this:
Code:
enum
{
        TYPE_TEXT = 0,  /* just display this plain text */
        TYPE_INDEX,     /* lookup text & title in stringtable */
        TYPE_URL,       /* show this URL */
        TYPE_FILE,      /* show this local file */
};
showdax is offline
Send a message via MSN to showdax
c0ldfyr3
AlliedModders Donor
Join Date: Aug 2005
Location: Ireland
Old 01-14-2006 , 21:54  
Reply With Quote #4

Or, if you tried searching first...

That method doesnt need CBaseEntity.
__________________
c0ldfyr3 is offline
Send a message via MSN to c0ldfyr3 Send a message via Yahoo to c0ldfyr3
-=|JFH|=-cLaD
Senior Member
Join Date: Jun 2004
Old 01-24-2006 , 12:22  
Reply With Quote #5

maybe i'm wrong, but it looks like he's asking how he can make a client read the MOTD after he is connected to the server.
if that is the case,and you have mani installed run this command in your console.
ma_cexec <name/id> "say motd"
-=|JFH|=-cLaD is offline
Send a message via Yahoo to -=|JFH|=-cLaD
SeLfkiLL
Member
Join Date: Nov 2005
Old 01-25-2006 , 01:29  
Reply With Quote #6

Quote:
Originally Posted by -=|JFH|=-clad
maybe i'm wrong, but it looks like he's asking how he can make a client read the MOTD after he is connected to the server.
if that is the case,and you have mani installed run this command in your console.
ma_cexec <name/id> "say motd"
You're right! Everyone knows that every server comes complete with a Mani Mod installation. But just in case the server is retarded and has extra chromosomes, you can use the Proper English Pseudo-Gaben Code Language to solve this problem.
Code:
When the user has greeted the server with a smile, you may feel it necessary by chance to give the user a MOTD window. If the user is stubborn, send his steamid to steambans.com and unbind all his keys.
SeLfkiLL is offline
Send a message via AIM to SeLfkiLL
[email protected]
Member
Join Date: Dec 2005
Old 01-25-2006 , 05:47  
Reply With Quote #7

Yes!! Proper English Pseudo-Gaben Code strikes again!!!
Lojo.jacob@gmail.com is offline
sslice
Senior Member
Join Date: Feb 2005
Location: Texas, USA
Old 01-25-2006 , 18:23  
Reply With Quote #8

I believe the client command "showinfo" brings up the MOTD

Edit: Nevermind, I need to read more carefully... showdax has a good example, or you can look at the source to PsychoViewer.
__________________
sslice 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 15:00.


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