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

Say Rules


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Server Management        Approver:   Emp` (115)
SAMURAI16
BANNED
Join Date: Sep 2006
Old 12-17-2006 , 12:53   Say Rules
Reply With Quote #1

Say Rules v0.3


* Details :
For the first you can use a type to how will be displayed rules
You can choose display tipe : Print Chat, Print Center and Motd Display

* Commands :
- /sayrules : Will display all rules from a .txt file (you must create one)
- /sayrules 1 : Will display rule from from a .txt file (also must create one)
- /sayrules 2 : Display rule 2 from that .txt file ..
etc
If you use for example "/sayrules 16" and not exists rule 16 on .txt file,
will display "This rule not exists"
This commands you must use in chat !

* Admin Commands
- amx_forceread <name | @CT/@T/@ALL >- force player(s) from server to read rules
- amx_addrule < rule > - add a new server rule


* Cvars:
- sayrules_type (default 1)

^ 1 = print_chat
^ 2 = print_center
^ 3 = show motd

* Install :
1) Enable Plugin
2) Create a new file on your "addons\amxmodx\configs\" folder, with name "sayrules.txt"
In that file add your server rules
Remember if you choose sayrules_type 3 will display a motd, so you will design "sayrules.txt" in HTML Style


* Credits :
Thanks to Fatalis for help me with a lot of codes
Avalanche for tell me where is a simple bug on plugin
BlackRose for helping me with write file on amx_addrule command

* [UPDATE] 0.2 -> 0.3 (10/02/2007);

- Added a new command "amx_addrule" <rule> for posibility to add a new rule when you are on server.


* [UPDATE] 0.1 -> 0.2
- Added new comand to force an player from server to read server rules
Command : amx_forceread <name>


* That's all
Attached Files
File Type: sma Get Plugin or Get Source (sayrules.sma - 13219 views - 5.8 KB)

Last edited by SAMURAI16; 03-09-2007 at 15:24.
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 12-17-2006 , 13:03   Re: Say Rules
Reply With Quote #2

Don't hardcode paths. Also, doesn't look like amxmisc is needed to be included.

Use switch instead of repetitive "else if"

Would also suggest an admin command to add rules

Last edited by Emp`; 12-17-2006 at 13:34.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
SAMURAI16
BANNED
Join Date: Sep 2006
Old 12-17-2006 , 13:32   Re: Say Rules
Reply With Quote #3

-updated
Will add an admin comand on next version
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 12-17-2006 , 13:41   Re: Say Rules
Reply With Quote #4

Gj samurai ...U will return to cstrike???
Alka is offline
Ywa*NL
Senior Member
Join Date: Apr 2005
Location: The Netherlands
Old 12-17-2006 , 14:08   Re: Say Rules
Reply With Quote #5

Again nice plugin Samurai16!
__________________
Ywa*NL is offline
Send a message via MSN to Ywa*NL
godlike
Senior Member
Join Date: Apr 2005
Old 12-17-2006 , 15:49   Re: Say Rules
Reply With Quote #6

lol already approved! nice plugin.
__________________
Read the rules before posting something stupid: click here

Any questions about amxx PM me
godlike is offline
Roach
Writes love letters to sawce Daily
Join Date: Jul 2006
Location: Internet
Old 12-18-2006 , 13:29   Re: Say Rules
Reply With Quote #7

Hehe, just a heads up...

You have a little itty bitty grammar error in your code...not that it matters that much.

Approx Line 88 - It should read "This Rule Does Not Exist". Right now you have "This rule not exists"

Nice plugin though...very simple, which I like. I'll have to test it out and break out my HTML skills .
__________________
Quote:
Originally Posted by Brad View Post
That sounds like a really good idea!
Now replace the word "good" with "dumb".
What was your rationale for proposing such a thing?
Roach is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 12-19-2006 , 07:35   Re: Say Rules
Reply With Quote #8

thanks Roach
- fixed
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
SAMURAI16
BANNED
Join Date: Sep 2006
Old 12-19-2006 , 07:51   Re: Say Rules
Reply With Quote #9

* [UPDATE] 0.1 -> 0.2
- Added new comand to force an player from server to read server rules
Command : amx_forceread <name>
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
loren28
Senior Member
Join Date: Nov 2006
Old 12-19-2006 , 14:01   Re: Say Rules
Reply With Quote #10

hi samurai please can u make that the rules to be colored as green default for me.
loren28 is offline
Reply


Thread Tools
Display Modes

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 18:49.


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