AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved/Old Plugins (https://forums.alliedmods.net/forumdisplay.php?f=27)
-   -   Say commands w/ MOTD Popup (https://forums.alliedmods.net/showthread.php?t=21661)

pulpy 12-07-2005 01:28

Say commands w/ MOTD Popup
 
2 Attachment(s)
This is my absolute very first plugin lol. I hope its useful for ppl. I couldnt have made it without Lord Saddler. He started it. He gave me the initial /donate part, and i added all the others. Basically this plugin allows anyone to say or team say a command with the / in front of it, and if its the right command they will get an MOTD window with either help info, or w/e the server admin chooses. Its nothing to exciting mainly to just help your players learn the rules, certain plugins/mods u have, etc.

Also im bad with making up names lol, so thats my best one ^-^

Install Instructions: Place the .sma file in your scripting folder, then place the .amxx in your plugins folder, then add info_motd_ig.amxx to the bottom of your plugins.ini file. After that make your own .txt files for each MOTD and place them in your amxmodx/configs dir, and your set :) Change map or reboot server for changes to take effect.

Code:

#include <amxmodx>
#include <amxmisc>

#define PLUGIN        "On command info"
#define VERSION        "0.2"
#define AUTHOR        "Solor

/* Credit to Lord Saddler, as he gave me the initial Donate.sma
  with the /donate commands. I just expanded it into this, and
  added an advertise portion to it to. Also i got help with the
  advertisement part from Suicid3.
  So credit to Lord Saddler and Suicid3.

This plugin allows all user's to type certin say
commands with the / in front. With the correct command
it will show the user an MOTD style window
with whatever the server admin wants to put in.

The current commands are:
 /donate
 /admins
 /website
 /site
 /contact
 /hacker
 /servers
 /racism
 /rules
 /motd

 I have /website and /site set to bring up the same MOTD.
 The reason for this is simply just for ease of us for the player.
 
 If anyone has anymore ideas for MOTD windows tell me and i can add them or i give permission to anyone to change/add more.
 
 Known Bugs: None
 Possible updates: Up to whoever decides to ask
 
 Currently im using this on my dust/dust2 server, and have had no problems.
 *NOTE* Has not been tested on a Linux server, and so far only tested on cs 1.6
 
 If anyone is willing to test this on a Linux server, and other mods plz try it,
 and tell me of any problems.
 I am new to coding so i will do my best :)
*/

Again my first plugin so plz tell me of anything to fix in the plugin or post. :)

I've tested this on my windows dedicated server, and everything so far has been running great :) Also this has only been tested with cs1.6. I'd imagine it'd work with other mods, but dont have a server to test it with, so if someone can plz test this with other mods, and report back :)

Thanks and enjoy :)

Update: Added a zip file with a basic layout for the .txt's. Its HTML noob friendly :) However i do recommend using these to link to a website where you have added these. Hard to understand, but for some reason MOTD's and Valve dont get along well with HTML. But it does the trick for information that wont be to long. If you need help post here, or msg me :)

Update 2: I fixed the indentation warnings you would get when compiling.

ChangeLog:
v0.1 - Initial Release
v0.2 - Fixed the Loose Indentation Warnings. You will no longer get the 5 warnings when compiling

PIE 12-07-2005 01:43

you should make it have like a little message somewhere pop up (if the admin wants) telling the useres that they can do this

just a suggestion

but its cool like this

some similar to this already but this is unique

but useful

pulpy 12-07-2005 01:45

yep it does, thats the advertisement i added. Every 90 seconds it comes up saying: "say /commands for all available say commands."

Nothing big, but it works :) Thanks pie

PIE 12-07-2005 01:50

oh ok sry

great plugin :D

pulpy 12-07-2005 01:56

Thank you pie :)

Update: I've now added the .txt's. Their preset in html format, with a black background, white text, and i've set up <pre> tags so you can type in there. The text in between the <pre> tags will look exactly the same as in the .txt. Where as normally without them if you did that many spaces it would show 1 space. But with the <pre> tags if you did that many spaces, it will actually show" "that many spaces.

Any problems just ask me :)

bmann_420 12-07-2005 03:28

Nice Job, there is a say commands by Pain somewhere in here i have had it for like /help and /contact or something, you could make your own, but I havnt seen it in ages. :D

Xanimos 12-07-2005 06:18

For a first plugin, this is pretty good

pulpy 12-07-2005 07:09

Thank you guys :) Couldnt have finished it without you suicid3 (advertisement help) and Lord Saddler (the original Donate part). I hope you all enjoy it :)

Jordan 12-07-2005 07:12

Good job :)

You don't need to post the .amxx though :P

pulpy 12-07-2005 08:07

heh, thx, alright then, i'll take the .amxx off :)


All times are GMT -4. The time now is 20:07.

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