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
Rainbow [Release] Plugin ReservedSlot v1.3 frst_ 1 4,997 11-08-2018, 19:17
Last Post: frst_
Tongue [Release] MW3 Shop plugin Dude 56 51,322 03-25-2018, 05:18
Last Post: [email protected]
  [Release] Permission plugin Pozzuh 202 163,995 05-01-2017, 15:41
Last Post: W4R||The Hyper
  [Release] FIXED SPEED PLUGIN hillbilly 2 5,657 06-02-2016, 20:23
Last Post: clacki
  [Release] Bots Plugin For Users Casper 22 39,856 08-22-2015, 17:45
Last Post: SnapBacks
  [Release] God Plugin v5.0 [Ingame Rcon Tool] OzonE 464 335,890 06-27-2015, 15:38
Last Post: bluedot
  [Release] Anti Hardscope Plugin 8q4s8 26 27,603 06-20-2015, 22:44
Last Post: urj88419
  [Release] ProMod Plugin zxz0O0 875 761,793 03-25-2015, 22:02
Last Post: kris
  [Release] [Discontinued] Speed Plugin Pozzuh 164 122,125 10-06-2014, 12:56
Last Post: Nekochan
  [help]how create a ping plugin clacki 3 5,077 09-13-2014, 01:23
Last Post: clacki

Forum Jump:


Users browsing this thread:
1 Guest(s)

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