ID:175197
 
How would I add one of those HTML pop ups into my game, that show up when you login. I recall somebody saying you have to make it in a .txt document then just attach it to your game. But that dosn't work for me. I also tried commands such as run() ect. All help is appreaciated.
Lookup browse() and browse_rsc() in the refrence or F1 help in dream Maker.

to have the usr look at the file 'html.txt' in a pop-up you would do something like:

usr<<browse('html.txt',"window=popuphtmlwindow")// have the usr see 'html.txt' in a popup window called "pophtmlwindow"


Or to create the html on the fly you could do something like:

var/html={"
<HTML>
<HEAD>
<TITLE>
[usr.name]'s info</TITLE>
</HEAD>
<BODY>
<P>
[usr.name]'s Key = [usr.key]</P>
<P>
[usr.name]'s IP = [usr.client.address]</P>
</BODY>
</HTML>"}

usr <<browse(html,"window=popuphtml")


This way you can add extra functionality (and better formats) to things such as "Who" commands. The "{}" allow you to go from line to line without worrying so much about indentation and/or getting all the html on one line.