[Left 4 Dead 2] Dedicated Server

Здесь хранится вся документация по созданию выделенных серверов
Сообщение
Автор
MrStomak
Лейтенант
Лейтенант
Сообщения: 136
Зарегистрирован: 15.01.2009

#61 Сообщение 23.11.2009, 12:16

Ru_Extrem4eG писал(а):подскажите когда может появить сервер под линукс?
Ты сам понял что написал?

Народ, у всех Revemu 2.7RC1 вызывает краш на выделенном сервере при попытке соединения на сервер?

srv
Сержант
Сержант
Сообщения: 53
Зарегистрирован: 05.01.2009

#62 Сообщение 23.11.2009, 12:17

dedyo10 писал(а):проатчил engine.dll rev_patch'ем
Конечно сорри, но где я могу найти этот патч чтоб сделать engine под ноустим ?
Спасибо.
L4D2 UA Alkar Public server [drk.dp.ua:27016]
Изображение

bir3yk
Полковник
Полковник
Сообщения: 1346
Зарегистрирован: 07.09.2009
Поблагодарили: 26 раз

#63 Сообщение 23.11.2009, 12:45

как ни странно :) но ревэму сошка v2.7RC1 с моим фиксом позволяет конектиться к серваку, только что проверил. на клиенте стоит Left.4.Dead.2.Crack.Proper-ZCP стимап не включен. для проверки попробуйте коннект на 195.10.218.2:27016
Изображение

Аватара пользователя
Jonny
Полковник
Полковник
Сообщения: 1371
Зарегистрирован: 30.05.2008
Благодарил (а): 23 раза
Поблагодарили: 54 раза

#64 Сообщение 23.11.2009, 12:49

Как сделать, чтобы на сервере были все пушки. И те, что с каэса, и бита и нож? Что конкретно за это отвечает, переменная?
Никакого отношения к нацистским группам и направлениям не имею.

Аватара пользователя
VOODMAN
Лейтенант
Лейтенант
Сообщения: 124
Зарегистрирован: 10.02.2009
Откуда: оттуда

#65 Сообщение 23.11.2009, 13:33

проблема такая:когда перевожу сервер в режим версуса,то зайти не могу на него,когда сервак пустой -пишит мол в режиме соревновательном нет людей для игры. Как это исправить ?мож в конфиге чего не так?
server.cfg
////////// *Server password and info* \\\\\\\\\\\
hostname "[Omsk^Dom.Ru^]Left4Dead 2 Server" // Servername
sv_lan "0" // Internet= 0 LAN= 1
sv_region "3" // 0=US East coast, 1=US West coast, 2= South America, 3=Europe, 4=Asia, 5=Australia, 6=Middle East, 7=Africa and 255=world.
rcon_password "" // Rcon password
motd_enabled "1" // Toggles whether or not to show the MOTD to clients when they connect.
sv_steamgroup ""
maxplayers "18"


sv_gametypes "coop,realism,survival,versus,teamversus,scavenge,teamscavenge" // Gamemodes that server running

sv_forcepreload "1" // 0 - Default. Force server side preloading.
sv_downloadurl ""

////////////// *Connection Options* \\\\\\\\\\\\\\
sv_maxrate "30000" // Max bandwidth rate allowed on server, 0 == unlimited
sv_minrate "10000" // 5000 - Default. Min bandwidth rate allowed on server, 0 == unlimited
sv_mincmdrate "33" // This sets the minimum value for cl_cmdrate. 0 == unlimited.
sv_maxcmdrate "100" // 40 - Default. (If sv_mincmdrate is > 0), this sets the maximum value for client

//////////////// *Game Settings* \\\\\\\\\\\\\\\\\
sv_allow_lobby_connect_only "0" // If set, players may only join this server from matchmaking lobby, may not connect directly
sv_allow_wait_command "1" // Allow or disallow the wait command on clients connected to this server.
sv_reservation_timeout "120" // Default - 45. Time in seconds before lobby reservation expires.
z_difficulty "normal" // This is the difficulty setting (easy, medium, hard or impossible)
mp_disable_autokick "1" // Prevents a userid from being auto-kicked

sv_cheats "0" // Cheats (Enable= 1 / Disable= 0)

