This plugin is my first, and I just want to throw out there that I don't really have any idea what I'm doing with sourcemod scripting, I wrote this from looking at other plugins and how they were made, especially the helpmenu v0.3, so thank you too all those authors! I made it to use on my server, but figured I'd allow anyone else to use it should they want to.
Now that formalities are out of the way..
Description:
This plugin is intended to be used with jump maps and anything that allows you to have map specific configs, I have tested it with this one: https://forums.allie...ad.php?p=607079
The plugin tells the user after they join the server whether the map is intended for demoman, soldier or both in the chat.
Cvars:
- sm_jumpinfo_enable: 1 enables the plugin, 0 disables it (default 1)
Installation:- sm_jumpinfo_class: 1 prints soldier, 2 prints demoman, 3 prints both (default 1)
Simply place jumpinfo.smx in the addonssourcemodplugins folder, and place jumpinfo.sp in the addonssourcemodscripting folder.
Dependencies:
While you don't need another plugin for this to function, it's fairly useless without the ability to change the cvar for each map, so any way of having map specific configs should work, although it has only been tested with the one mentioned in the description.
Changelog:
Quote: 03-06-2014 (v1.0.1)
*Tidied and improved code slightly
03-06-2014 (v1.0)
* Initial Release Screenshots (attached):
pl_upward using default value from server.cfg
cp_badlands using sm_jumpinfo_class 2 in cp_badlands.cfg
cp_process_final using sm_jumpinfo_class 3 in cp_process_final.cfg
(I didn't have any jump maps installed on the server I was testing it on, but you get the idea)
Final notes:
As I have said, I'm a real beginner when it comes to scripting in sourcemod, if you want to take this code and change it, please feel free to.
Attached Files Get Plugin or Get Source (jumpinfo.sp - 1.4 KB)
Wyświetl pełny artykuł