rules

A Config Script for Counter-Strike: Source

Hello world. We are one of the oldest mod sites on the Interwebs. Sign up and maximize your browsing experience.

  • Subscribe: Get notified of new submissions like this.
  • Say Thanks: Show your appreciation by sending Omega_K2 points.
  • Post: Give Omega_K2 your thoughts on this Script.
  • Vote: Help Omega_K2 win the Monthly Awards.
  • Rate: Give this Script a rating out of 10.
  • Flag: Alert moderators and warn members of a problem with this Script.
  • Watch: Get notified when this Script is updated.
Mascot

Resistance is futile...

Sign up

Already a Bananite? Login

64 lines | 2 kb | Raw Code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Requirements:

CS:S Server
Eventscripts 1.5+

What does it do?

It displays the rules to every player who connects. You can choose 1 (agree) or 2 (not agree, = kick) to get rid of the rule display (well that can be bypassed, but anyway the players should notice it).
Of course, you can change the rules displayed in the file.

Installation:

Copy anything in the Quote into a es_rules.txt and place it in your addons/eventscripts/rules/ folder. Add "es_load rules" to your autoexec.cfg
In case it does not work also add to your autoexec.cfg (in the same order)
es_load corelib
es_load popup

Script:

<blockquote>// es_rules.txt (the script) by [#OMEGA] - K2
// My first very, very simple script xD
// Feel free to use it and modify it :P

block load
{
popup create rules
popup displaymode rules sticky
// putting " " makes a gab, in the display. remove a a line to reduce the number of the lines. Do not create very long lines - it might be not be shown.
popup addline rules "Server Rules"
popup addline rules " "
popup addline rules "rule part 1"
popup addline rules "rule part 2"
popup addline rules "rule part 3"
popup addline rules "rule part 4"
popup addline rules "rule part 5"
popup addline rules " "
popup addline rules "info line"
popup addline rules "info line"
popup addline rules " "
// Do not change the ->1. or ->2.  only change the message behind. 1 makes the rules dissapear, 2 kicks the player from the server.
popup addline rules "->1. I read and understood the server rules!"
popup addline rules "->2. I do not agree."
// Do not change anything below this line unless you know what you are doing ^^
popup menuselect rules rules/chosen
}

block unload
{
popup close rules #all
popup delete rules
}

event player_activate
{
es_delayed 5 es popup send rules event_var(userid)
}

block chosen
{
if (server_var(_popup_choice) == 1) then es popup close rules server_var(_popup_userid)
if (server_var(_popup_choice) == 2) then es kickid server_var(_popup_userid) Reason: You did not agree to the server rules!
}
</blockquote>

Posts

Share

Shareable Image:
Share banner
HTML embed code:
BB embed code:
Markdown embed code:

More embeddable images

Bookmark and Share
Sign up to access this!

Credits

Key Authors
Omega_K2
Unknown

Submitter

Omega_K2 avatar
Omega_K2 Offline
Member Joined 11y
1,081 points Ranked 4332nd

Omega_K2
Redistributor
Are you the owner? Request Ownership
Sign up to access this!
Sign up to access this!
Sign up to access this!
Sign up to access this!

Stats

Posts
2
Views
3,583
Date Added
10y
Date Modified
10y
bcp.crwdcntrl.net tracking pixel