Raised This Month: $51 Target: $400
 12% 

How do I add a server command?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-02-2017 , 09:10   How do I add a server command?
Reply With Quote #1

I want players to be able to type /config in chat to display a html page that I made.
How do I add this?

Thanks!
suhdude is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-02-2017 , 09:32   Re: How do I add a server command?
Reply With Quote #2

If you are writing the plugin yourself, try and write it. If you have issues then post your code in the Scripting Help section.

If you are not wanting to write it and you want someone else to write it, post in the Suggestions/Requests section.
__________________
fysiks is offline
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-02-2017 , 10:00   Re: How do I add a server command?
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
If you are writing the plugin yourself, try and write it. If you have issues then post your code in the Scripting Help section.

If you are not wanting to write it and you want someone else to write it, post in the Suggestions/Requests section.
I thought this was something you could set in the amx configuration like /info /server /top15 /rank
If not, do you know where I can find this plugin. Cause it must exist, I have seen a lot of server use it. I just dont know what to search for.

Thanks

Last edited by suhdude; 11-02-2017 at 10:01.
suhdude is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 11-02-2017 , 15:23   Re: How do I add a server command?
Reply With Quote #4

you see it often because it is a really simple plugin
here
Code:
#include <amxmodx> public plugin_init() { register_clcmd("say /config", "open_motd") register_clcmd("say_team /config", "open_motd") } public open_motd(id) { show_motd(id, "addons/amxmodx/configs/file.html", "Your MOTD Title") }

you can also put a remote URL instead of file path (from a website)
__________________
Meanwhile, in 2050:
Quote:
Originally Posted by aron9forever
useless small optimizations
Quote:
Originally Posted by Black Rose View Post
On a map that is 512x512x128 units you end up with 3,355,443,200,000 different "positions". To store each one of those positions individually in the variable "user_or" you need 12 terabytes of memory.
aron9forever is offline
suhdude
Senior Member
Join Date: Mar 2016
Location: Sweden
Old 11-03-2017 , 08:34   Re: How do I add a server command?
Reply With Quote #5

Quote:
Originally Posted by aron9forever View Post
you see it often because it is a really simple plugin
here
Code:
#include <amxmodx> public plugin_init() { register_clcmd("say /config", "open_motd") register_clcmd("say_team /config", "open_motd") } public open_motd(id) { show_motd(id, "addons/amxmodx/configs/file.html", "Your MOTD Title") }

you can also put a remote URL instead of file path (from a website)
Thank you Aron, when reading this I feel like I should have used this as an opportunity to learn scripting. But thanks anyways, this finalized a fun project of mine.

<3
suhdude is offline
Reply



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:56.


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