- Ошибка
-
ошибки нету
- ОС
- Windows
- Amx Mod X
-
AMX Mod X 1.9.0
- Билд
-
Built from: https://github.com/alliedmodders/amxmodx/commit/6cecb34e
Build ID: 5249:6cecb34e
- ReGamedll
-
ReGameDLL version: 5.26.0.668-dev
Build date: 19:02:33 Dec 31 2023
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/d3c0ec8
- Версия Metamod
-
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 15:47:38 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
- Список метамодулей
-
[ 1] SafeNameAndChat RUN - safenameandchat.dll v1.1 ini ANY ANY
[ 2] Reunion RUN - reunion_mm.dll v0.1.0.92 ini Start Never
[ 3] ReAuthCheck RUN - reauthcheck_mm.dll v0.1.6 ini Start Never
[ 4] <voicetranscoder.dll> badf load voicetranscoder.dll v - ini - -
[ 5] AMX Mod X RUN - amxmodx_mm.dll v1.9.0.5249 ini Start ANY
[ 6] WHBlocker RUN - whblocker_mm.dll v1.5.696 ini Chlvl ANY
[ 7] ReSemiclip RUN - resemiclip_mm.dll v2.3.9 ini Chlvl ANY
[ 8] Ultimate Unprecacher RUN - ultimate_unprecacher_mm.dll v0.3 Alpha ini ANY ANY
[ 9] YaPB RUN - yapb.dll v4.4.957 ini Chlvl ANY
[10] E-BOT LEGACY RUN - ebot.dll v1.07 ini Start Never
[11] CStrike RUN - cstrike_amxx.dll v1.9.0.5249 pl5 ANY ANY
[12] CSX RUN - csx_amxx.dll v1.9.0.5249 pl5 ANY ANY
[13] Fun RUN - fun_amxx.dll v1.9.0.5249 pl5 ANY ANY
[14] FakeMeta RUN - fakemeta_amxx.dll v1.9.0.5249 pl5 ANY ANY
[15] Ham Sandwich RUN - hamsandwich_amxx.dll v1.9.0.5249 pl5 ANY ANY
[16] GeoIP RUN - geoip_amxx.dll v1.9.0.5249 pl5 ANY ANY
[17] MySQL RUN - mysql_amxx.dll v1.9.0.5249 pl5 ANY ANY
[18] SQLite RUN - sqlite_amxx.dll v1.9.0.5249 pl5 ANY ANY
[19] Engine RUN - engine_amxx.dll v1.9.0.5249 pl5 ANY ANY
[20] ReAPI RUN - reapi_amxx.dll v5.19.0.211-dev pl5 ANY Never
[21] ReAimDetector RUN - reaimdetector_amxx.dll v0.2.2 pl5 ANY Never
[22] Orpheu RUN - orpheu_amxx.dll v2.6.3 pl5 ANY ANY
- Список плагинов
-
[ 1] Map Manager 2.5.60 Mistrick mapmanager.amxx running
[ 2] mute 1.0 Aziz xman2030_mute.a running
[ 3] Admin Base 1.9.0.5249 AMXX Dev Team admin.amxx running
[ 4] Admin Commands 1.9.0.5249 AMXX Dev Team admincmd.amxx running
[ 5] Admin Help 1.9.0.5249 AMXX Dev Team adminhelp.amxx running
[ 6] Slots Reservation 1.9.0.5249 AMXX Dev Team adminslots.amxx running
[ 7] Multi-Lingual System 1.9.0.5249 AMXX Dev Team multilingual.am running
[ 8] Commands Menu 1.9.0.5249 AMXX Dev Team cmdmenu.amxx running
[ 9] Players Menu 1.9.0.5249 AMXX Dev Team plmenu.amxx running
[ 10] Teleport Menu 1.9.0.5249 AMXX Dev Team telemenu.amxx running
[ 11] Maps Menu 1.9.0.5249 AMXX Dev Team mapsmenu.amxx running
[ 12] Plugin Menu 1.9.0.5249 AMXX Dev Team pluginmenu.amxx running
[ 13] Admin Chat 1.9.0.5249 AMXX Dev Team adminchat.amxx running
[ 14] Anti Flood 1.9.0.5249 AMXX Dev Team antiflood.amxx running
[ 15] Admin Votes 1.9.0.5249 AMXX Dev Team adminvote.amxx running
[ 16] Pause Plugins 1.9.0.5249 AMXX Dev Team pausecfg.amxx running
[ 17] Stats Configuration 1.9.0.5249 AMXX Dev Team statscfg.amxx running
[ 18] StatsX 1.9.0.5249 AMXX Dev Team statsx.amxx running
[ 19] Ultimate Gore 1.6 JTP10181 amx_gore_ultima running
[ 20] TimeLeft 1.9.0.5249 AMXX Dev Team timeleft.amxx running
[ 21] Advanced Weapon Tracer 1.3.0 ConnorMcLeod advanced_weapon running
[ 22] NextMap 1.9.0.5249 AMXX Dev Team nextmap.amxx stopped
[ 23] POD-Bot Menu 1.3 g4s|figurE.09 amxx_podbotmenu running
[ 24] Game Namer 1.1 NeuroToxin gamenamechanger running
[ 25] Precache Management 1.0.0 ConnorMcLeod precache_manage stopped
[ 26] Advert Messages 1.2 neygomon adverts.amxx running
[ 27] Fix Remove Entity When zm zm zp_entityfix.am paused
[ 28] ScreenMaker 1.1 neygomon screen_maker.am running
[ 29] fb_forwards 0.1.8 Mazdan & Neugomo fb_forwards.amx running
[ 30] FreshBans 1.4.0b kanagava fresh_bans_1.4. running
[ 31] Menus Front-End 1.5 neugomon menufront_end.a running
[ 32] AMXX Gag 1.4.9 xPaw & Exolent amx_gag.amxx running
[ 33] motd 1.1 L@NPOC@N motd.amxx running
[ 34] unknown unknown unknown warnings.amxx bad load
[ 35] Anti Reklama 1.1 MarcaD anti_reklama.am running
[ 36] SpecList 1.2a FatalisDK speclist_rus.am running
[ 37] DemoRecoder 1.2 neygomon demorecoder.amx running
[ 38] AFK Manager 1.2 Xramer afk_manager.amx paused
[ 39] Exec 1.0 ToXiC amx_exec.amxx running
[ 40] Chat Logger 2.1a Jim chat_logger.amx running
[ 41] Zombie Escape 1337 xman2030 xman2030_ze_mod debug
[ 42] [ZP]Level System 6.0 Dambas xman2030_level. running
[ 43] Camera View 0.0.1 ConnorMcLeod talrasha_camera debug
[ 44] [CSO] 0.1 meTaLiCroSS server_class_sh running
[ 45] [CSO:Ghost Zombie] 1.4 HoRRoR, Fry!,tER cso_zclass_ghos running
[ 46] [ZP] Zclass : Zombie R 1.0 The_Thing zp_zclass_regen running
[ 47] [ZP] ZP Class: Clot 0.2 DJHD! zp_zclass_clot_ running
[ 48] [ZP] Zombie Class: Des 2.0 Re.Act!ve zp_zclass_despe debug
[ 49] [vk.com/deathrun_items 1.4 HoRRoR, Fry!,tER server_class_sp running
[ 50] [ZP] Class : Execution 1.0.0 schmurgel1983 zp_zclass_execu running
[ 51] [ZP] Class: Jumper 1.0 Doomsday jumper.amxx running
[ 52] DJB Zombie Class Banch 2.0.9 Csoldjb&wbyokomo witch_test_72.a running
[ 53] [ZP] Zombie Class: Gyp 1.2 Re.Act!ve zp_zclass_gypno debug
[ 54] NST Zombie Class Heal 1.0 NST NST_ZbClass_Hea running
[ 55] [ZP] Frost Zombie 1.0 Torge zp_zclass_frost running
[ 56] [ZP] Class : Frank 1.0 tumoxa xman2030_pc.amx running
[ 57] [ZP] Zombie Class: Gra 1.0 Zombie zp_gravity.amxx running
[ 58] ZM VIP 1.7.2 aaarnas xman2030_vip.am running
[ 59] [FS] Chat 1.1 Inf xman2030_chat.a running
[ 60] Random Sounds 2.0 xman2030 xman2030_random running
[ 61] Heli Button Info 1.0 Shanks' xman2030_showes running
[ 62] [ZP] EASY SAVE AMMO 1.2 CS-FADE.RU xman2030_ammo_a running
[ 63] [ZP Addon] Knives 0.1 ONYX xman2030_knifes running
[ 64] [ZP] Admin Lvl Menu 1.0 Dambas xman2030_level_ running
[ 65] ZE HUD Final CS-FADE.RU xman2030_ze_hud running
[ 66] NadeModes 11.2 Nomexous & OT xman2030_nademo running
[ 67] [ZP] ZP++ Ice Cube 1.0 DareDevil (Gyiov xman2030_ice_cu running
[ 68] Weapon Model + Sound R 1.2 GHW_Chronic GHW_Weapon_Repl running
[ 69] xman2030_damager CS-FADE.RU CS-FADE.RU xman2030_damage running
[ 70] ZP: Zombie Health 1.0 Yakess yakess_health.a debug
[ 71] Countdown 1.7.3 T a l R a s h a gameplay_countd running
[ 72] [ZP] Addon: Round Lead 1.1 xUnicorn zp_addon_round_ running
[ 73] Automatic Unstuck 1.5 NL)Ramon(NL Auto_Unstuck.am paused
[ 74] ammo donate/dhud 1.5 user/zobie-dead zp_ammo_donate. running
[ 75] Team Locker 1.5 Bmann_420 teamlocker.amxx running
[ 76] xman2030_cons CS-FADE.RU CS-FADE.RU xman2030_cons.a running
[ 77] xman2030_aura CS-FADE.RU CS-FADE.RU xman2030_aura.a running
[ 78] xman2030_blood CS-FADE.RU CS-FADE.RU xman2030_blood. running
[ 79] [ZP] Addon: Weather 0.1 | 30.0 inf / xman2030 xman2030_weathe running
[ 80] unknown unknown unknown xman2030_leader running
[ 81] [ZP] Shoot Light 0.1 | 11.0 inf xman2030_shot_l running
[ 82] [ZP] Round ended effec 1.0 *GEORGE* xman2030_ended_ running
[ 83] [ZP] Round Draw Blast 1.0 MeRcyLeZZ xman2030_round_ running
[ 84] [ ZP ] Nemesis skill Shurik07 0.1 1zp_nemskill.am running
[ 85] ZP Round Results 1.0 MonsteR zp_round_result running
[ 86] [ZPNM] Human Idle Soun 1.0.2 D i 5 7 i n c T zpnm_gp_human_i running
[ 87] [ZPNM] Multi HUD Info 1.1.9 schmurgel1983, D zpnm_gp_multi_h running
[ 88] [CS] Ham Hooks for Bot 1.0 WiLS cs_ham_bots_api running
[ 89] [ZPNM] Descriptive 'Fi 0.1.1 VEN, Hezerf(Neme zpnm_gp_dfith.a running
[ 90] [ZPNM] Flashlight Fix 1.0.8 ConnorMcLeod, sc zpnm_gp_flashli running
[ 91] [ZP] CZ Bot Helper 1.0 @bdul! zp_cz_bot_helpe running
[ 92] [ZP] CZ Bot Nade Helpe 1.0 @bdul! zp_cz_bot_nade_ running
[ 93] ZV Effect 1.0 defa ZV_Effect.amxx running
[ 94] Menu_Priv 1.0 CS-FADE.RU xman2030_menu_p running
[ 95] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_vip_me running
[ 96] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_deluxe running
[ 97] [ZP] VIP menu 1.2 CS-FADE.RU xman2030_creato debug
[ 98] ammo paki 4.0 Bagamut xman2030_ammo_m running
[ 99] unknown unknown unknown xman2030_lk.amx running
[100] [ZP] Extra Item: Jump 1.0 Opo4uMapy xman2030_ze_jum debug
[101] [ZP] Extra Item Speed 1.2 MeRcyLeZZ zp_extra_speed_ running
[102] unknown unknown unknown xman2030_buy_hp running
[103] Janus 1 1.0 m4m3ts xman2030_janus1 running
[104] [CSO LIKE] Extra: Gull 1.0 Lakerovich xman2030_bloodr running
[105] [Zombie Plague] Weapon 0.7 PlaneShfit1231 / zp_extra_rpg7.a running
[106] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_m3.amx running
[107] [ZP] Weapon: M32 1.0 PbI)I(Uu' / Batc xman2030_m32.am running
[108] [ZP] Extra: CSO ClayMo 1.0 TemplateAuthor:K xman2030_Claymo running
[109] [ZP] Air Strike 1.0 Dorus xman2030_air_st running
[110] [CSO LIKE] LaserMG 1.1 Lakerovich cso_weapon_lase running
[111] Janus-11 1.0 m4m3ts zp_extra_janus1 running
[112] Rail Cannon 1.0 m4m3ts zp_extra_railca running
[113] [ZP] Weapon: Shining H 1.0 xUnicorn (t3rkec zp_weapon_magic running
[114] Extraitems: Water Pist 1.0 Base: Batcon & x zp_extraitems_w running
[115] [ZMO] Extra-Item: Skul 1.0 Mr.Kot3 zmo_weapon_skul running
[116] [ZP] Extra: m134ex 1.0 LARS-DAY[BR]EAKE zp_weapon_m134e running
[117] [Z] Weapon: M2 0.6 beta batcon weapon_m2.amxx running
[118] Extraitems: Oz Lion Pi 1.0 Base: Batcon & x zp_extraitems_o running
[119] [ZP] Extra item: Aeoli 1.0 m4m3ts zp_extra_aeolis running
[120] [ZP] Weapon: Salamande 1.0 xUnicorn (t3rkec zp_weapon_flame running
[121] [ZP] Extra: Squeak Gre 1.0.6-wwm Arkshine zp_extra_squeak running
[122] Petrolboomer 1.0 m4m3ts xman2030_petrol running
[123] Zombie Plague extra it 1.3 Sonic Son'edit zp_extra_radar. running
[124] [ZM] Choose Weapon 1.6.1 t3rkecorejz | Un xman2030_menu_w running
[125] HUINYA HUINYA HUINYA xman2030_def_we running
[126] [ZP] Extra: Anaconda 1.0 Crock / =) (Popr xman2030_anacon running
[127] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_Vulcan running
[128] [ZP] Extra: CSO Weapon 1.0 KORD_12.7 xman2030_Sapien running
[129] [ZP] Extra: M1887 1.0 Crock / =) (Popr xman2030_m1887. running
[130] [ZMO]Weapon: Cyclone 1.0 Base: Batcon; Re xman2030_cyclon running
[131] [ZP] Weapon: Shining H 1.0 xUnicorn (t3rkec xman2030_magicm running
[132] [CSO] Ethereal 0.0.1 Shurik07 xman2030_ethere running
- Автор плагина
- не указано
- Версия плагина
- не указано
- Исходный код
-
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <fun>
#include <xs>
#include <hamsandwich>
#include <zombieplague>
// Zombie Attributes
new const zclass_name[] = "\wСирена" // name
new const zclass_info[] = "\r[\wE\r]" // description
new const zclass_model[] = "zombie_shaman" // model
new const zclass_clawmodel[] = "knife_shaman.mdl" // claw model
new const zclass_ring_sprite[] = "sprites/warcraft3/effect/shockwave.spr" // ring sprite
new const zclass_screamsounds[][] = { "warcraft3/zombie/shaman/siren_scream.wav" } // scream sound
new const g_shaman_Infect_Sound[][] =
{
"warcraft3/zombie/shaman/infect_011.wav" ,
"warcraft3/zombie/shaman/infect_021.wav"
}
new const pain_shaman_sound[] = "warcraft3/zombie/shaman/zombi_hurt_01.wav"
new const pain_shaman_sound2[] = "warcraft3/zombie/shaman/zombi_hurt_02.wav"
new const death_shaman_sound[] = "warcraft3/zombie/shaman/zombi_death_1.wav"
new KNOCKBOMB_SHAMAN[] = "models/warcraft3/hands/shaman/v_zombibomb.mdl"
// Scream ring color R G B
new zclass_ring_colors[3] = { 0, 0, 255 }
const zclass_health = 1700 // health
const zclass_speed = 235 // speed
const Float:zclass_gravity = 0.80 // gravity
const Float:zclass_knockback = 0.40 // knockback
/*================================================================================
Customization ends here! Yes, that's it. Editing anything beyond
here is not officially supported. Proceed at your own risk...
=================================================================================*/
// Variables
new g_ishamanZID, g_iMaxPlayers, g_msgSayText, g_msgScreenFade, g_msgScreenShake,
g_msgBarTime, g_sprRing
// Arrays
new g_iPlayerTaskTimes[33]
// Cvar pointers
new cvar_screammode, cvar_duration, cvar_screamdmg, cvar_startime, cvar_reloadtime,
cvar_radius, cvar_damagemode, cvar_slowdown
// Cached cvars
new g_iCvar_ScreamMode, g_iCvar_ScreamDuration, g_iCvar_ScreamDmg,
g_iCvar_ScreamStartTime, Float:g_flCvar_ReloadTime, Float:g_flCvar_Radius,
g_iCvar_DamageMode, Float:g_flCvar_ScreamSlowdown
// Bools
new bool:g_bIsConnected[33], bool:g_bIsAlive[33], bool:g_bInScreamProcess[33],
bool:g_bCanDoScreams[33], bool:g_bKilledByScream[33], bool:g_bDoingScream[33],
bool:g_bRoundEnding
// Some constants
const FFADE_IN = 0x0000
const GIB_NEVER = 0
const UNIT_SECOND = (1<<12)
const TASK_SCREAM = 37729
const TASK_RELOAD = 55598
const TASK_SCREAMDMG = 48289
const NADE_TYPE_INFECTION = 1111
// Plug info.
#define PLUG_VERSION "0.1"
#define PLUG_AUTH "meTaLiCroSS"
// Macros
#define is_user_valid_alive(%1) (1 <= %1 <= g_iMaxPlayers && g_bIsAlive[%1])
#define is_user_valid_connected(%1) (1 <= %1 <= g_iMaxPlayers && g_bIsConnected[%1])
#define zp_get_grenade_type(%1) (entity_get_int(%1, EV_INT_flTimeStepSound))
/*================================================================================
[Init, CFG and Precache]
=================================================================================*/
public plugin_init()
{
// Plugin Info
register_plugin("[CSO]", PLUG_VERSION, PLUG_AUTH)
// Main events
register_event("HLTV", "event_RoundStart", "a", "1=0", "2=0")
register_event("CurWeapon", "Event_CurrentWeapon", "be", "1=1")
// Main messages
register_message(get_user_msgid("DeathMsg"), "message_DeathMsg")
register_event("DeathMsg","Death_Zombie","a")
RegisterHam(Ham_TakeDamage, "player", "CPlayer__TakeDamage");
// Fakemeta Forwards
register_forward(FM_CmdStart, "fw_CmdStart")
// Hamsandwich Forward
RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
// Cvars
cvar_screammode = register_cvar("zp_shaman_mode", "0")
cvar_duration = register_cvar("zp_shaman_scream_duration", "3")
cvar_screamdmg = register_cvar("zp_shaman_scream_damage", "5")
cvar_startime = register_cvar("zp_shaman_scream_start_time", "1")
cvar_reloadtime = register_cvar("zp_shaman_scream_reload_time", "30.0")
cvar_radius = register_cvar("zp_shaman_scream_radius", "250.0")
cvar_damagemode = register_cvar("zp_shaman_damage_mode", "0")
cvar_slowdown = register_cvar("zp_shaman_damage_slowdown", "0.5")
static szCvar[30]
formatex(szCvar, charsmax(szCvar), "v%s by %s", PLUG_VERSION, PLUG_AUTH)
register_cvar("g_zclass_shaman", szCvar, FCVAR_SERVER|FCVAR_SPONLY)
// Vars
g_iMaxPlayers = get_maxplayers()
g_msgBarTime = get_user_msgid("BarTime")
g_msgSayText = get_user_msgid("SayText")
g_msgScreenFade = get_user_msgid("ScreenFade")
g_msgScreenShake = get_user_msgid("ScreenShake")
}
public plugin_cfg()
{
cache_cvars()
}
public plugin_precache()
{
g_ishamanZID = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)
precache_model(KNOCKBOMB_SHAMAN)
g_sprRing = precache_model(zclass_ring_sprite)
for(new i = 0; i < sizeof zclass_screamsounds; i++) precache_sound(zclass_screamsounds[i])
precache_sound(pain_shaman_sound[0])
precache_sound(pain_shaman_sound2[0])
new i
for(i = 0 ; i < sizeof g_shaman_Infect_Sound ; i++) precache_sound(g_shaman_Infect_Sound[i])
precache_sound(death_shaman_sound[0])
}
public event_RoundStart()
{
cache_cvars()
g_bRoundEnding = false
}
public message_DeathMsg(msg_id, msg_dest, id)
{
static iAttacker, iVictim
// Get attacker and victim
iAttacker = get_msg_arg_int(1)
iVictim = get_msg_arg_int(2)
// Non-player attacker or self kill
if(!is_user_connected(iAttacker) || iAttacker == iVictim)
return PLUGIN_CONTINUE
// Killed by shaman scream
if(g_bKilledByScream[iVictim])
set_msg_arg_string(4, "shaman scream")
return PLUGIN_CONTINUE
}
public client_putinserver(id)
{
g_bIsConnected[id] = true
}
public client_disconnect(id)
{
g_bIsAlive[id] = false
g_bIsConnected[id] = false
}
public fw_PlayerSpawn_Post(id)
{
if(!is_user_alive(id)) return HAM_IGNORED
g_bIsAlive[id] = true
stop_scream_task(id)
if(zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_ishamanZID)
g_bCanDoScreams[id] = true
else
g_bCanDoScreams[id] = false
g_iPlayerTaskTimes[id] = 0
remove_task(id+TASK_RELOAD)
remove_task(id+TASK_SCREAMDMG)
return HAM_IGNORED
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
// Player victim
if(is_user_valid_connected(victim))
{
// Victim is not alive
g_bIsAlive[victim] = false
// Reset player vars and tasks
stop_scream_task(victim)
g_bCanDoScreams[victim] = false
g_iPlayerTaskTimes[victim] = 0
remove_task(victim+TASK_RELOAD)
remove_task(victim+TASK_SCREAMDMG)
return HAM_HANDLED
}
return HAM_IGNORED
}
public fw_CmdStart(id, handle, random_seed)
{
// Not alive
if(!is_user_alive(id))
return FMRES_IGNORED;
// Isn't a zombie?
if(!zp_get_user_zombie(id) || zp_get_user_nemesis(id))
return FMRES_IGNORED;
// Invalid class id
if(zp_get_user_zombie_class(id) != g_ishamanZID)
return FMRES_IGNORED;
// Get user old and actual buttons
static iInUseButton, iInUseOldButton
iInUseButton = (get_uc(handle, UC_Buttons) & IN_USE)
iInUseOldButton = (get_user_oldbutton(id) & IN_USE)
// Pressing +use button
if(iInUseButton)
{
// Last used button isn't +use, i need to
// do this, because i call this "only" 1 time
if(!iInUseOldButton && g_bCanDoScreams[id] && !g_bDoingScream[id] && !g_bRoundEnding)
{
// A bar appears in his screen
message_begin(MSG_ONE, g_msgBarTime, _, id)
write_byte(g_iCvar_ScreamStartTime) // time
write_byte(0) // unknown
message_end()
// Update bool
g_bInScreamProcess[id] = true
// Next scream time
set_task(g_iCvar_ScreamStartTime + 0.2, "task_do_scream", id+TASK_SCREAM)
return FMRES_HANDLED
}
}
else
{
// Last used button it's +use
if(iInUseOldButton && g_bInScreamProcess[id])
{
// Stop scream main task
stop_scream_task(id)
return FMRES_HANDLED
}
}
return FMRES_IGNORED
}
public task_do_scream(id)
{
// Normalize task
id -= TASK_SCREAM
// Do scream sound
emit_sound(id, CHAN_VOICE, zclass_screamsounds[random_num(0, sizeof zclass_screamsounds - 1)], 1.0, ATTN_NORM, 0, PITCH_NORM)
// Block screams
g_bCanDoScreams[id] = false
// Reload task
set_task(g_flCvar_ReloadTime, "task_reload_scream", id+TASK_RELOAD)
// Scream damage task
set_task(0.1, "task_scream_process", id+TASK_SCREAMDMG, _, _, "b")
}
public task_reload_scream(id)
{
// Normalize taks
id -= TASK_RELOAD
// Can do screams again
g_bCanDoScreams[id] = true
// Message
client_printcolor(id, "^x04[CS:Nexon Zombie] ^x01Способность колдовать ^x03клавиша [E]")
}
public task_scream_process(id)
{
// Normalize task
id -= TASK_SCREAMDMG
// Time exceed
if(g_iPlayerTaskTimes[id] >= (g_iCvar_ScreamDuration*10) || g_bRoundEnding)
{
// Remove player task
remove_task(id+TASK_SCREAMDMG)
// Reset task times count
g_iPlayerTaskTimes[id] = 0
return;
}
// Update player task time
g_iPlayerTaskTimes[id]++
// Get player origin
static Float:flOrigin[3]
entity_get_vector(id, EV_VEC_origin, flOrigin)
// Collisions
static iVictim
iVictim = -1
// Vector var
static Float:flVictimOrigin[3]
// A ring effect
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flOrigin, 0)
write_byte(TE_BEAMCYLINDER) // TE id
engfunc(EngFunc_WriteCoord, flOrigin[0]) // x
engfunc(EngFunc_WriteCoord, flOrigin[1]) // y
engfunc(EngFunc_WriteCoord, flOrigin[2]) // z
engfunc(EngFunc_WriteCoord, flOrigin[0]) // x axis
engfunc(EngFunc_WriteCoord, flOrigin[1]) // y axis
engfunc(EngFunc_WriteCoord, flOrigin[2] + g_flCvar_Radius) // z axis
write_short(g_sprRing) // sprite
write_byte(0) // startframe
write_byte(0) // framerate
write_byte(10) // life
write_byte(25) // width
write_byte(0) // noise
write_byte(zclass_ring_colors[0]) // red
write_byte(zclass_ring_colors[1]) // green
write_byte(zclass_ring_colors[2]) // blue
write_byte(200) // brightness
write_byte(0) // speed
message_end()
// Screen effects for him self
screen_effects(id)
// Do scream effects
while((iVictim = find_ent_in_sphere(iVictim, flOrigin, g_flCvar_Radius)) != 0)
{
// Non-player entity
if(!is_user_valid_connected(iVictim))
{
// Validation check
if(is_valid_ent(iVictim))
{
// Get entity classname
static szClassname[33]
entity_get_string(iVictim, EV_SZ_classname, szClassname, charsmax(szClassname))
// It's a grenade, and isn't an Infection Bomb
if(equal(szClassname, "grenade") && zp_get_grenade_type(iVictim) != NADE_TYPE_INFECTION)
{
// Get grenade origin
entity_get_vector(iVictim, EV_VEC_origin, flVictimOrigin)
// Do a good effect
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flVictimOrigin, 0)
write_byte(TE_PARTICLEBURST) // TE id
engfunc(EngFunc_WriteCoord, flVictimOrigin[0]) // x
engfunc(EngFunc_WriteCoord, flVictimOrigin[1]) // y
engfunc(EngFunc_WriteCoord, flVictimOrigin[2]) // z
write_short(45) // radius
write_byte(108) // particle color
write_byte(10) // duration * 10 will be randomized a bit
message_end()
// Remove it
remove_entity(iVictim)
}
}
continue;
}
// Not alive, zombie or with Godmode
if(!g_bIsAlive[iVictim] || zp_get_user_zombie(iVictim) || get_user_godmode(iVictim))
continue;
// Screen effects for victims
screen_effects(iVictim)
// Get scream mode
switch(g_iCvar_ScreamMode)
{
// Do damage
case 0:
{
// Get human health
static iHealth
iHealth = get_user_health(iVictim)
// It's going to die and can be infected?
if((iHealth - g_iCvar_ScreamDmg) <= 0 && g_iCvar_DamageMode)
{
// Can be infected?
if(zp_infect_user(iVictim, id, 0, 1))
continue
}
// It's going to die
if(iHealth - g_iCvar_ScreamDmg <= 0)
{
// Be infected when it's going to die
if(g_iCvar_DamageMode /* == 1*/)
{
// Returns 1 on sucess...
if(zp_infect_user(iVictim, id, 0, 1))
continue
}
// Kill it
scream_kill(iVictim, id)
continue
}
// Do fake damage
set_user_health(iVictim, iHealth - g_iCvar_ScreamDmg)
// Scream slowdown, first should be enabled
if(g_flCvar_ScreamSlowdown > 0.0)
{
// Get his current velocity vector
static Float:flVelocity[3]
get_user_velocity(iVictim, flVelocity)
// Multiply his velocity by a number
xs_vec_mul_scalar(flVelocity, g_flCvar_ScreamSlowdown, flVelocity)
// Set his new velocity vector
set_user_velocity(iVictim, flVelocity)
}
}
// Instantly Infect
case 1:
{
// Can be infected?
if(!zp_infect_user(iVictim, id, 0, 1))
{
// Kill it
scream_kill(iVictim, id)
}
}
// Instantly Kill
case 2:
{
// Kill it
scream_kill(iVictim, id)
}
}
}
}
public zp_user_infected_post(id, infector)
{
// It's the selected zombie class
if(zp_get_user_zombie_class(id) == g_ishamanZID && !zp_get_user_nemesis(id))
{
// Array
g_bCanDoScreams[id] = true
// Message
client_printcolor(id, "^x04[CS:Nexon Zombie] ^x01Способность колдовать ^x03клавиша [E]")
emit_sound(id, CHAN_VOICE, g_shaman_Infect_Sound[random(sizeof g_shaman_Infect_Sound)], VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
}
}
public zp_user_humanized_post(id)
{
// Reset player vars and tasks
stop_scream_task(id)
g_bCanDoScreams[id] = false
g_iPlayerTaskTimes[id] = 0
remove_task(id+TASK_RELOAD)
remove_task(id+TASK_SCREAMDMG)
}
public zp_round_ended(winteam)
{
// Update bool
g_bRoundEnding = true
// Make a loop
static id
for(id = 1; id <= g_iMaxPlayers; id++)
{
// Valid connected
if(is_user_valid_connected(id))
{
// Remove mainly tasks
stop_scream_task(id)
remove_task(id+TASK_RELOAD)
}
}
}
stop_scream_task(id)
{
// Remove the task
if(task_exists(id+TASK_SCREAM))
{
remove_task(id+TASK_SCREAM)
// Remove screen's bar
message_begin(MSG_ONE, g_msgBarTime, _, id)
write_byte(0) // time
write_byte(0) // unknown
message_end()
// Update bool
g_bInScreamProcess[id] = false
}
}
screen_effects(id)
{
// Screen Fade
message_begin(MSG_ONE_UNRELIABLE, g_msgScreenFade, _, id)
write_short(UNIT_SECOND*1) // duration
write_short(UNIT_SECOND*1) // hold time
write_short(FFADE_IN) // fade type
write_byte(0) // r
write_byte(0) // g
write_byte(200) // b
write_byte(125) // alpha
message_end()
// Screen Shake
message_begin(MSG_ONE_UNRELIABLE, g_msgScreenShake, _, id)
write_short(UNIT_SECOND*5) // amplitude
write_short(UNIT_SECOND*1) // duration
write_short(UNIT_SECOND*5) // frequency
message_end()
}
cache_cvars()
{
g_iCvar_ScreamMode = get_pcvar_num(cvar_screammode)
g_iCvar_ScreamDuration = get_pcvar_num(cvar_duration)
g_iCvar_ScreamDmg = get_pcvar_num(cvar_screamdmg)
g_iCvar_ScreamStartTime = get_pcvar_num(cvar_startime)
g_iCvar_DamageMode = get_pcvar_num(cvar_damagemode)
g_flCvar_ReloadTime = floatmax(g_iCvar_ScreamDuration+0.0, get_pcvar_float(cvar_reloadtime))
g_flCvar_Radius = get_pcvar_float(cvar_radius)
g_flCvar_ScreamSlowdown = get_pcvar_float(cvar_slowdown)
}
scream_kill(victim, attacker)
{
// To use later in DeathMsg event
g_bKilledByScream[victim] = true
// Do kill
ExecuteHamB(Ham_Killed, victim, attacker, GIB_NEVER)
// We don't need this
g_bKilledByScream[victim] = false
}
stock client_printcolor(id, const input[], any:...)
{
static iPlayersNum[32], iCount; iCount = 1
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4") // green txt
replace_all(szMsg, 190, "/y", "^1") // orange txt
replace_all(szMsg, 190, "/ctr", "^3") // team txt
replace_all(szMsg, 190, "/w", "^0") // team txt
if(id) iPlayersNum[0] = id
else get_players(iPlayersNum, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if (g_bIsConnected[iPlayersNum[i]])
{
message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayersNum[i])
write_byte(iPlayersNum[i])
write_string(szMsg)
message_end()
}
}
}
public CPlayer__TakeDamage(id, iVictim, iInflictor, iAttacker, Float:flDamage, bitsDamage)
{
if (zp_get_user_zombie_class(id) == g_ishamanZID && zp_get_user_zombie(id) && !zp_get_user_nemesis(id) && !zp_get_user_survivor(id))
{
new rand = random_num(1,2)
switch(rand)
{
case 1: emit_sound(id, CHAN_WEAPON, pain_shaman_sound[0], 1.0, ATTN_NORM, 0, PITCH_NORM)
case 2: emit_sound(id, CHAN_WEAPON, pain_shaman_sound2[0], 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
}
public Death_Zombie(id)
{
new victim=read_data(2)
if(zp_get_user_zombie(victim) && zp_get_user_zombie_class(victim) == g_ishamanZID && !zp_get_user_nemesis(victim))
{
emit_sound(id, CHAN_WEAPON, death_shaman_sound[0], 1.0, ATTN_NORM, 0, PITCH_NORM)
}
}
public Event_CurrentWeapon(id)
{
new weaponID = read_data(2)
if (weaponID == CSW_SMOKEGRENADE)
if(zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_ishamanZID && !zp_get_user_nemesis(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_SHAMAN)
}
if (weaponID == CSW_FLASHBANG)
if(zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_ishamanZID && !zp_get_user_nemesis(id))
{
entity_set_string(id, EV_SZ_viewmodel, KNOCKBOMB_SHAMAN)
}
}
Большая просьба о помощи, подскажите пожалуйста, как вписать такую функцию bot_use_skill чтобы зомби боты использовали способность на этом классе (сирена). Я пытался когда-то это сделать, но боты не использовали способность. Скорее всего потому что здесь нужно зажать кнопку и держать некоторое время. Ещё желательно, чтобы они использовали крик, когда находятся РЯДОМ с человеком.