Loosing Team Handicap

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 Woomaps points.
  • Post: Give Woomaps your thoughts on this Script.
  • Vote: Help Woomaps 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

Sound fun?

Sign up

Already a Bananite? Login

134 lines | 4 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
/////////////////////////////////////////////////////////////////
//
// Losing Team Handicap - LTH * For Counter-strike Source
// Version: 1.01
//
// Description:
// Gives the losing team some cash when they lost
// more than a given amount of rounds in a row
// It's disabled if bots are on the server
//
// Tweaking parameters:
// es_setinfo bonus_money <amount to give the losing team>
// es_setinfo cnt_rounds <nr of losing time needed>
//
// Requirements:
// EventScripts v1.1.0.005
// corelib needs to be loaded (es_load corelib)
//
// Installation instructions:
// Copy this code and save it to a file called
// es_losing_team_handicap.txt
// Put the file in the directory
// cstrike/addons/eventscripts/losing_team_handicap/
// Add es_load corelib to your autoexec.cfg
// Add es_load losing_team_handicap to you autoexec.cfg
// Restart your server and you are all set
//
// Please drop me an email at gemeni@30plus.ownit.se
// if you decide to use my script. Enjoy!
//
/////////////////////////////////////////////////////////////////

block load
{
  es_xsetinfo losing_team_handicap 1
  es_makepublic losing_team_handicap
 
  es_setinfo bonus_money 3000
  es_setinfo cnt_rounds 4
 
  es_setinfo cnt_ct_win 0
  es_setinfo cnt_t_win 0
 
  es_setinfo exe_ct_win 0
  es_setinfo exe_t_win 0
 
  es_msg Losing Team Handicap (*LTH*) in place
  es_msg If a team loses server_var(cnt_rounds) in a row, they will receive a handicap bonus of $ server_var(bonus_money)
}

block unload
{
  es_xsetinfo losing_team_handicap 0
}

event es_map_start
{
  es_setinfo cnt_ct_win 0
  es_setinfo cnt_t_win 0
  es_msg Losing Team Handicap (*LTH*) in place
  es_msg If a team loses server_var(cnt_rounds) in a row, they will receive a handicap bonus of $ server_var(bonus_money)
}

event round_end
{
  es_setinfo bots_present 0
  foreach player plid #bot "es_math bots_present + 1"
 
  if (server_var(bots_present) > 0) do
  {
    es_msg #green *LTH* Rounds doesn't count while playing against bots
  }
  else do
  {
    if (event_var(winner) equalto 2) do
    {
      es_math cnt_t_win + 1
      es_math exe_t_win + 1
      es_setinfo exe_ct_win 0

      es_msg #green *LTH* T has won server_var(exe_t_win) in a row
    }

    if (event_var(winner) equalto 3) do
    {
      es_math cnt_ct_win + 1
      es_math exe_ct_win + 1
      es_setinfo exe_t_win 0
 
      es_msg #green *LTH* CT has won server_var(exe_ct_win) in a row
    }
  }
}

event round_start
{
  es_setinfo bots_present 0
  foreach player plid #bot "es_math bots_present + 1"

  if (server_var(bots_present) > 0) do
  {
    es_setinfo exe_t_win 0
    es_setinfo exe_ct_win 0
  }
     
  if (server_var(exe_t_win) >= server_var(cnt_rounds)) do
  {
    es_setinfo exe_t_win 0
   
    foreach player plid #ct "es_delay .1 es_doblock losing_team_handicap/give_money"
   
    es_msg #green *LTH* CT has received a bonus of server_var(bonus_money) to help them
  }

  if (server_var(exe_ct_win) >= server_var(cnt_rounds)) do
  {
    es_setinfo exe_ct_win 0
   
    foreach player plid #t "es_delay .1 es_doblock losing_team_handicap/give_money"
   
    es_msg #green *LTH* T has received a bonus of server_var(bonus_money) to help them
  }

}

block give_money
{
  es_setinfo curr_money 0
  es_getplayerprop curr_money server_var(plid) "CCSPlayer.m_iAccount"
  es_math curr_money + server_var(bonus_money)
  es_setplayerprop server_var(plid) "CCSPlayer.m_iAccount" server_var(curr_money)
  es_tell server_var(plid) #lightgreen *LTH* You just got server_var(bonus_money), use them well
}

Posts

None found

Share

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

More embeddable images

Bookmark and Share

Credits

Key Authors
Gemini; Woomaps
Unknown

Submitter

Woomaps avatar
Woomaps Offline
Member Joined 11y
1,355 points Ranked 3474th

Woomaps
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
0
Views
1,621
Date Added
11y
bcp.crwdcntrl.net tracking pixel