Raised This Month: $121 Target: $400
 30% 

Click in motd


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JocAnis
Senior Member
Join Date: Jun 2010
Old 12-08-2018 , 23:05   Click in motd
Reply With Quote #1

hello guys..i found this thing: Map editor (Texture MOTD)
It has so many options, but im interested in: what is the thing/code for browsing the motd and then click on something and its executed? i would know that if i load any .php which has already integrated functions, but how to do this without it (without your host/web) ?

also this is maybe even more interesting: Entity properties MOTD
all files are here: https://github.com/jonatan1024/cs-editor

i was searching the .sma there, and came to:
Code:
format(url,32,"entities/entity=%d,%d",entity,id)
ed_motd(id,url,"Entity properties")

ed_motd(id, url[], title[]){
	new content[128], addr[64]
	//get_user_ip(0, addr, 23, 0)
	get_cvar_string("net_address", addr, 64)
	/*copy(addr,23,"xxx.xxx.xxx.xxx:27015")
	if(cl_islocal[id])
		copy(addr,23,"10.0.0.xxx:27015")*/
	format(content,128,"<meta http-equiv=^"refresh^" content=^"0; url=http://%s/%s^">",addr,url) //this line is for showing it, but  wtf ://
	show_motd(id,content,title)
}
i hope his module isnt the thing which is changing this buttons/browsing in motd...

*there is /src/ folder, with texture.cpp + .h.. and other files but i have no idea what are they for and where it should be added (i hope not on the host)...
any explanation is very welcomed! im interested in modifying these properties/buttons for something else
__________________
KZ Public Autocup
DR Timer (selling) - Top15 images
JocAnis is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 12-09-2018 , 04:41   Re: Click in motd
Reply With Quote #2

The MOTD is a web browser and does not point to a local resource (on the game server) so you need a web server to react to the clicks and send them to the server.
__________________
fysiks is offline
KliPPy
AlliedModders Donor
Join Date: May 2013
Location: Serbia
Old 12-09-2018 , 09:12   Re: Click in motd
Reply With Quote #3

That module actually runs a basic HTTP server.

Also Jonatan (Backup) is a wizard, that's well known.
__________________

Last edited by KliPPy; 12-09-2018 at 09:17.
KliPPy is offline
JocAnis
Senior Member
Join Date: Jun 2010
Old 12-09-2018 , 11:21   Re: Click in motd
Reply With Quote #4

well if this is connected with module, then im out, i cant understand nothing about it
i was thinking of sending him a pm for making a tutorial of it, but nah, who knows if he will see the message or smth
__________________
KZ Public Autocup
DR Timer (selling) - Top15 images

Last edited by JocAnis; 12-09-2018 at 11:22.
JocAnis is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 12-11-2018 , 14:21   Re: Click in motd
Reply With Quote #5

Quote:
Originally Posted by JocAnis View Post
well if this is connected with module, then im out, i cant understand nothing about it
i was thinking of sending him a pm for making a tutorial of it, but nah, who knows if he will see the message or smth
As KliPPy said, the module itself is running its own HTTP server on port 80 which answers to some basic GET requests.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
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 06:11.


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