- Регистрация
- 5 Май 2019
- Сообщения
- 1.041
- Симпатии
- 359
- Пол
- Мужской
Плагин
Unreal Spawn Fixer
Назначение
Игнорирует количество спавн точек, то есть поставили и забыли про проблемы со спавнами, можно играть даже на карте где 1 спавн точка. (Half life и т.п)
Версия 1.1
1.1
Исправлена опечатка в коде
Требования:
Semiclip (или Resemiclip). Если нет то включается внутренний.
Исходный код:
Pre 1.2
Unreal Spawn Fixer
Назначение
Игнорирует количество спавн точек, то есть поставили и забыли про проблемы со спавнами, можно играть даже на карте где 1 спавн точка. (Half life и т.п)
Версия 1.1
1.1
Исправлена опечатка в коде
Требования:
Semiclip (или Resemiclip). Если нет то включается внутренний.
Исходный код:
Код:
#include <amxmodx>
#include <reapi>
#include <fakemeta>
#define USE_OWN_SEMICLIP_IF_NOT_FOUND
#define PLUGIN "Unreal Spawn Fixer"
#define AUTHOR "karaulov"
new maxplayers = 32;
public plugin_init()
{
new VERSION[64] = "1.1";
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHookChain(RG_CSGameRules_RestartRound, "RestartRound_Pre", false);
RegisterHookChain(RG_CSGameRules_RestartRound, "RestartRound_Post", true);
if (cvar_exists("resemiclip_version"))
{
add(VERSION,charsmax(VERSION),"_resemiclip");
server_cmd("semiclip_option semiclip 1");
server_cmd("semiclip_option time 0");
}
else if (cvar_exists("team_semiclip_version"))
{
add(VERSION,charsmax(VERSION),"_team_semiclip");
set_cvar_num("semiclip",1);
set_cvar_num("semiclip_block_team",0);
set_cvar_num("semiclip_duration",0);
}
else
{
add(VERSION,charsmax(VERSION),"_semiclip");
#if defined USE_OWN_SEMICLIP_IF_NOT_FOUND
register_forward(FM_PlayerPreThink, "preThink");
register_forward(FM_PlayerPostThink, "postThink");
register_forward(FM_AddToFullPack, "addToFullPack", 1);
maxplayers = get_maxplayers();
#endif
}
register_cvar("unreal_spawn_fixer", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
set_member_game(m_bLevelInitialized,true);
set_member_game(m_iSpawnPointCount_CT,32);
set_member_game(m_iSpawnPointCount_Terrorist,32);
set_cvar_float("mp_respawn_immunitytime",1.0);
set_cvar_num("mp_respawn_immunity_force_unset",0);
set_cvar_num("mp_kill_filled_spawn",0);
}
public RestartRound_Pre()
{
if (cvar_exists("resemiclip_version"))
{
server_cmd("semiclip_option semiclip 1");
server_cmd("semiclip_option time 0");
}
else if (cvar_exists("team_semiclip_version"))
{
set_cvar_num("semiclip",1);
set_cvar_num("semiclip_block_team",0);
set_cvar_num("semiclip_duration",0);
}
set_cvar_float("mp_respawn_immunitytime",1.0);
set_cvar_num("mp_respawn_immunity_force_unset",0);
set_cvar_num("mp_kill_filled_spawn",0);
}
public RestartRound_Post()
{
set_member_game(m_bLevelInitialized,true);
set_member_game(m_iSpawnPointCount_CT,32);
set_member_game(m_iSpawnPointCount_Terrorist,32);
}
//AUTHOR "skyjur"
new bool:plrSolid[33]
new bool:plrRestore[33]
new plrTeam[33]
public addToFullPack(es, e, ent, host, hostflags, player, pSet)
{
if(player)
{
if(plrSolid[host] && plrSolid[ent] && plrTeam[host] == plrTeam[ent])
{
set_es(es, ES_Solid, SOLID_NOT)
set_es(es, ES_RenderMode, kRenderTransAlpha)
set_es(es, ES_RenderAmt, 230)
}
}
}
FirstThink()
{
for(new i = 1; i <= maxplayers; i++)
{
if(!is_user_alive(i))
{
plrSolid[i] = false
continue
}
plrTeam[i] = get_user_team(i)
plrSolid[i] = get_entvar(i, var_solid) == SOLID_SLIDEBOX ? true : false
}
}
public preThink(id)
{
static i, LastThink
if(LastThink > id)
{
FirstThink()
}
LastThink = id
if(!plrSolid[id]) return
for(i = 1; i <= maxplayers; i++)
{
if(!plrSolid[i] || id == i) continue
if(plrTeam[i] == plrTeam[id])
{
set_entvar(i, var_solid, SOLID_NOT)
plrRestore[i] = true
}
}
}
public postThink(id)
{
static i
for(i = 1; i <= maxplayers; i++)
{
if(plrRestore[i])
{
set_entvar(i, var_solid, SOLID_SLIDEBOX)
plrRestore[i] = false
}
}
}
Уменьшил время неуязвимости, отключил прозрачность во встроенном semiclip,время неуязвимости берется стандартное если оно установлено выше 0.2с.
Код:
#include <amxmodx>
#include <reapi>
#include <fakemeta>
#define USE_OWN_SEMICLIP_IF_NOT_FOUND
#define PLUGIN "Unreal Spawn Fixer"
#define AUTHOR "karaulov"
new maxplayers = 32;
public plugin_init()
{
new VERSION[64] = "1.2";
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHookChain(RG_CSGameRules_RestartRound, "RestartRound_Pre", false);
RegisterHookChain(RG_CSGameRules_RestartRound, "RestartRound_Post", true);
if (cvar_exists("resemiclip_version"))
{
add(VERSION,charsmax(VERSION),"_resemiclip");
server_cmd("semiclip_option semiclip 1");
server_cmd("semiclip_option time 0");
}
else if (cvar_exists("team_semiclip_version"))
{
add(VERSION,charsmax(VERSION),"_team_semiclip");
set_cvar_num("semiclip",1);
set_cvar_num("semiclip_block_team",0);
set_cvar_num("semiclip_duration",0);
}
else
{
add(VERSION,charsmax(VERSION),"_semiclip");
#if defined USE_OWN_SEMICLIP_IF_NOT_FOUND
register_forward(FM_PlayerPreThink, "preThink");
register_forward(FM_PlayerPostThink, "postThink");
register_forward(FM_AddToFullPack, "addToFullPack", 1);
maxplayers = get_maxplayers();
#endif
}
register_cvar("unreal_spawn_fixer", VERSION, FCVAR_SERVER | FCVAR_SPONLY);
set_member_game(m_bLevelInitialized,true);
set_member_game(m_iSpawnPointCount_CT,32);
set_member_game(m_iSpawnPointCount_Terrorist,32);
if (get_cvar_float("mp_respawn_immunitytime") < 0.2)
set_cvar_float("mp_respawn_immunitytime",0.2);
set_cvar_num("mp_respawn_immunity_force_unset",0);
set_cvar_num("mp_kill_filled_spawn",0);
}
public RestartRound_Pre()
{
if (cvar_exists("resemiclip_version"))
{
server_cmd("semiclip_option semiclip 1");
server_cmd("semiclip_option time 0");
}
else if (cvar_exists("team_semiclip_version"))
{
set_cvar_num("semiclip",1);
set_cvar_num("semiclip_block_team",0);
set_cvar_num("semiclip_duration",0);
}
if (get_cvar_float("mp_respawn_immunitytime") < 0.2)
set_cvar_float("mp_respawn_immunitytime",0.2);
set_cvar_num("mp_respawn_immunity_force_unset",0);
set_cvar_num("mp_kill_filled_spawn",0);
}
public RestartRound_Post()
{
set_member_game(m_bLevelInitialized,true);
set_member_game(m_iSpawnPointCount_CT,32);
set_member_game(m_iSpawnPointCount_Terrorist,32);
}
//AUTHOR "skyjur"
new bool:plrSolid[33]
new bool:plrRestore[33]
new plrTeam[33]
public addToFullPack(es, e, ent, host, hostflags, player, pSet)
{
if(player)
{
if(plrSolid[host] && plrSolid[ent] && plrTeam[host] == plrTeam[ent])
{
set_es(es, ES_Solid, SOLID_NOT);
}
}
}
FirstThink()
{
for(new i = 1; i <= maxplayers; i++)
{
if(!is_user_alive(i))
{
plrSolid[i] = false
continue
}
plrTeam[i] = get_user_team(i)
plrSolid[i] = get_entvar(i, var_solid) == SOLID_SLIDEBOX ? true : false
}
}
public preThink(id)
{
static i, LastThink
if(LastThink > id)
{
FirstThink()
}
LastThink = id
if(!plrSolid[id]) return
for(i = 1; i <= maxplayers; i++)
{
if(!plrSolid[i] || id == i) continue
if(plrTeam[i] == plrTeam[id])
{
set_entvar(i, var_solid, SOLID_NOT)
plrRestore[i] = true
}
}
}
public postThink(id)
{
static i
for(i = 1; i <= maxplayers; i++)
{
if(plrRestore[i])
{
set_entvar(i, var_solid, SOLID_SLIDEBOX)
plrRestore[i] = false
}
}
}
Последнее редактирование: