Здравствуйте, гость ( Авторизация | Регистрация )

Server Administration, Loosing Team Handicap

<-MonsterKill->
Группа: <Main Admin>

Второй флудер
Ссылка на Сообщение #1 сообщение 13.3.2010, 14:04
Loosing Team Handicap

CODE
/////////////////////////////////////////////////////////////////
//
// 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
// es_setinfo cnt_rounds
//
// 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 [email protected]
// 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
}
1 чел. читают эту тему (гостей: 1, скрытых пользователей: 0)
Пользователей: 0
Похожие темы
Тема Последнее сообщение
You have been banned from this server.
ххххххххххххххххххххххх
6.12.2014, 17:25 Посл. сообщение: GIzzzz
Админ hns'server.
10.1.2014, 15:51 Посл. сообщение: Lapka
unique-kz LAN server v1.1
26.5.2013, 0:49 Посл. сообщение: Mixkz
New Server by DOBRO
24.2.2012, 11:31 Посл. сообщение: 6aJIeBap
server.cfg от GameFrag
Нужен server.cfg GameFrag
24.11.2011, 12:02 Посл. сообщение: fr0Stik

Случайные сервера

[RUS](47/48)CSRulez.​ru​ ]Dustferno[
de_dust2_2x2
ИГРОКОВ: 0 / 32
[RUS](47/48)CSRulez.​ru​ ]ZombieBiohazard[
zm_kabal_map2
ИГРОКОВ: 0 / 31
[RUS](47/48)CSRulez.​ru​ ]Diablomod[
de_chateau
ИГРОКОВ: 0 / 20
[RUS](47/48)CSRulez.​ru​ ]hns 364[
hns_bronx
ИГРОКОВ: 0 / 21