sv_voiceenable "1" // Enable microphone (Enable= 1 Disable= 0)
sv_pausable "0" // Client ability to pause the server (Enable= 1 Disable=0)
sv_consistency "1" // Force clients to pass consistencycheck for critical files (Enable= 1 Disable= 0)
sv_alltalk "0" // Players can hear all other players' voice communication, no team restrictions

//////////// *Logging and Misc* \\\\\\\\\\\\
log on // Creates a logfile (Enable= on Disable= off)
sv_log_onefile "0" // Log server information to only one file.
sv_logbans "1" // Log server bans in the server logs.
sv_logecho "0" // Echo log information to the console.
sv_logfile "0" // Log server information in the log file.
sv_logflush "0" // Flush the log file to disk on each write (slow).
// sv_logsdir "logs" // Folder in the game directory where server logs will be stored.

///////////// *EXEC* \\\\\\\\\\\
exec banned_ip
exec banned_user
writeip
writeid
Последний раз редактировалось VOODMAN 23.11.2009, 13:35, всего редактировалось 1 раз.
Got mit uns !

MrStomak
Лейтенант
Лейтенант
Сообщения: 136
Зарегистрирован: 15.01.2009

#66 Сообщение 23.11.2009, 13:34

bir3yk писал(а):как ни странно :) но ревэму сошка v2.7RC1 с моим фиксом позволяет конектиться к серваку, только что проверил. на клиенте стоит Left.4.Dead.2.Crack.Proper-ZCP стимап не включен. для проверки попробуйте коннект на 195.10.218.2:27016
Спасибо тебе, вечером домой приду попробую твой фикс.

Аватара пользователя
VOODMAN
Лейтенант
Лейтенант
Сообщения: 124
Зарегистрирован: 10.02.2009
Откуда: оттуда

#67 Сообщение 23.11.2009, 13:52

VOODMAN писал(а):проблема такая:когда перевожу сервер в режим версуса,то зайти не могу на него,когда сервак пустой -пишит мол в режиме соревновательном нет людей для игры. Как это исправить ?мож в конфиге чего не так?
server.cfg
////////// *Server password and info* \\\\\\\\\\\
hostname "[Omsk^Dom.Ru^]Left4Dead 2 Server" // Servername
sv_lan "0" // Internet= 0 LAN= 1
sv_region "3" // 0=US East coast, 1=US West coast, 2= South America, 3=Europe, 4=Asia, 5=Australia, 6=Middle East, 7=Africa and 255=world.
rcon_password "" // Rcon password
motd_enabled "1" // Toggles whether or not to show the MOTD to clients when they connect.
sv_steamgroup ""
maxplayers "18"


sv_gametypes "coop,realism,survival,versus,teamversus,scavenge,teamscavenge" // Gamemodes that server running

sv_forcepreload "1" // 0 - Default. Force server side preloading.
sv_downloadurl ""

////////////// *Connection Options* \\\\\\\\\\\\\\
sv_maxrate "30000" // Max bandwidth rate allowed on server, 0 == unlimited
sv_minrate "10000" // 5000 - Default. Min bandwidth rate allowed on server, 0 == unlimited
sv_mincmdrate "33" // This sets the minimum value for cl_cmdrate. 0 == unlimited.
sv_maxcmdrate "100" // 40 - Default. (If sv_mincmdrate is > 0), this sets the maximum value for client

//////////////// *Game Settings* \\\\\\\\\\\\\\\\\
sv_allow_lobby_connect_only "0" // If set, players may only join this server from matchmaking lobby, may not connect directly
sv_allow_wait_command "1" // Allow or disallow the wait command on clients connected to this server.
sv_reservation_timeout "120" // Default - 45. Time in seconds before lobby reservation expires.
z_difficulty "normal" // This is the difficulty setting (easy, medium, hard or impossible)
mp_disable_autokick "1" // Prevents a userid from being auto-kicked

sv_cheats "0" // Cheats (Enable= 1 / Disable= 0)

sv_voiceenable "1" // Enable microphone (Enable= 1 Disable= 0)
sv_pausable "0" // Client ability to pause the server (Enable= 1 Disable=0)
sv_consistency "1" // Force clients to pass consistencycheck for critical files (Enable= 1 Disable= 0)
sv_alltalk "0" // Players can hear all other players' voice communication, no team restrictions

