Release Rules plugin
#1
NOTICE
This plugin does not work with the newest versoin of the server addon
Please wait while I convert them

What is it?
A small plugin that shows the rules when a user types !rules
Haven't gotten the chance to test it (net really sucks) but in theory it should work

[Image: 834vg.png]

How do I install it?
Extract all the folders in the zip to your server
Then go to /addon/ and open the file rules.txt
Here you can change all rules

Changelog
1.0
- Initial release
1.0.0.0.0.0.1
- Fixed command bug
- Made it so that the chat doesn't go to the game

Source
Code:
//JariZ's Rules plugin #include "stdafx.h" #include "windows.h" #include <ctime> #include <sstream> #include <fstream> #include <iostream> #include <vector> using namespace std; using namespace Server::CPlugin; void con(string ss) { ConsolePrint((PCHAR)ss.c_str()); } vector<string> memrules; vector<string> getRules() { vector<string> output; ifstream rules("addon\\rules.txt"); if(rules.is_open()) { while(rules.good()) { string rule = ""; getline(rules, rule); output.push_back(rule); } rules.close(); } else { output.push_back("Rules are not loaded (couldn't open file)"); } return output; } PLUGIN_API_ONSERVERLOAD { ConsolePrint("Plugin: " PLUG_NAME " loaded. Author: " PLUG_AUTHOR); ConsolePrint("Loading rules.txt into memory..."); memrules = getRules(); con("---- Current rules ----"); for each(string s in memrules) { con(s); } con("-----------------------"); } PLUGIN_API_ONSAY { //con(Message); string s = Message; //con(s.substr(0, 6)); if(s.substr(0, 6) == "!rules") { //con("rules = okay"); for each(string s in memrules) { //con(s); ServerSay((PCHAR)s.c_str(), true); } return CHAT_NONE; } return CHAT_ALL; }

Download

.zip   RulesPlugin4.zip (Size: 15.08 KB / Downloads: 76)
Reply

#2
lulz it's broken, will fix it in a few hours
fix'd
Reply

#3
euhm now this will block the whole chat ...

Code:
PLUGIN_API_ONSAY { //con(Message); string s = Message; //con(s.substr(0, 6)); if(s.substr(0, 6) == "!rules") { con("rules = okay"); for each(string s in memrules) { //con(s); ServerSay((PCHAR)s.c_str(), true); } return CHAT_NONE; } return CHAT_ALL; }

edit: nvm you just fixed it D:
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#4
yep, like I said, hadn't tested it.
Reply

#5
Not working for me
[Image: jace.png]
Reply

#6
Not working (
Reply

#7
Still does not work, after your update.
Reply

#8
Are you sure? It works fine for me...
Explain what's not working please
I really suck at releasing stuff I guess, stupid winrar...
:FUU: :FUU: :FUU: :FUU:
Reuploaded, blame itsmods attachment system and/or winrar
Reply

#9
Imma test later not at computer ill respond if it works if there are still problems with it not working
Reply

#10
FUCK IT BLOCKS THE WHOLE CHAT GODDAMNED Fuu
Fixing it (again)
hold on...
ok fixed, (I HOPE)
didn't thought i'd have this much work on a stupid plugin like this
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 6,491 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 7,589 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 55,804 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 7,643 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 8,295 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 82,036 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 25,156 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 3,654 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 44,650 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,974 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.