Raised This Month: $51 Target: $400
 12% 

MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 03-29-2005 , 16:29   MOTD
Reply With Quote #1

How can I get a MOTD Window to show...
I have tried everything I know to get one to show...with no luck what soever...

Can anyone point me in the right direction?
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
tron73
Senior Member
Join Date: Apr 2004
Location: Schulzendorf / germany
Old 03-29-2005 , 17:20  
Reply With Quote #2

Perhaps you ask mani, i think he has "motd" and "rules" as a say-command implemented.

Sorry, but I am only a user of the great plugins here!

Good work from all of you!


Go on!
tron73 is offline
Send a message via ICQ to tron73
imported_TheOne
Junior Member
Join Date: Dec 2004
Old 03-29-2005 , 17:24  
Reply With Quote #3

Hello

you need to just use a redirect here is the code, just change the 2 urls for your webspace.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html> 

<HEAD> 
<title>Redirect Webpage</title> 
<meta http-equiv="refresh" content="0;URL=http://www.motd.com"> 
</HEAD> 

<body bgcolor="#000000" text="#FFFF00" link="#FFFF00"> 

<p align="center">Loading...</p> 

</body> 

</html>
Reguards
Russell
__________________

==================================
www.cssprays.co.uk
www.digitalservers.org
imported_TheOne is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 03-29-2005 , 21:20  
Reply With Quote #4

Quote:
Originally Posted by TheOne
Hello

you need to just use a redirect here is the code, just change the 2 urls for your webspace.

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html> 

<HEAD> 
<title>Redirect Webpage</title> 
<meta http-equiv="refresh" content="0;URL=http://www.motd.com"> 
</HEAD> 

<body bgcolor="#000000" text="#FFFF00" link="#FFFF00"> 

<p align="center">Loading...</p> 

</body> 

</html>
Reguards
Russell

No I need to find out how to fire off the window on command..
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 03-29-2005 , 22:54  
Reply With Quote #5

Code:
void CPlayer::ShowMOTD(const char* lpcMsg, const char* lpcTitle, int iType, const char* lpcCmd){
	KeyValues* kv = new KeyValues("data");
	
	kv->SetString("title", lpcTitle);	// info panel title
	kv->SetString("type", "1");			// show userdata from stringtable entry
										//	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
	kv->SetString("msg", lpcMsg);		// use this stringtable entry

	if(lpcCmd && *lpcCmd)
		kv->SetString("cmd", lpcCmd);// exec this command if panel closed

	ShowViewPortPanel(m_pEdict, "info", true, kv);

	kv->deleteThis();
}

void ShowViewPortPanel(edict_t* pEdict, const char* name, bool bShow, KeyValues* data){
	int count = 0;
	KeyValues *subkey = NULL;

	if(data){
		subkey = data->GetFirstSubKey();
		
		while(subkey){
			count++;
			
			subkey = subkey->GetNextKey();
		}

		subkey = data->GetFirstSubKey(); // reset 
	}

	msgs.BeginToOne("VGUIMenu", pEdict);
	
	WRITE_STRING(name); // menu name
	WRITE_BYTE(bShow ? 1 : 0);
	WRITE_BYTE(count);
		
	// write additional data (be carefull not more than 192 bytes!)
	while(subkey){
		WRITE_STRING(subkey->GetName());
		WRITE_STRING(subkey->GetString());
		
		subkey = subkey->GetNextKey();
	}
	
	msgs.End();
}
Or just the "showinfo" command
__________________
Avoid like the plague.
vancelorgin is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 03-29-2005 , 23:15  
Reply With Quote #6

Quote:
Originally Posted by vancelorgin
Code:
void CPlayer::ShowMOTD(const char* lpcMsg, const char* lpcTitle, int iType, const char* lpcCmd){
	KeyValues* kv = new KeyValues("data");
	
	kv->SetString("title", lpcTitle);	// info panel title
	kv->SetString("type", "1");			// show userdata from stringtable entry
										//	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
	kv->SetString("msg", lpcMsg);		// use this stringtable entry

	if(lpcCmd && *lpcCmd)
		kv->SetString("cmd", lpcCmd);// exec this command if panel closed

	ShowViewPortPanel(m_pEdict, "info", true, kv);

	kv->deleteThis();
}

void ShowViewPortPanel(edict_t* pEdict, const char* name, bool bShow, KeyValues* data){
	int count = 0;
	KeyValues *subkey = NULL;

	if(data){
		subkey = data->GetFirstSubKey();
		
		while(subkey){
			count++;
			
			subkey = subkey->GetNextKey();
		}

		subkey = data->GetFirstSubKey(); // reset 
	}

	msgs.BeginToOne("VGUIMenu", pEdict);
	
	WRITE_STRING(name); // menu name
	WRITE_BYTE(bShow ? 1 : 0);
	WRITE_BYTE(count);
		
	// write additional data (be carefull not more than 192 bytes!)
	while(subkey){
		WRITE_STRING(subkey->GetName());
		WRITE_STRING(subkey->GetString());
		
		subkey = subkey->GetNextKey();
	}
	
	msgs.End();
}
Or just the "showinfo" command

Thank you vancelorgin your awesome!!
With out your help half the things in my plugin would have never gotten done, and I greatly appreciate it.
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 03-30-2005 , 21:30  
Reply With Quote #7

is there any way around the 192 character limit?

Ive tried adding subkeys each with a new line ive tried everything I could think of to try and
if its more than 192 characters the panel wont show...grrrr
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
vancelorgin
Senior Member
Join Date: Dec 2004
Location: san frandisco
Old 03-30-2005 , 22:20  
Reply With Quote #8

add a network string and shove it up the info panel's ass

courtesy of apophis (die)
__________________
Avoid like the plague.
vancelorgin is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 03-30-2005 , 22:52  
Reply With Quote #9

Quote:
Originally Posted by vancelorgin
add a network string and shove it up the info panel's ass

courtesy of apophis (die)
Ive not used any network strings...
and trying to add anything to do with them puts me way back to all kinds of baseentity errors and linker errors...

I give up for the night..
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart is offline
BeetleFart
SourceMod Donor
Join Date: Apr 2004
Old 04-01-2005 , 08:30  
Reply With Quote #10

Quote:
Originally Posted by vancelorgin
add a network string and shove it up the info panel's ass

courtesy of apophis (die)
Thank you vancelorgin


Youve helped me tremendously again!!
__________________
CSource Server:
69.90.34.10:27015 Beetlesmod.com And CS-Addicts{US}



http://www.clanuseast.com
BeetleFart 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 19:41.


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