Raised This Month: $ Target: $400
 0% 

Read from motd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-17-2007 , 07:09   Read from motd
Reply With Quote #1

If I make a text area in motd is there any way to transport the modified text back to my plugin? This could very useful!
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-17-2007 , 07:13   Re: Read from motd
Reply With Quote #2

What you mean? Post the text....
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-17-2007 , 07:20   Re: Read from motd
Reply With Quote #3

Code:
new len
new msg[MAX_SIZE]

len = format(msg, MAX_SIZE,"<html><head></head><body><textarea rows=^"100^" cols=^"50^">")
len+= format(msg, MAX_SIZE-len,"Original txt here")        
len+= format(msg, MAX_SIZE-len,"</textarea></body></html>",txt)
    
show_motd(player, msg, "Text edit")
I want to read the modified text...
__________________
I am 52% addicted to Counterstrike. What about you?

Last edited by Toster v2.1; 06-17-2007 at 07:24.
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 06-17-2007 , 07:24   Re: Read from motd
Reply With Quote #4

Dunno what you are talking about ! Be more specific...what modified text?
__________________
Still...lovin' . Connor noob! Hello
Alka is offline
anssik
Senior Member
Join Date: May 2006
Location: Suomi Finland Perkele
Old 06-17-2007 , 07:26   Re: Read from motd
Reply With Quote #5

He means doing like a form textarea and a submit button in html, then getting th e form post/get in the plugin. I thought of this too sometime ago, but couldn't find any way to do it.
__________________
anssik is offline
P34nut
AMX Mod X Beta Tester
Join Date: Feb 2006
Location: Netherlands
Old 06-17-2007 , 07:28   Re: Read from motd
Reply With Quote #6

You cannot do that
__________________
All you need to change the world is one good lie and a river of blood
P34nut is offline
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-17-2007 , 07:54   Re: Read from motd
Reply With Quote #7

Why not... I made a screenshot!
Well this can be done in php, but I'm too lazy to learn... Maybe next year!
Attached Thumbnails
Click image for larger version

Name:	hl 2007-06-17 14-52-28-95.jpg
Views:	209
Size:	57.2 KB
ID:	17115  
__________________
I am 52% addicted to Counterstrike. What about you?

Last edited by Toster v2.1; 06-17-2007 at 07:56.
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Sylwester
Veteran Member
Join Date: Oct 2006
Location: Poland
Old 06-17-2007 , 09:25   Re: Read from motd
Reply With Quote #8

I though about it and its possible, but not directly. The way I found out is to use some web server. Make the motd open web site that contains text area. User will insert some string there and web server will store it in some database (ex. sql). Now you can read it with your plugin.

There are some problems with this. Motd is very low web browser. Many things will now work in it and also it doesnt display last inserted character. To see this character you must insert another one, press mouse button inside motd or use scroll.
__________________
Impossible is Nothing
Sylwester is offline
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-17-2007 , 09:29   Re: Read from motd
Reply With Quote #9

I still think it would be easier with php...
Anyone know how to download file trough http protocol???
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 06-17-2007 , 09:49   Re: Read from motd
Reply With Quote #10

I'm not sure I know exactly what you mean, but w3schools might be of some use.
Lee is offline
Reply


Thread Tools
Display Modes

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 10:31.


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