//////////// *Logging and Misc* \\\\\\\\\\\\
log on // Creates a logfile (Enable= on Disable= off)
sv_log_onefile "0" // Log server information to only one file.
sv_logbans "1" // Log server bans in the server logs.
sv_logecho "0" // Echo log information to the console.
sv_logfile "0" // Log server information in the log file.
sv_logflush "0" // Flush the log file to disk on each write (slow).
// sv_logsdir "logs" // Folder in the game directory where server logs will be stored.

///////////// *EXEC* \\\\\\\\\\\
exec banned_ip
exec banned_user
writeip
writeid
все разобрался. вопрос снят.
Got mit uns !

Аватара пользователя
6yxapb
Нович0к
Нович0к
Сообщения: 23
Зарегистрирован: 23.01.2009

#68 Сообщение 23.11.2009, 16:02

VOODMAN писал(а):проблема такая:когда перевожу сервер в режим версуса,то зайти не могу на него,когда сервак пустой -пишит мол в режиме соревновательном нет людей для игры. Как это исправить ?мож в конфиге чего не так?
server.cfg
////////// *Server password and info* \\\\\\\\\\\
hostname "[Omsk^Dom.Ru^]Left4Dead 2 Server" // Servername
sv_lan "0" // Internet= 0 LAN= 1
sv_region "3" // 0=US East coast, 1=US West coast, 2= South America, 3=Europe, 4=Asia, 5=Australia, 6=Middle East, 7=Africa and 255=world.
rcon_password "" // Rcon password
motd_enabled "1" // Toggles whether or not to show the MOTD to clients when they connect.
sv_steamgroup ""
maxplayers "18"


sv_gametypes "coop,realism,survival,versus,teamversus,scavenge,teamscavenge" // Gamemodes that server running

sv_forcepreload "1" // 0 - Default. Force server side preloading.
sv_downloadurl ""

////////////// *Connection Options* \\\\\\\\\\\\\\
sv_maxrate "30000" // Max bandwidth rate allowed on server, 0 == unlimited
sv_minrate "10000" // 5000 - Default. Min bandwidth rate allowed on server, 0 == unlimited
sv_mincmdrate "33" // This sets the minimum value for cl_cmdrate. 0 == unlimited.
sv_maxcmdrate "100" // 40 - Default. (If sv_mincmdrate is > 0), this sets the maximum value for client

//////////////// *Game Settings* \\\\\\\\\\\\\\\\\
sv_allow_lobby_connect_only "0" // If set, players may only join this server from matchmaking lobby, may not connect directly
sv_allow_wait_command "1" // Allow or disallow the wait command on clients connected to this server.
sv_reservation_timeout "120" // Default - 45. Time in seconds before lobby reservation expires.
z_difficulty "normal" // This is the difficulty setting (easy, medium, hard or impossible)
mp_disable_autokick "1" // Prevents a userid from being auto-kicked

sv_cheats "0" // Cheats (Enable= 1 / Disable= 0)

sv_voiceenable "1" // Enable microphone (Enable= 1 Disable= 0)
sv_pausable "0" // Client ability to pause the server (Enable= 1 Disable=0)
sv_consistency "1" // Force clients to pass consistencycheck for critical files (Enable= 1 Disable= 0)
sv_alltalk "0" // Players can hear all other players' voice communication, no team restrictions

//////////// *Logging and Misc* \\\\\\\\\\\\
log on // Creates a logfile (Enable= on Disable= off)
sv_log_onefile "0" // Log server information to only one file.
sv_logbans "1" // Log server bans in the server logs.
sv_logecho "0" // Echo log information to the console.
sv_logfile "0" // Log server information in the log file.
sv_logflush "0" // Flush the log file to disk on each write (slow).
// sv_logsdir "logs" // Folder in the game directory where server logs will be stored.

///////////// *EXEC* \\\\\\\\\\\
exec banned_ip
exec banned_user
writeip
writeid
У меня такая же проблема . Может кто подскажет что делать надо?

tov_Mayor
Нович0к
Нович0к
Сообщения: 22
Зарегистрирован: 26.06.2008

#69 Сообщение 23.11.2009, 16:20

