- Ошибка
-
Вместо обычной с4, он ставит новогоднюю с4 и периодически проскакивает баг, когда кт умрут а бомба установлена и не взорвалась, то она не пропадает и взрывается в следующем раунде и тт сразу выиграли, ну или кт если успели сбегать разминировать.
- ОС
- Linux
- Amx Mod X
-
AMX Mod X 1.8.2
- Билд
-
ReHLDS version: 3.4.0.664-dev
- ReGamedll
-
5.7.0.313-dev
- Версия Metamod
-
v1.21p37
- Список метамодулей
-
[ 1] AMX Mod X RUN - amxmodx_mm_i386. v1.8.2 ini Start ANY
[ 2] Reunion RUN - reunion_mm_i386. v0.1.75 ini Start Never
[ 3] WHBlocker RUN - whblocker_mm_i38 v1.5.692 ini Chlvl ANY
[ 4] Rechecker RUN - rechecker_mm_i38 v2.3 ini Chlvl ANY
[ 5] ReSemiclip RUN - resemiclip_mm_i3 v2.3.9 ini Chlvl ANY
[ 6] VoiceTranscoder RUN - VoiceTranscoder. v2017RC3 ini ANY ANY
[ 7] MySQL RUN - mysql_amxx_i386. v1.8.2 pl1 ANY ANY
[ 8] SQLite RUN - sqlite_amxx_i386 v1.8.2 pl1 ANY ANY
[ 9] ReParachute RUN - parachute_amxx_i v1.1 Bet pl1 ANY ANY
[10] ReAPI RUN - reapi_amxx_i386. v5.6.0.1 pl1 ANY Never
[11] FakeMeta RUN - fakemeta_amxx_i3 v1.8.2 pl1 ANY ANY
[12] Ham Sandwich RUN - hamsandwich_amxx v1.8.2 pl1 ANY ANY
[13] Fun RUN - fun_amxx_i386.so v1.8.2 pl1 ANY ANY
[14] CStrike RUN - cstrike_amxx_i38 v1.8.2 pl1 ANY ANY
[15] Engine RUN - engine_amxx_i386 v1.8.2 pl1 ANY ANY
- Список плагинов
-
[ 1] Admin Loader 3.5 neygomon admin_loader_3_ running
[ 2] FreshBans 1.4.0b kanagava fresh_bans_140. running
[ 3] fb_forwards 0.1.4 Kanagava & Realu fb_forwards.amx running
[ 4] CSStatsX SQL 0.7.4 serfreeman1337 csstatsx_sql.am running
[ 5] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 6] Stats Configuration 1.8.1.3746 AMXX Dev Team statscfg.amxx running
[ 7] StatsX 1.8.1.3746 AMXX Dev Team statsx.amxx running
[ 8] Lite Kill Assist 1.17 neygomon lite_kill_assis running
[ 9] Chat Manager 1.1.1-11 Mistrick chatmanager.amx running
[ 10] Bomb Countdown HUD Tim 0.2 SAMURAI hudtimerbomb.am running
[ 11] Anti Flood 1.8.2 AMXX Dev Team antiflood.amxx running
[ 12] Admin Commands 1.8.2 AMXX Dev Team admincmd.amxx running
[ 13] Auto-Give Privileges 1.0 SerGrib night_vip3.amxx running
[ 14] Advert Messages 1.22 neygomon adverts.amxx running
[ 15] TOP VIP (Auto Set) 1.0a Leo_[BH] top_vip.amxx running
[ 16] GHW Auto Message Displ 3.1b GHW_Chronic/Safe GHW_Message_Dis running
[ 17] Admin Help 1.8.2 AMXX Dev Team adminhelp.amxx running
[ 18] Slots Reservation 1.8.2 AMXX Dev Team adminslots.amxx running
[ 19] Admin Votes 1.8.2 AMXX Dev Team adminvote.amxx running
[ 20] Admin Chat 1.8.M AMXX Dev Team adminchat.amxx running
[ 21] Commands Menu 1.8.2 AMXX Dev Team cmdmenu.amxx running
[ 22] Info. Messages 1.8.2 AMXX Dev Team imessage.amxx running
[ 23] Maps Menu 1.4.1 neugomon mapsmenu_new.am running
[ 24] CS Misc. Stats 1.8.2 AMXX Dev Team miscstats.amxx running
[ 25] Multi-Lingual System 1.8.2 AMXX Dev Team multilingual.am running
[ 26] NextMap 1.8.2 AMXX Dev Team nextmap.amxx running
[ 27] Pause Plugins 1.8.2 AMXX Dev Team pausecfg.amxx running
[ 28] Players Menu 1.7 neugomon players_menu.am running
[ 29] Restrict Weapons 1.8.2 AMXX Dev Team restmenu.amxx running
[ 30] Scrolling Message 1.8.2 AMXX Dev Team scrollmsg.amxx running
[ 31] Teleport Menu 1.8.2 AMXX Dev Team telemenu.amxx running
[ 32] TimeLeft 1.8.2 AMXX Dev Team timeleft.amxx running
[ 33] Plugin Menu 1.8.2 AMXX Dev Team pluginmenu.amxx running
[ 34] Ultimate Chats Control 4.6 neygomon ucc.amxx running
[ 35] unknown unknown unknown ucc_api_example running
[ 36] UCC Addon: VoteGAG 1.2 neygomon ucc_votegag.amx running
[ 37] [ZL] SupplyBox 3.1 [NewYe Alexander.3 zl_supplybox.am running
[ 38] Kill Effect 0.2 neugomon kill_effect.amx running
[ 39] Super WeaponMenu 1.1 neygomon s_weaponmenu_re running
[ 40] AmxModMenu_New 2.0 CaNiBaL adm_menu_rtv.am running
[ 41] Vip Test 1.0 daywer vip_test.amxx running
[ 42] Screen Player Beta RBT screen_player.a running
[ 43] Damager for Admins 1.1 Player vip_damager.amx running
[ 44] Reset Score 1.1 skitls rs_new.amxx running
[ 45] [ReAPI] No Team Flash 0.0.2 Vaqtincha no_team_flash.a running
[ 46] Map Spawns Editor 1.0.16 iG_os map_spawns_edit running
[ 47] DoNotShootTheHostages 0.2 regalis DoNotShootTheHo running
[ 48] Demo Recorder 1.6 Sho0ter demorecorder.am running
[ 49] Admin ESP 0.3 Kost & miRror | admin_esp_mini. running
[ 50] C4 Taker 1.09 hellmonja & Haml c4_taker.amxx running
[ 51] Kills Counter 0.3 serfreeman1337 kills_counter.a running
[ 52] Ping Control 1.31 neygomon ping_control.am running
[ 53] Map Manager: Core 3.0.0 Mistrick map_manager_cor running
[ 54] Map Manager: Scheduler 0.1.0 Mistrick map_manager_sch running
[ 55] Map Manager: Rtv 0.0.4 Mistrick map_manager_rtv running
[ 56] Map Manager: Nominatio 0.0.8 Mistrick map_manager_nom running
[ 57] Map Manager: BlockList 0.0.3 Mistrick map_manager_blo running
[ 58] Map Manager: Online so 0.0.2 Mistrick map_manager_onl running
[ 59] Map Manager: Effects 0.0.8 Mistrick map_manager_eff running
[ 60] Map Manager: Informer 0.0.5 Mistrick map_manager_inf running
[ 61] [ReVIP] System Core 2.5 free pUzzlik re_vip_core.amx running
[ 62] [ReVIP] Menu 2.5 free pUzzlik re_vip_menu.amx running
[ 63] [ReVIP] Connected Info 2.5 free pUzzlik re_vip_connect_ running
[ 64] [ReVIP] Tab Info 2.5 free pUzzlik re_vip_tab_info running
[ 65] [ReVIP] Add HP 2.5 free pUzzlik re_vip_hp_add.a running
- Автор плагина
- By Alexander.3
- Версия плагина
- 32
- Исходный код
-
/*
HappyNewYear
ZombieLite Team
www.ZombieLite.Ru
By Alexander.3
www.Alexander3.Ru
*/
#include < amxmodx >
#include < engine >
#include < fakemeta >
#include < hamsandwich >
#define NAME "[ZL] SupplyBox"
#define VERSION "3.1 [NewYear]"
#define AUTHOR "Alexander.3"
new Array:mCoord
new Array:szWeaponID
new Array:szWeaponName
new Array:szBoxModel
new Array:szDecModel
new Array:szConnectSound
new PlayerCount, glassGibs, woodGibs
new SupplyCount
new g_MaxPlayer, bool:g_BlookGift = false
new Float:zl_fcvar, zl_cvar[6]
new i_shockwave
new zl_sky_name[32]
new zl_hat_ct[64], zl_hat_t[64], zl_hat_ent[33]
new zl_v_c4[64], zl_w_c4[64]
public plugin_init() {
register_plugin(NAME, VERSION, AUTHOR)
register_touch("npc_supply", "player", "supply_touch")
register_think("m_timer", "m_coord")
register_think("npc_supply", "think_supply")
register_clcmd("suppolybox_author", "ClCmd_SayAuthor");
if (zl_cvar[4] > 0)
register_logevent("RoundStart", 2, "1=Round_Start")
if (strlen(zl_hat_ct) > 3 || strlen(zl_hat_t) > 3) {
RegisterHam(Ham_Spawn, "player", "Hook_Spawn", 1)
RegisterHam(Ham_Killed, "player", "Hook_Killed", 1)
}
if(zl_cvar[5] > 0) {
RegisterHam(Ham_Item_Deploy, "weapon_smokegrenade", "Hook_Models", 1)
RegisterHam(Ham_Think, "grenade", "Hook_ThinkGrenade", 0)
register_touch("grenade", "*", "Hook_Touch")
register_think("snow_splash", "think_splash")
register_message(get_user_msgid("SendAudio"), "message_audio")
}
if(strlen(zl_v_c4) > 3)
RegisterHam(Ham_Item_Deploy, "weapon_c4", "Hook_Models", 1)
register_forward(FM_SetModel,"Forward_ChangeModel", 1)
RegisterHam(Ham_Killed, "info_target", "Hook_Killed", 0)
g_MaxPlayer = get_maxplayers()
new T = create_entity("info_target")
set_pev(T, pev_classname, "m_timer")
set_pev(T, pev_nextthink, get_gametime() + 10.0)
register_dictionary("zl_box_newyear.txt")
if(strlen(zl_sky_name) > 3) {
set_cvar_string("sv_skyname", zl_sky_name)
}
}
public ClCmd_SayAuthor(id) {
client_print(id, print_console, "Author: %s and version %s", AUTHOR, VERSION);
client_print(id, print_console, "Источник: сsserv.ru");
}
public m_coord( t ) {
if ( PlayerCount <= 0) {
set_pev(t, pev_nextthink, get_gametime() + 10.0)
return
}
if (ArraySize(mCoord) > zl_cvar[1])
ArrayClear(mCoord)
static step
switch( step ) {
case 0..1: {
for(new i = 1; i <= g_MaxPlayer; ++i ) {
if (!is_user_alive(i))
continue
new Float:Origin[3]
pev(i, pev_origin, Origin)
ArrayPushArray(mCoord, Origin)
}
step++
}
case 2: {
if(ArraySize(mCoord) > 0) m_spawn()
step = 0
}
}
set_pev(t, pev_nextthink, get_gametime() + (zl_fcvar / 2.0))
}
public client_connect(id) {
if (ArraySize(szConnectSound) > 0) {
new szName[64]
ArrayGetString(szConnectSound, random(ArraySize(szConnectSound)), szName, 63)
zl_sound(id, szName, 0)
}
}
public client_putinserver(id) {
if (!is_user_connected(id))
return
if (zl_cvar[3] > 0)
client_cmd(id, "^"cl_weather^" ^"3^"")
PlayerCount++
}
public client_disconnected(id) {
if (pev_valid(zl_hat_ent[id])) {
zl_remove_entity(zl_hat_ent[id])
zl_hat_ent[id] = 0
}
PlayerCount--
}
public m_spawn() {
if(SupplyCount >= zl_cvar[0])
return
new Float:Origin[3]
new ArrayIndex = random(ArraySize(mCoord))
ArrayGetArray(mCoord, ArrayIndex, Origin)
Origin[2] += 5.0
/* Not spawning in entity */
new tr
engfunc(EngFunc_TraceHull, Origin, Origin, 0, HULL_POINT, 0, tr)
if (get_tr2(tr, TR_StartSolid) || get_tr2(tr, TR_AllSolid))
return
new szName[64]
new ent = create_entity("info_target")
engfunc(EngFunc_SetOrigin, ent, Origin)
if (ArraySize(szDecModel) > 0 && random(5) > 2 || g_BlookGift == true) {
ArrayGetString(szDecModel, random(ArraySize(szDecModel)), szName, 63)
set_pev(ent, pev_max_health, 50.0)
set_pev(ent, pev_health, 50.0)
set_pev(ent, pev_takedamage, DAMAGE_YES)
set_pev(ent, pev_classname, "npc_decor")
} else {
ArrayGetString(szBoxModel, random(ArraySize(szBoxModel)), szName, 63)
set_rendering(ent, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 5)
set_pev(ent, pev_nextthink, get_gametime() + 3.0)
set_pev(ent, pev_classname, "npc_supply")
}
engfunc(EngFunc_SetModel, ent, szName)
engfunc(EngFunc_SetSize, ent, {-10.0, -10.0, -1.0}, {10.0, 10.0, 20.0})
set_pev(ent, pev_movetype, MOVETYPE_TOSS)
set_pev(ent, pev_solid, SOLID_SLIDEBOX)
ArrayDeleteItem(mCoord, ArrayIndex)
SupplyCount++
zl_sound(ent, "zl/newyear/spawn_snow.wav", 1)
}
public supply_touch(s, p) {
if(!pev_valid(s) || !is_user_alive(p))
return
if(ArraySize(szWeaponID) == 0) {
m_reward(p, zl_cvar[2])
zl_colorchat(p, "!n%L", LANG_PLAYER, "SUPPLY_MONEY", zl_cvar[2])
} else {
switch(random(2)) {
case 0: {
m_reward(p, zl_cvar[2])
zl_colorchat(p, "!n%L", LANG_PLAYER, "SUPPLY_MONEY", zl_cvar[2])
}
case 1: {
new i, id[20], name[32]
i = random(ArraySize(szWeaponID))
ArrayGetString(szWeaponID, i, id, 14)
ArrayGetString(szWeaponName, i, name, 14)
format(id, charsmax(id), "weapon_%s", id)
ham_give_item(p, id)
zl_colorchat(p, "!n%L", LANG_PLAYER, "SUPPLY_WEAPON", name)
}
}
}
zl_remove_entity(s)
SupplyCount--
}
public m_reward(index, num) {
if (!is_user_alive(index) || pev_valid(index) != 2)
return 0
set_pdata_int(index, 115, get_pdata_int(index, 115) + num)
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("Money"), _, index)
write_long(get_pdata_int(index, 115))
write_byte(1)
message_end()
return 1
}
public Hook_ThinkGrenade( ent ) {
static Float:dmgtime
pev(ent, pev_dmgtime, dmgtime)
if (dmgtime > get_gametime())
return HAM_IGNORED
static mdl[64]
pev(ent, pev_model, mdl, charsmax(mdl))
if (mdl[0] == 'm' && mdl[20] == 's')
return HAM_SUPERCEDE
return HAM_IGNORED
}
public Hook_Models( wpn ) {
if (pev_valid(wpn) != 2)
return HAM_IGNORED
static id
id = pev(wpn, pev_owner)
if (!is_user_alive(id) || pev_valid(id) != 2)
return HAM_IGNORED
switch(get_pdata_int(get_pdata_cbase(id, 373, 5), 43, 4)) {
case CSW_SMOKEGRENADE: set_pev(id, pev_viewmodel2, "models/zl/newyear/v_snowball.mdl")
case CSW_C4: set_pev(id, pev_viewmodel2, "models/zl/newyear/v_c4.mdl")
}
return HAM_HANDLED
}
public Hook_Touch(snow, ent) {
static szMdl[64]
pev(snow, pev_model, szMdl, charsmax(szMdl))
if (szMdl[0] == 'm' && szMdl[20] == 's') {
if(is_user_alive(ent)) {
new Float:origin_start[3], Float:origin_end[3]
pev(ent, pev_origin, origin_start)
origin_end = origin_start
origin_start[2] += 100.0
origin_end[2] -= 100.0
new tr
engfunc(EngFunc_TraceLine, origin_start, origin_end, IGNORE_MONSTERS, -1, tr)
get_tr2(tr, TR_vecEndPos, origin_end)
origin_end[2] += 1.0
engfunc(EngFunc_SetModel, snow, "models/zl/newyear/frostnova.mdl")
engfunc(EngFunc_SetOrigin, snow, origin_end)
set_pev(snow, pev_classname, "snow_splash")
set_pev(snow, pev_nextthink, get_gametime() + 3.0)
set_pev(snow, pev_velocity, {0.0, 0.0, 0.0})
set_pev(snow, pev_movetype, MOVETYPE_FLY)
set_pev(snow, pev_solid, SOLID_NOT)
set_pev(snow, pev_owner, ent)
set_pev(ent, pev_friction, 0.1)
zl_screenshake(ent, 10, 3)
zl_screenfade(ent, 3, 3, {0, 191, 255}, 100, 3)
set_rendering(ent, kRenderFxGlowShell, 0, 191, 255, kRenderNormal, 5)
zl_sound(ent, "zl/newyear/impalehit.wav", 1)
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin_end, 0)
write_byte(TE_DLIGHT) // TE id
engfunc(EngFunc_WriteCoord, origin_end[0]) // x
engfunc(EngFunc_WriteCoord, origin_end[1]) // y
engfunc(EngFunc_WriteCoord, origin_end[2] + 5.0) // z
write_byte(20) // radius
write_byte(0) // r
write_byte(191) // g
write_byte(255) // b
write_byte(10) // life
write_byte(20) // decay rate
message_end()
} else {
set_pev(snow, pev_velocity, Float:{0.0, 0.0, 0.0})
set_pev(snow, pev_classname, "snow_splash")
set_pev(snow, pev_solid, SOLID_NOT)
set_pev(snow, pev_movetype, MOVETYPE_NONE)
engfunc(EngFunc_SetModel, snow, "sprites/bhit.spr")
set_pev(snow, pev_nextthink, get_gametime() + 25.0)
set_rendering(snow, kRenderFxNoDissipation, 255, 255, 255, kRenderGlow, 255)
set_pev(snow, pev_owner, 0)
}
}
}
public think_splash( e ) {
if (!pev_valid(e))
return
new player = pev(e, pev_owner)
if (is_user_connected(player) && 33 > player > 0 ) {
set_pev(player, pev_friction, 1.0)
zl_screenfade(player)
set_rendering(player)
set_pev(e, pev_owner, 0)
zl_sound(e, "zl/newyear/impalelaunch.wav", 1)
new Float:origin[3]
pev(player, pev_origin, origin)
engfunc(EngFunc_MessageBegin, MSG_PAS,SVC_TEMPENTITY, origin, 0)
write_byte(TE_BREAKMODEL);
engfunc(EngFunc_WriteCoord, origin[0]) // x
engfunc(EngFunc_WriteCoord, origin[1]) // y
engfunc(EngFunc_WriteCoord, origin[2] + 24.0) // z
write_coord(16) // size x
write_coord(16) // size y
write_coord(16) // size z
write_coord(random_num(-50,50)); // velocity x
write_coord(random_num(-50,50)); // velocity y
write_coord(25) // velocity z
write_byte(10); // random velocity
write_short(glassGibs); // model
write_byte(10); // count
write_byte(25); // life
write_byte(0x01); // flags
message_end();
}
zl_remove_entity(e)
}
public Forward_ChangeModel(ent, const mdl[] ) {
if (!pev_valid(ent) || strlen(mdl) < 8)
return FMRES_IGNORED
if (zl_cvar[5] > 0 && mdl[9] == 's' && mdl[10] == 'm' && mdl[11] == 'o') {
engfunc(EngFunc_SetModel, ent, "models/zl/newyear/w_snowball.mdl")
set_rendering(ent, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 10)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW)
write_short(ent)
write_short(i_shockwave)
write_byte(10)
write_byte(5)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(100)
message_end()
set_pev(ent, pev_gravity, 0.3)
new Float:velocity[3]
pev(ent, pev_velocity, velocity)
velocity[0] *= 2.0
velocity[1] *= 2.0
velocity[2] *= 2.0
//Set new velocity
set_pev(ent, pev_velocity,velocity)
return FMRES_SUPERCEDE
}
if(strlen(zl_w_c4) > 3 && mdl[9] == 'c' && mdl[10] == '4') {
engfunc(EngFunc_SetModel, ent, zl_w_c4)
return FMRES_SUPERCEDE;
}
if(strlen(zl_w_c4) > 3 && mdl[9] == 'b' && mdl[16] == 'k') {
engfunc(EngFunc_SetModel, ent, zl_w_c4)
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED
}
public Hook_Spawn( player ) {
if (!is_user_alive( player ) || pev_valid(player) != 2)
return HAM_IGNORED
if (get_pdata_int(player, 114, 5) == 2 && strlen(zl_hat_ct) > 3)
zl_hat_create(player, 2)
if (get_pdata_int(player, 114, 5) == 1 && strlen(zl_hat_t) > 3)
zl_hat_create(player, 1)
return HAM_IGNORED
}
public Hook_Killed(victim, attacker, corpse) {
if (pev_valid(victim) && victim > 32) {
static szName[32]
pev(victim, pev_classname, szName, charsmax(szName))
if(szName[0] == 'n' && szName[4] == 'd') {
new Float:origin[3]
pev(victim, pev_origin, origin)
engfunc(EngFunc_MessageBegin, MSG_PAS,SVC_TEMPENTITY, origin, 0)
write_byte(TE_BREAKMODEL);
engfunc(EngFunc_WriteCoord, origin[0]) // x
engfunc(EngFunc_WriteCoord, origin[1]) // y
engfunc(EngFunc_WriteCoord, origin[2] + 24.0) // z
write_coord(16) // size x
write_coord(16) // size y
write_coord(16) // size z
write_coord(random_num(-50,50)); // velocity x
write_coord(random_num(-50,50)); // velocity y
write_coord(25) // velocity z
write_byte(10); // random velocity
write_short(woodGibs); // model
write_byte(10); // count
write_byte(25); // life
write_byte(0x03); // flags
message_end();
SupplyCount--
return HAM_IGNORED
}
}
if (pev_valid(zl_hat_ent[victim])) {
zl_remove_entity(zl_hat_ent[victim])
zl_hat_ent[victim] = 0
}
return HAM_IGNORED
}
stock zl_hat_create(player, type) {
new ent = zl_hat_ent[player]
if(!pev_valid(ent)) {
zl_hat_ent[player] = ent = create_entity("info_target")
set_pev(ent, pev_movetype, MOVETYPE_FOLLOW)
set_pev(ent, pev_aiment, player)
engfunc(EngFunc_SetModel, ent, (type == 1) ? zl_hat_t : zl_hat_ct)
}
}
public plugin_precache() {
mCoord = ArrayCreate(3, 1)
szWeaponID = ArrayCreate(15)
szWeaponName = ArrayCreate(15)
szBoxModel = ArrayCreate(64)
szDecModel = ArrayCreate(64)
szConnectSound = ArrayCreate(64)
config_load()
new i, szName[64]
for(i = 0; i < ArraySize(szBoxModel); ++i) {
ArrayGetString(szBoxModel, i, szName, 63)
precache_model(szName)
}
for(i = 0; i < ArraySize(szDecModel); ++i) {
ArrayGetString(szDecModel, i, szName, 63)
precache_model(szName)
}
for(i = 0; i < ArraySize(szConnectSound); ++i) {
ArrayGetString(szConnectSound, i, szName, 63)
precache_sound(szName)
}
if (zl_cvar[5] > 0) {
precache_sound("zl/newyear/impalehit.wav")
precache_sound("zl/newyear/impalelaunch.wav")
precache_model("models/zl/newyear/v_snowball.mdl")
precache_model("models/zl/newyear/w_snowball.mdl")
precache_model("models/zl/newyear/frostnova.mdl")
glassGibs = precache_model("models/glassgibs.mdl")
precache_model("sprites/bhit.spr")
}
woodGibs = precache_model("models/woodgibs.mdl")
precache_sound("zl/newyear/spawn_snow.wav")
i_shockwave = precache_model("sprites/shockwave.spr")
if (zl_cvar[3] > 0)
engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "env_snow"))
if (strlen(zl_sky_name) > 3) {
new linedata[64]
formatex(linedata, charsmax(linedata), "gfx/env/%sbk.tga", zl_sky_name)
engfunc(EngFunc_PrecacheGeneric, linedata)
formatex(linedata, charsmax(linedata), "gfx/env/%sdn.tga", zl_sky_name)
engfunc(EngFunc_PrecacheGeneric, linedata)
formatex(linedata, charsmax(linedata), "gfx/env/%sft.tga", zl_sky_name)
engfunc(EngFunc_PrecacheGeneric, linedata)
formatex(linedata, charsmax(linedata), "gfx/env/%slf.tga", zl_sky_name)
engfunc(EngFunc_PrecacheGeneric, linedata)
formatex(linedata, charsmax(linedata), "gfx/env/%srt.tga", zl_sky_name)
engfunc(EngFunc_PrecacheGeneric, linedata)
formatex(linedata, charsmax(linedata), "gfx/env/%sup.tga", zl_sky_name)
engfunc(EngFunc_PrecacheGeneric, linedata)
}
if (strlen(zl_hat_ct) > 3)
precache_model(zl_hat_ct)
if (strlen(zl_hat_t) > 3)
precache_model(zl_hat_t)
if (strlen(zl_v_c4) > 3)
precache_model(zl_v_c4)
if (strlen(zl_w_c4) > 3)
precache_model(zl_w_c4)
}
config_load() {
static path[64]
get_localinfo("amxx_configsdir", path, charsmax(path))
format(path, charsmax(path), "%s/zl/zl_supply.ini", path)
if (!file_exists(path)) {
new error[100]
formatex(error, charsmax(error), "Cannot load customization file %s!", path)
set_fail_state(error)
return
}
static linedata[1024], key[64], value[960], section
new file = fopen(path, "rt")
while (file && !feof(file)) {
fgets(file, linedata, charsmax(linedata))
replace(linedata, charsmax(linedata), "^n", "")
trim(linedata)
if (!linedata[0] || linedata[0] == '/') continue;
if (linedata[0] == '[') { section++; continue; }
strtok(linedata, key, charsmax(key), value, charsmax(value), '=')
trim(key)
trim(value)
switch(section) {
case 1: { // Setting
if (equal(key, "S_MAX_BOX"))
zl_cvar[0] = str_to_num(value)
else if (equal(key, "S_MAX_COORD"))
zl_cvar[1] = str_to_num(value)
else if (equal(key, "S_TIME_CREATE"))
zl_fcvar = str_to_float(value)
else if (equal(key, "S_REWARD"))
zl_cvar[2] = str_to_num(value)
else if (equal(key, "S_SNOW"))
zl_cvar[3] = str_to_num(value)
else if (equal(key, "S_MSG"))
zl_cvar[4] = str_to_num(value)
else if (equal(key, "S_SKY"))
parse(value, zl_sky_name, charsmax(zl_sky_name))
else if (equal(key, "S_HAT_CT"))
parse(value, zl_hat_ct, charsmax(zl_hat_ct))
else if (equal(key, "S_HAT_T"))
parse(value, zl_hat_t, charsmax(zl_hat_t))
else if (equal(key, "S_SNOWBALL"))
zl_cvar[5] = str_to_num(value)
else if (equal(key, "S_V_C4"))
parse(value, zl_v_c4, charsmax(zl_v_c4))
else if (equal(key, "S_W_C4"))
parse(value, zl_w_c4, charsmax(zl_w_c4))
}
case 2: { // BoxModel
if (strlen(linedata) < 5) {
log_amx("[ERROR] Please setup box model in zl_supply.ini")
pause("ad")
return
}
ArrayPushString(szBoxModel, linedata)
}
case 3: { // DecModel
if (strlen(linedata) > 5) {
trim(linedata)
ArrayPushString(szDecModel, linedata)
}
}
case 4: { // Sound In connected
if (strlen(linedata) > 5) {
trim(linedata)
ArrayPushString(szConnectSound, linedata)
log_amx(linedata)
}
}
case 5: { // MapIgnored
new szMap[32]
get_mapname(szMap, charsmax(szMap))
if (contain(szMap, linedata) != -1)
g_BlookGift = true
}
case 6: { // Weapon
if (!zl_weapon_check(key))
continue
ArrayPushString(szWeaponID, key)
ArrayPushString(szWeaponName, value)
}
}
}
if (file) fclose(file)
}
public think_supply(ent) {
if(!pev_valid(ent))
return
new Float:o[3]
pev(ent, pev_origin, o)
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, o, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, o[0]) // x
engfunc(EngFunc_WriteCoord, o[1]) // y
engfunc(EngFunc_WriteCoord, o[2] + 1.0) // z
engfunc(EngFunc_WriteCoord, o[0] + 500.0) // x axis
engfunc(EngFunc_WriteCoord, o[1] + 500.0) // y axis
engfunc(EngFunc_WriteCoord, o[2] + 50.0) // z axis
write_short(i_shockwave) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(14) // life (4)
write_byte(15) // width (20)
write_byte(0) // noise
write_byte(255) // red
write_byte(255) // green
write_byte(255) // blue
write_byte(255) // brightness
write_byte(0) // speed
message_end()
set_pev(ent, pev_nextthink, get_gametime() + 5.0)
}
public message_audio() {
static sample[20]
get_msg_arg_string(2, sample, charsmax(sample))
if(equal(sample[1], "!MRAD_FIREINHOLE"))
return PLUGIN_HANDLED
return PLUGIN_CONTINUE
}
public RoundStart() {
new Day[4]
get_time("%j", Day, 3)
new numDay = 366 - str_to_num(Day)
if (numDay > 50)
zl_colorchat(0, "!n%L", LANG_PLAYER, "S_NEWYEAR2")
else
zl_colorchat(0, "!n%L", LANG_PLAYER, "S_NEWYEAR", numDay)
}
stock ham_give_item(id, weapon[] ) {
if (!is_user_alive(id) || pev_valid(id) != 2)
return 0
new wEnt = create_entity( weapon )
if(!pev_valid(wEnt))
return 0
new ItemSlot = ExecuteHamB(Ham_Item_ItemSlot, wEnt)
new iItem, szWeaponName[32]
iItem = get_pdata_cbase(id, 367 + ItemSlot, 5);
if (iItem > 0 && pev_valid(iItem) == 2) {
pev(iItem, pev_classname, szWeaponName, charsmax(szWeaponName))
engclient_cmd(id, "drop", szWeaponName)
}
set_pev(wEnt, pev_spawnflags, SF_NORESPAWN);
dllfunc(DLLFunc_Spawn, wEnt)
if(!ExecuteHamB( Ham_AddPlayerItem, id, wEnt )) {
if(pev_valid( wEnt ))
set_pev(wEnt, pev_flags, pev( wEnt, pev_flags ) | FL_KILLME)
return 0;
}
ExecuteHamB(Ham_Item_AttachToPlayer, wEnt, id )
engclient_cmd(id, weapon)
new AmmoIndex
AmmoIndex = get_pdata_int(get_pdata_cbase(id, 373, 5), 49, 4)
if (AmmoIndex > 10) {
set_pdata_int(id, 376 + AmmoIndex, 1, 5)
} else {
set_pdata_int(id, 376 + AmmoIndex, 100, 5)
}
return 1;
}
stock zl_sound(index, sound[], type = 0) { // Type : 0 - Message, 1 - EntSound
switch (type) {
case 0: {
if (contain(sound, ".wav") == -1) {
client_cmd(index, "mp3 play ^"sound/%s^"", sound)
} else {
message_begin(index ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, get_user_msgid("SendAudio"), _, index)
write_byte(index)
write_string(sound)
write_short(PITCH_NORM)
message_end()
}
}
case 1: engfunc(EngFunc_EmitSound, index, CHAN_VOICE, sound, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
default: log_amx("[ERROR] SoundType ERROR")
}
}
stock zl_weapon_check(const weapon_name[]) {
static const WeaponName[][] = {
"p228",
"scout",
"hegrenade",
"xm1014",
"mac10",
"aug",
"smokegrenade",
"elite",
"fiveseven",
"ump45",
"sg550",
"galil",
"famas",
"usp",
"glock18",
"awp",
"mp5navy",
"m249",
"m3",
"m4a1",
"tmp",
"g3sg1",
"flashbang",
"deagle",
"sg552",
"ak47",
"knife",
"p90"
}
new i
for(i = 0; i < sizeof WeaponName; ++i) {
if(equal(weapon_name, WeaponName[i]))
return 1
}
return 0
}
stock zl_colorchat( iPlayer, szMessage[ ], any:... ) {
static szBuffer[512]
vformat(szBuffer, charsmax( szBuffer ), szMessage, 3 );
replace_all(szBuffer, charsmax(szBuffer), "!t", "^3")
replace_all(szBuffer, charsmax(szBuffer), "!n", "^1")
replace_all(szBuffer, charsmax(szBuffer), "!g", "^4")
if( iPlayer ) {
message_begin( MSG_ONE, 76, _, iPlayer );
write_byte( iPlayer );
write_string( szBuffer );
message_end( );
} else {
for( new iPlayers = 33; iPlayers > 0; iPlayers-- ) {
if( !is_user_connected( iPlayers ) )
continue;
message_begin( MSG_ONE, 76, _, iPlayers );
write_byte( iPlayers );
write_string( szBuffer );
message_end( );
}
}
}
stock zl_screenshake(id, ampl, timer) {
if(id) if(!is_user_alive(id)) return
if (ampl > 15)
ampl = 15
message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, get_user_msgid("ScreenShake"), _, id ? id : 0);
write_short(ampl << 12)
write_short(timer << 12)
write_short(7 << 12)
message_end()
}
stock zl_remove_entity(e) {
if(!pev_valid(e))
return 0
set_pev(e, pev_flags, pev(e, pev_flags ) | FL_KILLME)
return 1
}
stock zl_screenfade(id, Timer = 1, FadeTime = 1, Colors[3] = {0, 0, 0}, Alpha = 0, type = 1) {
if(id) if(!is_user_connected(id)) return
if (Timer > 0xFFFF) Timer = 0xFFFF
if (FadeTime <= 0) FadeTime = 4
message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, get_user_msgid("ScreenFade"), _, id);
write_short(Timer * 1 << 12)
write_short(FadeTime * 1 << 12)
switch (type) {
case 1: write_short(0x0000) // IN ( FFADE_IN )
case 2: write_short(0x0001) // OUT ( FFADE_OUT )
case 3: write_short(0x0002) // MODULATE ( FFADE_MODULATE )
case 4: write_short(0x0004) // STAYOUT ( FFADE_STAYOUT )
default: write_short(0x0001)
}
write_byte(Colors[0])
write_byte(Colors[1])
write_byte(Colors[2])
write_byte(Alpha)
message_end()
}
Народ кто разбирается помогите изменить часть кода отвечающую за данную функцию. Ну или вообще отключить замену С4 чтоб не было данного косяка.
Хоть плагин и старый но чем то нравиться.
Хотя буду не против если кто предложит дельную замену ему.
Хоть плагин и старый но чем то нравиться.
Хотя буду не против если кто предложит дельную замену ему.
Вложения
-
22.7 KB Просмотры: 306