AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   Public Server Rules 1.20 *UPDATED 2005-08-18* (https://forums.alliedmods.net/showthread.php?t=16393)

Priski 08-11-2005 07:19

Public Server Rules 1.20 *UPDATED 2005-08-18*
 
2 Attachment(s)
PUBLIC SERVER RULES 1.20 ( updated 2005-08-18 )

Plugin by Priski

Usage :
Put your messages, rules, etc. in rules.txt file in cstrike folder ( plugin creates it automatically at first start )
and set rules_speed and rules_interval whatever you like

Commands :
rules_show - shows rules listed in rules.txt
rules_enable - set this to 0 to disable automatic rules display
say /rules - displays rules to normal user

CVARS :
rules_interval - interval between automatic rules display
rules_admin_only - disables say /rules command from regular users
rules_join - if set 1 displays rules after player have joined server
rules_hudmessage_time - time how long hudmessage is displayed
rules_join_timeout - delay to show rules when joining to the server

CHANGELOG

1.20 / 2005-08-18
- removed client chat rules
- fixed major bugs

1.11 / 2005-08-15
- fixed some bugs

1.10 / 2005-08-14
- new CVARs : rules_hudmessage, rules_hudmessage_time
rules_join_timeout
- Rules in hudmessage mode also

1.03 / 2005-08-12
- rules_enable command fix.
- new CVAR "rules_join" set 1 to show rules
to players when they join server

1.02 / 2005-08-11
- optimized code
- rules_enable is now a command
- default interval is now 10 minutes

1.01 / 2005-08-11
- added rules_admin_only & say /rules command
- variables are global now

1.0 / 2005-08-11
- first release

Why? :
I needed this plugin and I didn't find one, so I made it myself.
Small and easy to use plugin.




ALL HELP AND ADVICES ALL WELCOME

n0obie4life 08-11-2005 07:21

Code:
    register_concmd("rules_show", "rules", ADMIN_ADMIN, " show rules")

to

Code:
    register_concmd("rules_show", "rules", 0, " show rules")

:roll:

And. Maybe add a /showrules

...Its admin only :|. Or was it suppose to be like that/

Priski 08-11-2005 07:47

Quote:

Originally Posted by n0obie4life
Code:
    register_concmd("rules_show", "rules", ADMIN_ADMIN, " show rules")
to
Code:
    register_concmd("rules_show", "rules", 0, " show rules")

is there really a difference?

Quote:

Originally Posted by n0obie4life
And. Maybe add a /showrules

...Its admin only :|. Or was it suppose to be like that/

Good Idea, I'll do that when I post next version with few minor updates (not too big, I attent to keep this small)

n0obie4life 08-11-2005 08:20

cause i never really heard of a thing called ADMIN_ADMIN xD. I'm stupid. Pardon me.

I thought 0 would be nicer.

Brad 08-11-2005 09:50

Don't put the "0" in. Use one of the constants, such as "ADMIN_ADMIN", like you've done.

Guenhwyvar 08-11-2005 10:18

This is something like the imessage? Nice, I could use it.

Could you:

- make it public (/showrules, like noobie proposed)

- if public, limit the maximum times it's displayed via a cvar (to avoid spam, f.e. once per minute max.)

Priski 08-11-2005 10:46

( sorry dublicate, read next post )

Priski 08-11-2005 10:52

I found one major bug in version 1.0 and now it's fixed. However, there is few things what I must change in this plugin before I can recommend anyone to download this plugin...


Quote:

Originally Posted by pl2003
make it public (/showrules, like noobie proposed)

done.

Quote:

Originally Posted by pl2003
if public, limit the maximum times it's displayed via a cvar (to avoid spam, f.e. once per minute max.)

This is not necessary. Why? because when normal user uses "say /rules" rules will be shown ONLY to him, only admins can use "rules_show" command which shows to everybody

Guenhwyvar 08-11-2005 11:56

Quote:

Originally Posted by Priski
Quote:

Originally Posted by pl2003
if public, limit the maximum times it's displayed via a cvar (to avoid spam, f.e. once per minute max.)

This is not necessary. Why? because when normal user uses "say /rules" rules will be shown ONLY to him, only admins can use "rules_show" command which shows to everybody

My intention was to give ppl the chance, to point the rules out to the others (which maybe avoiding them). This assumes, that the displayed rules are visible for everyone.

Priski 08-11-2005 12:20

Quote:

Originally Posted by pl2003
My intention was to give ppl the chance, to point the rules out to the others (which maybe avoiding them). This assumes, that the displayed rules are visible for everyone.

Good point, but thats why there is a automatic "rules" display.
Allowing normal users to show other is a good idea but then I have to add "flood protection" and I'm not yet sure if I add it to plugin or not. I will be adding it possibly afterwards. Another objective to me is to keep the code small and fast as possible, and this is my first plugin if you didn't notice :)

So I'm gonna learn some new stuff before I start to add new stuff to the plugin, after this post I'm gonna post 3. version of plugin today, and it should be fully operational and bug free. 8)

ps. pl2004 thank you for pointing out possible improvements so early. Suggestions and bug reports, etc. are always welcome.


All times are GMT -4. The time now is 23:51.

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