MrStomak писал(а):
Ru_Extrem4eG писал(а):подскажите когда может появить сервер под линукс?
Ты сам понял что написал?

Народ, у всех Revemu 2.7RC1 вызывает краш на выделенном сервере при попытке соединения на сервер?
Да нет вроде. за ночь все нормально - ни одного краша

MrStomak
Лейтенант
Лейтенант
Сообщения: 136
Зарегистрирован: 15.01.2009

#70 Сообщение 23.11.2009, 16:38

tov_Mayor писал(а): Да нет вроде. за ночь все нормально - ни одного краша
Тогда имею дополнительные вопросы - версия Revemu 2.7RC1 у тебя без упомянутого здесь фикса или с ним?
Имелись ли за ночь соединения от Steam-клиентов?

У меня девственная srcds, полученная целиком через hlupdatetool.
При запуске сервака он стабильно работает, постоянно предоставляя себя лобби-игрокам.
Когда я ставлю revemu (в конфиге указываю подлинную валвовскую сошку и она успешно подгружается), то получаю два варианта развития событий:
1. Моментальный краш при =Host new game= от лобби-игроков
2. Такое было один раз, но было - сервер стоял молча и никто на него не заходил в течение оч. долгого времени, хотя соединение с Мастер-серверами было установлено и VAC activated.

Ru_Extrem4eG
Нович0к
Нович0к
Сообщения: 14
Зарегистрирован: 26.05.2009

#71 Сообщение 23.11.2009, 17:00

Помогите нубу пожалуста я скачал со стима выделенный сервер как быть мне надо его переделать под линукс и чтобы он был no-steam какие для этого мне понадобится программы?

Аватара пользователя
VOODMAN
Лейтенант
Лейтенант
Сообщения: 124
Зарегистрирован: 10.02.2009
Откуда: оттуда

#72 Сообщение 23.11.2009, 18:06

может пора создать тему про плагины на сервер Left 4 Dead 2 ?! плагины уже есть в наличии,правда их немного,но....все таки они есть.
Got mit uns !

Аватара пользователя
0zon
Лейтенант
Лейтенант
Сообщения: 178
Зарегистрирован: 01.04.2009
Благодарил (а): 1 раз

#73 Сообщение 23.11.2009, 19:06

dedyo10 писал(а):Вопрос следующий, как сделать сервер невидимым для лобби???
В sv_search_key "" пропиши любой ключ и тогда сервер смогут зарезервировать только те кто знает этот ключ

sv_allow_lobby_connect_only "0" если выставить эту квару в "1" то при прямом коннекте на сервер будет автоматически создаваться лобби, т.е. эта квара не применима для но-стимщиков.
Последний раз редактировалось 0zon 23.11.2009, 19:12, всего редактировалось 1 раз.

Аватара пользователя
Jonny
Полковник
Полковник
Сообщения: 1371
Зарегистрирован: 30.05.2008
Благодарил (а): 23 раза
Поблагодарили: 54 раза

#74 Сообщение 23.11.2009, 19:07

sm plugin: дроп вещей с зомби боссов
Чтобы играть было интересно, советую несколько усложнить игру (естественно имеется ввиду эксперт):

Код: Выделить всё

sm_cvar l4d_loot_enabled 1
sm_cvar l4d_loot_debug 0

sm_cvar survivor_max_incapacitated_count 1
sm_cvar grenadelauncher_radius_kill 250
sm_cvar z_tank_grenade_damage 2000
sm_cvar z_tank_grenade_slowdown 1
sm_cvar grenadelauncher_ff_scale 1
С данными настройками просьба использовать тег loot:

Код: Выделить всё

sv_tags loot
вот сам плаг:

Код: Выделить всё

#include <sourcemod>

#define CVAR_FLAGS FCVAR_PLUGIN
#define PLUGIN_VERSION "1.0"


public Plugin:myinfo = 
{
	name = "[L4D2] Loot",
	author = "",
	description = "Chance to drop something on the death of a zombie bosses.",
	version = PLUGIN_VERSION,
	url = ""
}

