AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to open text files on players screen??? (https://forums.alliedmods.net/showthread.php?t=10963)

XunTric 03-06-2005 06:06

How to open text files on players screen???
 
Hey! Im working on a pretty big new plugin.
And what I want is when somebody type "/help" a help file will show up on their screen.
Like the motd...
Whats the command to do that?

nightscreem 03-06-2005 06:41

maybe look in this it's the say /motd plugin
Code:
#include <amxmodx> #include <amxmisc> public admin_motd(id,level,cid){     if (!cmd_access(id,level,cid,1))         return PLUGIN_HANDLED         show_motd(id,"motd.txt","Message of the Day.")     return PLUGIN_HANDLED   } public plugin_init() {     register_plugin("say_motd","1.0","Pain")     register_concmd("say /motd","admin_motd",0,"- Shows the MOTD.")       return PLUGIN_CONTINUE }

XunTric 03-06-2005 08:17

Ok thanks. But whats the "Message of the day" good for?

NiGHTFiRE 03-06-2005 08:51

MOTD= Message of the day

XunTric 03-06-2005 09:25

Ok thanks people. I got another little problem.
I dont know anything about html.
When the message shows up its just black letters with white background.
Can somebody give me the html cmds to change letter and background color? And the numbers for each color?
Thanks

xeroblood 03-06-2005 10:19

Quote:

Originally Posted by XunTric
Ok thanks. But whats the "Message of the day" good for?

From this line:

show_motd(id,"motd.txt","Message of the Day.")

the Text "Message of the Day" will be the Title of the MOTD Window that displays, so in your window, you may change the title...


Basic HTML template:

Code:



<html>
<head></head>
<body text="red" bgcolor="green">

<center>Centered Text</center>


Bold Text


Italics Text


<u>Underlined Text</u>



HTML is simple, just look here: HTML Reference

And for Color Codes, read this: Hex Color Codes

</body>
</html>

Save that as a .htm or .html file and open it up from your computer in your web browser to view it offline...

XunTric 03-06-2005 11:28

Thanks. And just one last question. When you write a link. Whats the command to make it so you can click on it?

XunTric 03-06-2005 11:38

Omg sorry for my stupidness.
Stands in xeroblood's post :lol:

v3x 03-06-2005 12:15

Off topic:

Does anyone know what the limit is for charactors in motd.txt? Because when my motd window loads, it cuts off some stuff at the end :(.

TotalNoobScripter 03-06-2005 12:25

i think its 1024.


All times are GMT -4. The time now is 14:15.

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