new Handle:CVarIsEnabled;
new Handle:CVarLootHunter;
new Handle:CVarLootHunterCycles;
new Handle:CVarLootHunterChance;
new Handle:CVarLootSmoker;
new Handle:CVarLootSmokerCycles;
new Handle:CVarLootSmokerChance;
new Handle:CVarLootBoomer;
new Handle:CVarLootBoomerCycles;
new Handle:CVarLootBoomerChance;
new Handle:CVarLootCharger;
new Handle:CVarLootChargerCycles;
new Handle:CVarLootChargerChance;
new Handle:CVarLootSpitter;
new Handle:CVarLootSpitterCycles;
new Handle:CVarLootSpitterChance;
new Handle:CVarLootJockey;
new Handle:CVarLootJockeyCycles;
new Handle:CVarLootJockeyChance;
new Handle:CVarLootTank;
new Handle:CVarLootTankCycles;
new Handle:CVarLootTankChance;
new Handle:CVarWitch;
new Handle:CVarDebug;


public OnPluginStart()
{
	SetRandomSeed(GetSysTickCount());
	
	CreateConVar("l4d_loot_ver", PLUGIN_VERSION, "Version of the infected loot drops plugins.", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_NOTIFY);

	CVarLootHunter = CreateConVar("l4d_loot_hunter_drop", "50", "Hunter RND (def=50)", FCVAR_PLUGIN);
	CVarLootHunterCycles = CreateConVar("l4d_loot_hunter_cycles", "2", "Hunter drop's cycles (def=2)", FCVAR_PLUGIN);
	CVarLootHunterChance = CreateConVar("l4d_loot_hunter_chance", "4", "Chance to drop something by hunter (1/x; def=4)", FCVAR_PLUGIN);

	CVarLootSmoker = CreateConVar("l4d_loot_smoker_drop", "100", "Smoker RND (def=100)", FCVAR_PLUGIN);
	CVarLootSmokerCycles = CreateConVar("l4d_loot_smoker_cycles", "5", "Smoker drop's cycles (def=5)", FCVAR_PLUGIN);
	CVarLootSmokerChance = CreateConVar("l4d_loot_smoker_chance", "3", "Chance to drop something by smoker (1/x; def=3)", FCVAR_PLUGIN);

	CVarLootBoomer = CreateConVar("l4d_loot_boomer_drop", "120", "Boomer RND (def=120)", FCVAR_PLUGIN);
	CVarLootBoomerCycles = CreateConVar("l4d_loot_boomer_cycles", "10", "Boomer drop's cycles (def=10)", FCVAR_PLUGIN);
	CVarLootBoomerChance = CreateConVar("l4d_loot_boomer_chance", "3", "Chance to drop something by boomer (1/x; def=3)", FCVAR_PLUGIN);

	CVarLootCharger = CreateConVar("l4d_loot_charger_drop", "90", "Charger RND (def=90)", FCVAR_PLUGIN);
	CVarLootChargerCycles = CreateConVar("l4d_loot_charger_cycles", "5", "Charger drop's cycles (def=5)", FCVAR_PLUGIN);
	CVarLootChargerChance = CreateConVar("l4d_loot_charger_chance", "2", "Chance to drop something by charger (1/x; def=2)", FCVAR_PLUGIN);

	CVarLootSpitter = CreateConVar("l4d_loot_spitter_drop", "90", "Spitter RND (def=90)", FCVAR_PLUGIN);
	CVarLootSpitterCycles = CreateConVar("l4d_loot_spitter_cycles", "7", "Spitter drop's cycles (def=7)", FCVAR_PLUGIN);
	CVarLootSpitterChance = CreateConVar("l4d_loot_spitter_chance", "3", "Chance to drop something by spitter (1/x; def=3)", FCVAR_PLUGIN);

	CVarLootJockey = CreateConVar("l4d_loot_jockey_drop", "75", "Jockey RND (def=75)", FCVAR_PLUGIN);
	CVarLootJockeyCycles = CreateConVar("l4d_loot_jockey_cycles", "2", "Jockey drop's cycles (def=2)", FCVAR_PLUGIN);
	CVarLootJockeyChance = CreateConVar("l4d_loot_jockey_chance", "5", "Chance to drop something by jockey (1/x; def=5)", FCVAR_PLUGIN);

	CVarLootTank = CreateConVar("l4d_loot_tank_drop", "140", "Tank RND (def=140)", FCVAR_PLUGIN);
	CVarLootTankCycles = CreateConVar("l4d_loot_tank_cycles", "20", "Boomer drop's cycles (def=20)", FCVAR_PLUGIN);
	CVarLootTankChance = CreateConVar("l4d_loot_tank_chance", "3", "Chance to drop something by tank (1/x; def=3)", FCVAR_PLUGIN);

        CVarDebug = CreateConVar("l4d_loot_debug", "0", "Show dev. information (def=0)", FCVAR_PLUGIN);
        CVarWitch = CreateConVar("l4d_loot_witch", "1", "Add some witches? (def=1)", FCVAR_PLUGIN);

	CVarIsEnabled = CreateConVar("l4d_loot_enabled", "1", "Is the plugin enabled.", FCVAR_PLUGIN);
	HookConVarChange(CVarIsEnabled, Loot_EnableDisable);
	
	// Change the enabled flag to the one the convar holds.
	if (GetConVarInt(CVarIsEnabled) == 1) 
	{
		HookEvent("player_death", Event_PlayerDeath);
	}
	else
	{
		UnhookEvent("player_death", Event_PlayerDeath);
	}
}

public Loot_EnableDisable(Handle:hVariable, const String:strOldValue[], const String:strNewValue[])
{
    if (GetConVarInt(CVarIsEnabled) == 1) 
	{
		HookEvent("player_death", Event_PlayerDeath);
	}
    else
	{
		UnhookEvent("player_death", Event_PlayerDeath);
	}
}

public Action:Event_PlayerDeath(Handle:hEvent, const String:strName[], bool:DontBroadcast)
{
	decl String:strBuffer[48];
	new ClientId    = 0;
	
	ClientId = GetClientOfUserId(GetEventInt(hEvent, "userid"));
	
	if (ClientId == 0) 
		return Plugin_Continue;
    
	GetEventString(hEvent, "victimname", strBuffer, sizeof(strBuffer));
   
	if (StrEqual("Hunter", strBuffer))
	{
		for (new i = 0; i < GetConVarInt(CVarLootHunterCycles); i++)
		{
			if (GetRandomInt(1, GetConVarInt(CVarLootHunterChance)) == 1)
				SpawnItem(ClientId, 1, GetConVarInt(CVarLootHunter)); 
		}					  
	}
	else if (StrEqual("Smoker", strBuffer))
	{
		for (new i = 0; i < GetConVarInt(CVarLootSmokerCycles); i++)
		{
			if (GetRandomInt(1, GetConVarInt(CVarLootSmokerChance)) == 1)
				SpawnItem(ClientId, 1, GetConVarInt(CVarLootSmoker)); 
		}					  
	}
	else if (StrEqual("Boomer", strBuffer))
	{
		for (new i = 0; i < GetConVarInt(CVarLootBoomerCycles); i++)
		{
			if (GetRandomInt(1, GetConVarInt(CVarLootBoomerChance)) == 1)
				SpawnItem(ClientId, 2, GetConVarInt(CVarLootBoomer)); 
		}					  
	}
	else if (StrEqual("Charger", strBuffer))
	{
		for (new i = 0; i < GetConVarInt(CVarLootChargerCycles); i++)
		{
			if (GetRandomInt(1, GetConVarInt(CVarLootChargerChance)) == 1)
				SpawnItem(ClientId, 1, GetConVarInt(CVarLootCharger)); 
		}					  
	}
	else if (StrEqual("Spitter", strBuffer))
	{
		for (new i = 0; i < GetConVarInt(CVarLootSpitterCycles); i++)
		{
			if (GetRandomInt(1, GetConVarInt(CVarLootSpitterChance)) == 1)
				SpawnItem(ClientId, 1, GetConVarInt(CVarLootSpitter)); 
		}					  
	}
	else if (StrEqual("Jockey", strBuffer))
	{
		for (new i = 0; i < GetConVarInt(CVarLootJockeyCycles); i++)
		{
			if (GetRandomInt(1, GetConVarInt(CVarLootJockeyChance)) == 1)
				SpawnItem(ClientId, 1, GetConVarInt(CVarLootJockey)); 
		}					  
	}
	else if (StrEqual("Tank", strBuffer))
	{
		for (new i = 0; i < GetConVarInt(CVarLootTankCycles); i++)
		{
			if (GetRandomInt(1, GetConVarInt(CVarLootTankChance)) == 1)
				SpawnItem(ClientId, 2, GetConVarInt(CVarLootTank)); 
		}					  
	}
	if (GetConVarInt(CVarWitch) == 1)
	{
		if (GetRandomInt(1, 3) == 1)
			if (GetRandomInt(1, GetRandomInt(1, 25)) >= 20)
				ExecuteCommand(ClientId, "z_spawn", "witch auto");
	}
	return Plugin_Continue;
}

ExecuteCommand(Client, String:strCommand[], String:strParam1[])
{
	new flags = GetCommandFlags(strCommand);
    
	SetCommandFlags(strCommand, flags & ~FCVAR_CHEAT);
	FakeClientCommand(Client, "%s %s", strCommand, strParam1);
	SetCommandFlags(strCommand, flags);
}

Give(Client, String:itemId[], bool:sim = false)
{
	if (sim == false)
	{
		ExecuteCommand(Client, "give", itemId);
	}
}

SpawnItem(client, rnd, lootmax)
{
	new LootRND;

	if (rnd == 1)
	{
		LootRND = GetRandomInt(1, lootmax);	
	}
	else 
	{
		LootRND = GetRandomInt(1, GetRandomInt(1, lootmax));	
	}
	if (LootRND < 10)
	{
		new LootRND2 = GetRandomInt(1, 15)
		if (LootRND2 == 1)
		{
			Give(client, "cricket_bat");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (1-9 1: cricket bat) \x03", LootRND);
		}
		else if (LootRND2 == 2)
		{
			Give(client, "crowbar");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (1-9 2: crowbar) \x03", LootRND);
		}
		else if (LootRND2 == 3)
		{
			Give(client, "fireaxe");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (1-9 3: fireaxe) \x03", LootRND);
		}
		else if (LootRND2 == 4)
		{
			Give(client, "fireworkcrate");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (1-9 4: fireworkcrate) \x03", LootRND);
		}
		else if (LootRND2 == 5)
		{
			Give(client, "katana");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (1-9 5: katana) \x03", LootRND);
		}
		else if (LootRND2 == 6)
		{
			Give(client, "chainsaw");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (1-9 6: chainsaw) \x03", LootRND);
		}
		else if (LootRND2 > 6)
		{
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (1-9 7+: nothing) \x03", LootRND);
		}
	}
	else if (LootRND >= 10 && LootRND < 20)
	{
		new LootRND2 = GetRandomInt(1, 3)
		if (LootRND2 == 1)
		{
			Give(client, "pistol");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (10-19 1: pistol) \x03", LootRND);
		}
		else if (LootRND2 == 2)
		{
			Give(client, "pistol_magnum");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (10-19 2: pistol_magnum) \x03", LootRND);
		}
	}
	else if (LootRND >= 20 && LootRND < 35)
	{
		Give(client, "adrenaline");
		if (GetConVarInt(CVarDebug) == 1)
			PrintToChatAll("\x01[TEST] Random: %d (20-34 adrenaline) \x03", LootRND);
	}
	else if (LootRND >= 35 && LootRND < 40)
	{
		new LootRND2 = GetRandomInt(1, 15)
		if (LootRND2 == 1)
		{
			Give(client, "molotov");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (35-40 1: molotov) \x03", LootRND);
		}
		else if (LootRND2 == 2)
		{
			Give(client, "pipe_bomb");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (35-40 2: pipe bomb) \x03", LootRND);
		}
		else if (LootRND2 == 3)
		{
			Give(client, "vomitjar");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (35-40 3: vomitjar) \x03", LootRND);
		}
	}
	else if (LootRND >= 40 && LootRND < 45)
	{
		new LootRND2 = GetRandomInt(1, 6)
		if (LootRND2 == 1)
		{
			Give(client, "smg");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (40-44 1: smg) \x03", LootRND);
		}
		else if (LootRND2 == 2)
		{
			Give(client, "smg_mp5");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (40-44 2: smg mp5) \x03", LootRND);
		}
		else if (LootRND2 == 3)
		{
			Give(client, "smg_silenced");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (40-44 3: smg silenced) \x03", LootRND);
		}
		else if (LootRND2 == 4)
		{
			Give(client, "pumpshotgun");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (40-44 4: pumpshotgun) \x03", LootRND);
		}
		else if (LootRND2 == 5)
		{
			Give(client, "shotgun_chrome");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (40-44 5: shotgun chrome) \x03", LootRND);
		}
		else if (LootRND2 == 6)
		{
			Give(client, "shotgun_spas");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (40-44 6: shotgun spas) \x03", LootRND);
		}
	}
	else if (LootRND >= 45 && LootRND < 48)
	{
		Give(client, "upgradepack_explosive");
		if (GetConVarInt(CVarDebug) == 1)
			PrintToChatAll("\x01[TEST] Random: %d (45-47 upgradepack explosive) \x03", LootRND);
	}
	else if (LootRND >= 48 && LootRND < 51)
	{
		Give(client, "upgradepack_incendiary");
		if (GetConVarInt(CVarDebug) == 1)
			PrintToChatAll("\x01[TEST] Random: %d (48-50 upgradepack incendiary) \x03", LootRND);
	}
	else if (LootRND >= 51 && LootRND < 55)
	{
		Give(client, "defibrillator");
		if (GetConVarInt(CVarDebug) == 1)
			PrintToChatAll("\x01[TEST] Random: %d (51-54 defibrillator) \x03", LootRND);
	}
	else if (LootRND >= 55 && LootRND < 60)
	{
		new LootRND2 = GetRandomInt(1, 4)
		if (LootRND2 == 1)
		{
			Give(client, "sniper_scout");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (55-59 1: sniper scout) \x03", LootRND);
		}
		else if (LootRND2 == 2)
		{
			Give(client, "sniper_military");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (55-59 2: sniper military) \x03", LootRND);
		}
		else if (LootRND2 == 3)
		{
			Give(client, "sniper_awp");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (55-59 3: sniper awp) \x03", LootRND);
		}
		else if (LootRND2 == 4)
		{
			Give(client, "hunting_rifle");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (55-59 4: hunting rifle) \x03", LootRND);
		}
	}
	else if (LootRND >= 60 && LootRND < 70)
	{
		Give(client, "pain_pills");
		if (GetConVarInt(CVarDebug) == 1)
			PrintToChatAll("\x01[TEST] Random: %d (60-69 pain pills) \x03", LootRND);
	}

	else if (LootRND >= 70 && LootRND < 90)
	{
		new LootRND2 = GetRandomInt(1, 5)
		if (LootRND2 == 1)
		{
			Give(client, "rifle");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (70-89 1: rifle) \x03", LootRND);
		}
		else if (LootRND2 == 2)
		{
			Give(client, "rifle_desert");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (70-89 2: rifle desert) \x03", LootRND);
		}
		else if (LootRND2 == 3)
		{
			Give(client, "rifle_ak47");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (70-89 3: rifle ak47) \x03", LootRND);
		}
		else if (LootRND2 == 4)
		{
			Give(client, "grenade_launcher");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (70-89 4: grenade launcher) \x03", LootRND);
		}
		else if (LootRND2 == 5)
		{
			Give(client, "rifle_sg552");
			if (GetConVarInt(CVarDebug) == 1)
				PrintToChatAll("\x01[TEST] Random: %d (70-89 5: rifle sg552) \x03", LootRND);
		}
	}
	else if (LootRND >= 90)
	{
		Give(client, "first_aid_kit");
		if (GetConVarInt(CVarDebug) == 1)
			PrintToChatAll("\x01[TEST] Random: %d (90+ first aid kit) \x03", LootRND);
	}
}
Форум не дал прикрепить 9кб zip с плагином, поэтому компильте сами
Никакого отношения к нацистским группам и направлениям не имею.

dedyo10
Нович0к
Нович0к
Сообщения: 7
Зарегистрирован: 12.09.2009

#75 Сообщение 23.11.2009, 20:20

srv писал(а):
dedyo10 писал(а):проатчил engine.dll rev_patch'ем
Конечно сорри, но где я могу найти этот патч чтоб сделать engine под ноустим ?
Спасибо.
Вот ссылка на rev_patch http://narod.ru/disk/15317484000/rev_patch.rar.html

Ответить Вложения 14