Ошибки от зомбик-класса _revenant_ice_0

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
61
Реакции
9
Помог
1 раз(а)
Ошибка
L 11/05/2023 - 16:45:27: [AMXX] Displaying debug trace (plugin "yt_class_revenant_ice_0.amxx", version "0.1")
L 11/05/2023 - 16:45:27: [AMXX] Run time error 10: native error (native "entity_set_float")
L 11/05/2023 - 16:45:27: [AMXX] [0] yt_class_revenant_ice_0.sma::ball_think (line 223)
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5262 (http://www.amxmodx.org)
Authors:
David "BAILOPAN" Anderson, Pavol "PM OnoTo" Marko
Felix "SniperBeamer" Geyer, Jonny "Got His Gun" Bergstrom
Lukasz "SidLuke" Wlasinski, Christian "Basic-Master" Hammacher
Borja "faluco" Ferrer, Scott "DS" Ehlert
Compiled: Oct 23 2019 07:26:46
Built from: https://github.com/alliedmodders/amxmodx/commit/be3f2f5
Build ID: 5262:be3f2f5
Core mode: JIT+ASM32
Билд
Protocol version 48
Exe version 1.1.2.7/Stdio (cstrike)
Exe build: 21:47:32 Aug 8 2018 (7882)
ReGamedll
ReGameDLL version: 5.21.0.556-dev
Build date: 08:43:58 Jul 22 2022
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/1081301
Версия Metamod
Metamod v1.21p37  2013/05/30 (5:13)
by Will Day
http://www.metamod.org/
Patch: Metamod-P (mm-p) v37
by Jussi Kivilinna
http://metamod-p.sourceforge.net/
compiled: May 30 2013, 11:41:16 EET (optimized)
Список метамодулей
[ 1] SafeNameAndChat  RUN   -    SafeNameAndChat.  v1.1      ini   ANY   ANY  
[ 2] dproto_EF RUN - dproto_i386.so v0.9.391 ini Start Never
[ 3] ProcessCmds RUN - processcmds_mm_i v1.2.0 ini Start Never
[ 4] AMX Mod X RUN - amxmodx_mm_i386. v1.9.0.5 ini Start ANY
[ 5] Semiclip RUN - semiclip_mm_i386 v2.2+MA ini ANY ANY
[ 6] YaPB RUN - yapb.so v4.4.913 ini Chlvl ANY
[ 7] VoiceTranscoder RUN - VoiceTranscoder. v2020MA2 ini ANY ANY
[ 8] MySQL RUN - mysql_amxx_i386. v1.9.0.5 pl4 ANY ANY
[ 9] FakeMeta RUN - fakemeta_amxx_i3 v1.9.0.5 pl4 ANY ANY
[10] CSX RUN - csx_amxx_i386.so v1.9.0.5 pl4 ANY ANY
[11] Ham Sandwich RUN - hamsandwich_amxx v1.9.0.5 pl4 ANY ANY
[12] GeoIP RUN - geoip_amxx_i386. v1.9.0.5 pl4 ANY ANY
[13] gRIP RUN - grip_amxx_i386.s v0.1.5 B pl4 ANY ANY
[14] ReAPI RUN - reapi_amxx_i386. v5.22.0. pl4 ANY Never
[15] Engine RUN - engine_amxx_i386 v1.9.0.5 pl4 ANY ANY
[16] Fun RUN - fun_amxx_i386.so v1.9.0.5 pl4 ANY ANY
[17] CStrike RUN - cstrike_amxx_i38 v1.9.0.5 pl4 ANY ANY
[18] SQLite RUN - sqlite_amxx_i386 v1.9.0.5 pl4 ANY ANY
Список плагинов
[  1] AMXBans: Core 1.9.0     MA: 1.6.14  Larte Team        amxbans_core.am  running  
[ 2] AMXBans: Main 1.9.0 MA: 1.6.14 Larte Team amxbans_main.am running
[ 3] Admin Commands 1.9.0.5262 AMXX Dev Team admincmd.amxx running
[ 4] Slots Reservation 1.9.0.5262 AMXX Dev Team adminslots.amxx running
[ 5] Multi-Lingual System 1.9.0.5262 AMXX Dev Team multilingual.am running
[ 6] [Customizable] AmxModM 0.0.5 Albertio amxmodmenu.amxx running
[ 7] Commands Menu 1.9.0.5262 AMXX Dev Team cmdmenu.amxx running
[ 8] Players Menu 1.9.0.5262 AMXX Dev Team plmenu.amxx running
[ 9] Teleport Menu 1.9.0.5262 AMXX Dev Team telemenu.amxx running
[ 10] Map Manager 2.5.61 Mistrick mapmanager.amxx error
[ 11] Maps Menu 1.9.0.5262 AMXX Dev Team mapsmenu.amxx running
[ 12] Plugin Menu 1.9.0.5262 AMXX Dev Team pluginmenu.amxx running
[ 13] Admin Chat 1.9.0.5262 AMXX Dev Team adminchat.amxx running
[ 14] Scrolling Message 1.9.0.5262 AMXX Dev Team scrollmsg.amxx running
[ 15] Info. Messages 1.9.0.5262 AMXX Dev Team imessage.amxx running
[ 16] Admin Votes 1.9.0.5262 AMXX Dev Team adminvote.amxx running
[ 17] Pause Plugins 1.9.0.5262 AMXX Dev Team pausecfg.amxx running
[ 18] Stats Configuration 1.9.0.5262 AMXX Dev Team statscfg.amxx running
[ 19] [ZP] Stats 1.0 =) zp_sayme.amxx running
[ 20] StatsX 1.9.0.5262 AMXX Dev Team statsx.amxx running
[ 21] [BG] Provider: GeoIP 0.2 mx?! bg_provider_geo running
[ 22] [BG] Provider: ip-api. 0.1 mx?! bg_provider_ip- running
[ 23] Bypass Guard 1.0.1 mx?! bypass_guard.am running
[ 24] [GM] AntiAdv 0.0.2 [GM] NWC gm_antiadv.amxx running
[ 25] Reklama 20.05.2020 mx?! reklama.amxx running
[ 26] [ZP] Addon: Display th 0.1.6 meTaLiCroSS round.amxx running
[ 27] PLUGIN VERSION AUTHOR zp_lighting_vot running
[ 28] Yet Another Voteban 1.8 AndrewZ/voed yet_another_vot running
[ 29] AMXBans: Screens 1.9.0 MA: 1.6.14 Larte Team amxbans_ssban.a running
[ 30] ZM VIP 1.9.1 BETA aaarnas zm_vip.amxx running
[ 31] ChatAdditions: Core v1.9.1 Sergey Shorokhov ChatAdditions_C debug
[ 32] ChatAdditions: SQLite v1.9.1 Sergey Shorokhov CA_Storage_SQLi debug
[ 33] CA: Anti Flood v1.9.1 Nordic Warrior CA_AntiFlood.am debug
[ 34] CA: Mute v1.9.1 Sergey Shorokhov CA_Mute.amxx debug
[ 35] CA: VoteGAG 1.0.0-alph Sergey Shorokhov CA_Addon_VoteGa debug
[ 36] CA Addon: Request UnGA v1.9.1 steelzzz CA_Addon_Reques debug
[ 37] CA: Gag v1.9.1 Sergey Shorokhov CA_Gag.amxx debug
[ 38] [ZP] Core/Engine 5.0.8 ZP Dev Team zp50_core.amxx running
[ 39] [AMXX] Settings API 1.0 MeRcyLeZZ amx_settings_ap running
[ 40] [CS] Player Models API 1.2 WiLS cs_player_model running
[ 41] [CS] Teams API 1.2 WiLS cs_teams_api.am running
[ 42] [CS] MaxSpeed API 1.0 WiLS cs_maxspeed_api running
[ 43] [CS] Weapon Models API 1.1 WiLS cs_weap_models_ running
[ 44] [CS] Weapons Restrict 0.4 WiLS cs_weap_restric running
[ 45] [CS] Ham Hooks for Bot 1.0 WiLS cs_ham_bots_api running
[ 46] [ZP] Class: Zombie 5.0.8 ZP Dev Team zp50_class_zomb running
[ 47] [ZP] Class: Human 5.0.8 ZP Dev Team zp50_class_huma running
[ 48] [ZP] Class: Nemesis 5.0.8 ZP Dev Team zp50_class_neme running
[ 49] [ZP] Class: Survivor 5.0.8 ZP Dev Team zp50_class_surv running
[ 50] [ZP] Class: Zombie: Cl 5.0.8 ZP Dev Team zp50_class_zomb running
[ 51] [CSO Like] ZClass: Hea 0.2 | 03.0 inf (nimroK) cso_zclass_heav running
[ 52] [ZP 4.3] ZClass: Regen 1.1 ImmortalAmxx amxxclassregene running
[ 53] [ZP] Zombie Class: Thi 1.1 BaRSiK zp_zclass_thief running
[ 54] [ZP] Zombie Class: Cer 0.1 DJHD! zp_zclass_cerbe running
[ 55] [ZP] Zombie Class: KF 0.2 meTaLiCroSS zp_zcls_siren1. running
[ 56] [ZP] SMOKER ZOMBIE 1.0 Mr.Best zp_class_smoker running
[ 57] [ZP] Class: x-Voodoo 2019 | 1.0 xUnicorn (t3rkec zp_zclass_voodo running
[ 58] [ZP | AMXX] Sting Fing 0/0/2 m0rt3m zp_class_sting_ running
[ 59] [ZP] Wallclimb 1.0 WallClimb by Pyt zp_class_climb. running
[ 60] [ZP] Class : Leap Zomb 1.4.2 Fry! zp_zlongjump.am running
[ 61] [ZP] Zombie Class: Par 0.1 =), LARS-BLOODLI yt_class_revena debug
[ 62] [ZP] Respawn Zombie Cl 5.0 CHyC/PomanoB zp_zombie_respa running
[ 63] [ZP] Zombie Class: Sup 1.1 Re.Act!ve zp_zclass_suppl running
[ 64] [ZP] Invisible Zombie 1.0 Fry! zp_class_invisi running
[ 65] [ZP Class] Flying Zomb 0.1 ONYX zp_class_flying running
[ 66] [ZP] Class: Human: Cla 5.0.8 ZP Dev Team zp50_class_huma running
[ 67] [ZP] Human Armor 5.0.8 ZP Dev Team zp50_human_armo running
[ 68] [ZP] Game Modes Manage 5.0.8 ZP Dev Team zp50_gamemodes. running
[ 69] [ZP] Game Mode: Infect 5.0.8 ZP Dev Team zp50_gamemode_i running
[ 70] [ZP] Game Mode: Multip 5.0.8 ZP Dev Team zp50_gamemode_m paused
[ 71] [ZP] Game Mode: Swarm 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 72] [ZP] Game Mode: Nemesi 5.0.8 ZP Dev Team zp50_gamemode_n paused
[ 73] [ZP] Game Mode: Surviv 5.0.8 ZP Dev Team zp50_gamemode_s paused
[ 74] [ZP] Game Mode: Plague 5.0.8 ZP Dev Team zp50_gamemode_p paused
[ 75] [ZP] Game Mode: Armage 5.0.8 ZP Dev Team zp50_gamemode_a paused
[ 76] [ZP] Items Manager 5.0.8 ZP Dev Team zp50_items.amxx running
[ 77] [ZP] Items Manager: Am 5.0.8 ZP Dev Team zp50_items_ammo running
[ 78] [ZP] Item: Weapons 5.0.8 ZP Dev Team zp50_item_weapo running
[ 79] [ZP] Item: Nightvision 5.0.8 ZP Dev Team zp50_item_night running
[ 80] [ZP] Item: Antidote 5.0.8 ZP Dev Team zp50_item_antid running
[ 81] [ZP] Item: Zombie Madn 5.0.8 ZP Dev Team zp50_item_zombi running
[ 82] [ZP] Item: Infection B 5.0.8 ZP Dev Team zp50_item_infec running
[ 83] [ZP] Extra Item: Strip 1.6 Hezerf zp_extra_strip. running
[ 84] [ZP] Admin Commands 5.0.8 ZP Dev Team zp50_admin_comm running
[ 85] [ZP] Admin Menus 5.0.8 ZP Dev Team zp50_admin_menu running
[ 86] [ZP] Admin Models 5.0.8 ZP Dev Team zp50_admin_mode running
[ 87] [ZP] Custom Buy Menus 5.0.8 ZP Dev Team zp50_buy_menus. running
[ 88] [ZP] Buyzones 5.0.8 ZP Dev Team zp50_buy_zones. running
[ 89] [ZP] Rewards: Ammo Pac 5.0.8 ZP Dev Team zp50_rewards_am running
[ 90] [ZP] Rewards: Frags & 5.0.8 ZP Dev Team zp50_rewards_fr running
[ 91] [ZP] Deathmatch 5.0.8 ZP Dev Team zp50_deathmatch running
[ 92] [ZP] Random Spawning 5.0.8 ZP Dev Team zp50_random_spa running
[ 93] [ZP] Zombie Features 5.0.8 ZP Dev Team zp50_zombie_fea running
[ 94] [ZP] Zombie Sounds 5.0.8 ZP Dev Team zp50_zombie_sou running
[ 95] [ZP] Zombie Damage 5.0.8 ZP Dev Team zp50_zombie_dam running
[ 96] [ZP] Human Unlimited A 5.0.8 ZP Dev Team zp50_human_ammo running
[ 97] [ZP] Flashlight 5.0.8 ZP Dev Team zp50_flashlight running
[ 98] [ZP] Nightvision 5.0.8 ZP Dev Team zp50_nightvisio running
[ 99] [ZP] Leap/Longjump 5.0.8 ZP Dev Team zp50_leap.amxx running
[100] [ZP] Pain Shock Free 5.0.8 ZP Dev Team zp50_painshockf running
[101] [ZP] Knockback 5.0.8 ZP Dev Team zp50_knockback. running
[102] [ZP] Weapon Drop/Strip 5.0.8 ZP Dev Team zp50_weapon_dro running
[103] [ZP] Effects: Infect 5.0.8 ZP Dev Team zp50_effects_in running
[104] [ZP] Effects: Cure 5.0.8 ZP Dev Team zp50_effects_cu running
[105] [ZP] Effects: Lighting 5.0.8 ZP Dev Team zp50_effects_li running
[106] [ZP] Ambience Effects 5.0.8 ZP Dev Team zp50_ambience_e running
[107] [ZP] Ambience Sonds 5.0.8 ZP Dev Team zp50_ambience_s running
[108] [ZP] Main Menu 5.0.8 ZP Dev Team zp50_main_menu. running
[109] [ZP] Objective Remover 5.0.8 ZP Dev Team zp50_objective_ running
[110] [ZP] Gameplay Fixes 5.0.8 ZP Dev Team zp50_gameplay_f running
[111] [ZP] Team Scoring 5.0.8 ZP Dev Team zp50_team_scori running
[112] [ZP] HUD Information 5.0.8 ZP Dev Team zp50_hud_info.a running
[113] [ZP] Ammo Packs 5.0.8 ZP Dev Team zp50_ammopacks. running
[114] [ZP] Grenade: Fire 5.0.8 ZP Dev Team zp50_grenade_fi running
[115] [ZP] Grenade: Frost 5.0.8 ZP Dev Team zp50_grenade_fr running
[116] [ZP] Grenade: Flare 5.0.8 ZP Dev Team zp50_grenade_fl running
[117] [ZP] ZP 4.3 Subplugin 5.0.8 ZP Dev Team zp50_zp43_compa running
[118] [ZP] LaserMine 2.8.1 SandStriker / Sh zp_lasermine_28 running
[119] ZP: Show Victim HP On 1.0 <VeCo> ZP_zmHp.amxx running
[120] Amx Dodge 0.1.0 PomanoB zp_dodge_human. running
[121] [ZP] Extra Item: Multi 1.0 pharse zp_extra_multij running
[122] [ZP] Addon: Extended G 2.0 [ru]In1ernal Err zp_ammo_ex.amxx running
[123] [ZP43] Extra item: Gas 3.0 H.RED.ZONE zp43_gas_mask.a running
[124] [ZP] Item: Antidote Bo 5.0.8 ZP Dev Team zp50_item_antid running
[125] Player Name 0.9.2 default zp_player_name. running
[126] Perfect Camera 0.2.5 Nordic Warrior PerfectCamera.a running
[127] NadeModes 11.2 Nomexous & OT nademodes.amxx running
[128] [ZP] WPN Minigun 1.65 CLLlAgOB zp_extra_minigu running
[129] [ZP] Extra Item: Gauss 0.6 meTaLiCroSS zp_extra_gauss. running
[130] [ZP] Extra Drag 0.1 4eRT zp_extra_drag_a running
[131] [ZP] Extra Item: Knife 1.2 pharse & sexy2x7 zp_extra_knife_ running
[132] ZP AP Store 0.0.1 wbyokomo zp_ap_store.amx running
[133] [ZP] Donate Plugin 1.0 @bdul! zp_donate_ammo_ running
[134] ZP Countdown Vox 0.0.1 wbyokomo zp_vox_countdow running
[135] [ZP] Buy Health Points 1.0 T[h]E Dis[as]teR zp_buyhp_limit. running
[136] [ZP] Extra: Anti-Infec 1.0 MeRcyLeZZ zp_buyArmorLimi running
[137] [ZP] Extra: Unlimited 1.0 MeRcyLeZZ zp_extra_unlimi running
( 10) Error: Nothing loaded from file.
137 plugins, 130 running
Автор плагина
=), LARS-BLOODLIKER
Версия плагина
0.1
Исходный код
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>
#include <zombieplague>
#include <cstrike>
#include <xs>

new const ball_name[] = "paralize_ball"
new const ball_model[] = "models/zombie_plague/w_hiddentail2.mdl"
new const ball_soundtouch[] = { "warcraft3/frostnova.wav" }

new const zclass_name[] = { "Ревенант ICE" } // name
new const zclass_info[] = { "Замораживает" } // description
new const zclass_model[] = { "zp_frost_zm" } // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" } // claw model
const zclass_health = 3000 // health
const zclass_speed = 245 // speed
const Float:zclass_gravity = 0.7 // gravity
const Float:zclass_knockback = 1.0 // knockback

#define OFFSET_MODELINDEX 491
#define OFFSET_LINUX 5

new index, defaultindex

new g_zclassparalize
new cvar_paralizedelay , cvar_paralizevelocity , cvar_paralizeballhealth , cvar_paralizeballparalizetime
new sTrail , g_touchs[512] , g_can[33] , g_paralizen[33]

public plugin_init()
{
register_plugin("[ZP] Zombie Class: Paralize Zombie", "0.1", "=), LARS-BLOODLIKER")

cvar_paralizedelay = register_cvar("zp_classparalize_delay","35")
cvar_paralizevelocity = register_cvar("zp_classparalizeball_velocity","600")
cvar_paralizeballhealth = register_cvar("zp_classparalizeball_health","100")
cvar_paralizeballparalizetime = register_cvar ( "zp_classparalizeball_paralizetime", "5.0" )

register_touch(ball_name, "worldspawn", "touchWorld")
register_touch(ball_name, "func_wall", "touchWorld")
register_touch(ball_name, "func_door", "touchWorld")
register_touch(ball_name, "func_door_rotating", "touchWorld")
register_touch(ball_name, "func_wall_toggle", "touchWorld")
register_touch(ball_name, "func_breakable", "touchWorld")
register_touch(ball_name, "player", "touchPlayer")
register_think(ball_name,"ball_think")

register_clcmd("drop","paralize_cmd")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_forward(FM_PlayerPreThink, "fw_PreThink")

RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")

RegisterHam(Ham_Player_Duck, "player", "Player_Duck", 1)
}

public plugin_precache()
{
precache_model(ball_model)
sTrail = precache_model("sprites/laserbeam.spr")

g_zclassparalize = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_knockback)

index = precache_model("models/player/zp_frost_zm/zp_frost_zm.mdl")
defaultindex = precache_model("models/player.mdl")
}

public paralize_cmd( id )
{
if( !is_user_alive(id) || !zp_get_user_zombie(id) || zp_get_user_zombie_class(id) != g_zclassparalize || zp_get_user_nemesis(id) )
return PLUGIN_CONTINUE;

if(g_can[id])
{
client_print(id,print_center,"Ждите еще %d секунд",g_can[id])
return PLUGIN_HANDLED;
}

static Float:origin[3], Float:angles[3], Float:v_forward[3], Float:v_right[3], Float:v_up[3], Float:gun_position[3], Float:player_origin[3], Float:player_view_offset[3];
static Float:OriginX[3]
pev(id, pev_v_angle, angles);
pev(id, pev_origin, OriginX);
engfunc(EngFunc_MakeVectors, angles);

global_get(glb_v_forward, v_forward);
global_get(glb_v_right, v_right);
global_get(glb_v_up, v_up);

//m_pPlayer->GetGunPosition( ) = pev->origin + pev->view_ofs
pev(id, pev_origin, player_origin);
pev(id, pev_view_ofs, player_view_offset);
xs_vec_add(player_origin, player_view_offset, gun_position);

xs_vec_mul_scalar(v_forward, 13.0, v_forward);
xs_vec_mul_scalar(v_right, 0.0, v_right);
xs_vec_mul_scalar(v_up, 5.0, v_up);

xs_vec_add(gun_position, v_forward, origin);
xs_vec_add(origin, v_right, origin);
xs_vec_add(origin, v_up, origin);

new Float:StartOrigin[3]

StartOrigin[0] = origin[0];
StartOrigin[1] = origin[1];
StartOrigin[2] = origin[2];


new Float:fVelocity[3] , Float:flOrigin[3] , Float:flAngle[3]
pev(id,pev_origin,flOrigin)
pev(id,pev_angles,flAngle)

new ball = create_entity("info_target")

if (!ball) return PLUGIN_HANDLED

g_touchs[ball] = 0

entity_set_string(ball, EV_SZ_classname, ball_name)

entity_set_model(ball, ball_model)

entity_set_origin(ball, StartOrigin)

entity_set_vector(ball, EV_VEC_angles, flAngle)

new Float:MinBox[3] = {-1.0, -1.0, -1.0}
new Float:MaxBox[3] = {1.0, 1.0, 1.0}
entity_set_vector(ball, EV_VEC_mins, MinBox)
entity_set_vector(ball, EV_VEC_maxs, MaxBox)

entity_set_int(ball, EV_INT_solid, SOLID_SLIDEBOX)

entity_set_int(ball, EV_INT_movetype, MOVETYPE_BOUNCEMISSILE)

entity_set_edict(ball, EV_ENT_owner, id)

entity_set_int(ball, EV_INT_effects, EF_BRIGHTLIGHT)

VelocityByAim(id, get_pcvar_num(cvar_paralizevelocity ), fVelocity)
entity_set_vector(ball , EV_VEC_velocity, fVelocity)

fm_set_rendering(ball, kRenderFxGlowShell,255, 255, 255, kRenderNormal, 16)

message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_BEAMFOLLOW) // Temporary entity ID
write_short(ball) // Entity
write_short(sTrail) // Sprite index
write_byte(10) // Life
write_byte(3) // Line width
write_byte(100) // Red
write_byte(255) // Green
write_byte(255) // Blue
write_byte(255) // Alpha
message_end()

UTIL_PlayPlayerAnimation(id,10)
UTIL_PlayWeaponAnimation(id,8)

g_can[id] = get_pcvar_num(cvar_paralizedelay)
set_task(1.0,"ability_zero",id)

entity_set_float(ball, EV_FL_health , get_pcvar_float(cvar_paralizeballhealth))

entity_set_float(ball, EV_FL_nextthink, get_gametime() + 0.1)

return PLUGIN_HANDLED;
}

public touchWorld(ball, world) {

emit_sound(ball, CHAN_WEAPON, ball_soundtouch, 1.0, ATTN_NORM, 0, PITCH_NORM)
g_touchs[ball] += 1
if(g_touchs[ball] == get_pcvar_num(cvar_paralizeballhealth)) remove_entity(ball)

return PLUGIN_HANDLED
}

public touchPlayer(ball, player) {
client_print(0,print_chat,"touch %d",player)
remove_task(player)
paralize(player)
//set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",player)

return PLUGIN_HANDLED
}

public event_round_start()
{
new iEnt = FM_NULLENT;
while( (iEnt = engfunc(EngFunc_FindEntityByString, iEnt, "classname", ball_name)) > 0 )
{
engfunc(EngFunc_RemoveEntity,iEnt)
}

for(new i;i<=32;i++)
{
if(g_paralizen[i]) fm_set_rendering(i)
g_can[i] = 0
g_paralizen[i] = 0
remove_task(i)
}
}

public ball_think(ball)
{
if(!is_valid_ent(ball))
return;

new Float:oldangles[3],Float:angles[3]
pev(ball,pev_angles,oldangles)
angles[0] = oldangles[0] + random_float(20.0,100.0)
angles[1] = oldangles[1] + random_float(10.0,80.0)
angles[2] = oldangles[2] + random_float(10.0,80.0)
set_pev(ball,pev_angles,angles)

new Float:Velocity[3]
pev(ball,pev_velocity,Velocity)

if(Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0) remove_entity(ball)

entity_set_float(ball, EV_FL_nextthink, get_gametime() + 0.1)

}

public paralize(id)
{
if(!is_user_alive(id) || zp_get_user_zombie(id))
return;

g_paralizen[id] = 1
fm_set_rendering(id, kRenderFxGlowShell,100, 255, 255, kRenderNormal, 16)
set_task(get_pcvar_float(cvar_paralizeballparalizetime),"unparalize_player",id)
}

public unparalize_player(id)
{
if(!is_user_alive(id) || zp_get_user_zombie(id))
return;

g_paralizen[id] = 0
fm_set_rendering(id)
}

public remove_values(id)
{
remove_task(id)
g_can[id] = 0
}

public ability_zero(id)
{
g_can[id] -= 1
if(!g_can[id]) client_print(id,print_center,"Способность готова! Нажми G")
if(g_can[id]) set_task(1.0,"ability_zero",id)
}

public fw_PreThink(id)
{
if( !is_user_alive(id) || zp_get_user_zombie(id) || !g_paralizen[id])
return PLUGIN_CONTINUE;

set_pev( id, pev_button, pev(id,pev_button) & ~IN_ATTACK );

set_pev(id, pev_maxspeed, 0.0)

new Float:vel[3]
set_pev(id,pev_velocity,vel)

return PLUGIN_HANDLED
}

public zp_user_humanized_post(id)
{
fm_set_user_model_index(id, defaultindex)

remove_values(id)
}
public fw_PlayerKilled(id, attacker, shouldgib) remove_values(id)
public client_connect(id) remove_values(id)

public zp_user_infected_post(id)
{
if((zp_get_user_zombie_class(id) == g_zclassparalize) && (zp_get_user_zombie(id)))
{
fm_set_user_model_index(id, index)
}
remove_values(id)
}

/*
public zp_user_infected_pre(id)
{
if(!(get_user_flags(id) & ADMIN_LEVEL_B))
{
if(zp_get_user_next_class(id) == g_zclassparalize)
{
zp_set_user_zombie_class(id, 0)
client_print(id, print_chat, "Данный класс только для Админов")
}
}
}
*/

stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 16)
{
static Float:color[3]
color[0] = float(r)
color[1] = float(g)
color[2] = float(b)

set_pev(entity, pev_renderfx, fx)
set_pev(entity, pev_rendercolor, color)
set_pev(entity, pev_rendermode, render)
set_pev(entity, pev_renderamt, float(amount))
}

stock UTIL_PlayWeaponAnimation(const Player, const Sequence)
{
set_pev(Player, pev_weaponanim, Sequence)

message_begin(MSG_ONE_UNRELIABLE, SVC_WEAPONANIM, .player = Player)
write_byte(Sequence)
write_byte(pev(Player, pev_body))
message_end()
}

stock UTIL_PlayPlayerAnimation(const id, const Sequence , Float:frame = 1.0 , Float:framerate = 1.0)
{
entity_set_int(id, EV_INT_sequence, Sequence)
entity_set_int(id, EV_INT_gaitsequence, 1)
entity_set_float(id, EV_FL_frame, frame)
entity_set_float(id, EV_FL_framerate, framerate)
}

stock get_speed_vector(const Float:origin1[3],const Float:origin2[3],Float:speed, Float:new_velocity[3])
{
new_velocity[0] = origin2[0] - origin1[0]
new_velocity[1] = origin2[1] - origin1[1]
new_velocity[2] = origin2[2] - origin1[2]
new Float:num = floatsqroot(speed*speed / (new_velocity[0]*new_velocity[0] + new_velocity[1]*new_velocity[1] + new_velocity[2]*new_velocity[2]))
new_velocity[0] *= num
new_velocity[1] *= num
new_velocity[2] *= num

return 1
}

stock fm_cs_set_user_deaths(id, value)
{
set_pdata_int(id, 444, value, 5)
}

stock fm_cs_get_user_team(id)
{
return get_pdata_int(id, 114, 5);
}

public Player_Duck(id)
{
if(zp_get_user_zombie_class(id) == g_zclassparalize && zp_get_user_zombie(id))
{
static button, ducking
button = pev(id, pev_button)
ducking = pev(id, pev_flags) & (FL_DUCKING | FL_ONGROUND) == (FL_DUCKING | FL_ONGROUND)

if(button & IN_DUCK || ducking)
{
set_pev(id, pev_view_ofs, {0.0, 0.0, 20.0})
}
}
}

stock fm_set_user_model_index(id, value)
{
set_pdata_int(id, OFFSET_MODELINDEX, value, OFFSET_LINUX)
}
Вот такая ошибка

L 11/05/2023 - 16:44:44: [ENGINE] Invalid entity 135
L 11/05/2023 - 16:44:44: [AMXX] Displaying debug trace (plugin "yt_class_revenant_ice_0.amxx", version "0.1")
L 11/05/2023 - 16:44:44: [AMXX] Run time error 10: native error (native "entity_set_float")
L 11/05/2023 - 16:44:44: [AMXX] [0] yt_class_revenant_ice_0.sma::ball_think (line 223)
L 11/05/2023 - 16:44:49: [ENGINE] Invalid entity 137
L 11/05/2023 - 16:44:49: [AMXX] Displaying debug trace (plugin "yt_class_revenant_ice_0.amxx", version "0.1")
L 11/05/2023 - 16:44:49: [AMXX] Run time error 10: native error (native "entity_set_float")
L 11/05/2023 - 16:44:49: [AMXX] [0] yt_class_revenant_ice_0.sma::ball_think (line 223)

Еще бывает (не всегда) что шар не исчезает, а летает по карте до тех пор пока не выпустишь новый, так же ИНОГДА если заразить того кого коснулся шар - у него не пропадает свечение, скриншоты приложил
 
В этой теме было размещено решение! Перейти к решению.

Download all Attachments

Сообщения
75
Реакции
82
Помог
6 раз(а)
В целом лучше избавься от этого плагина или перепишите его как следует.
Код:
public ball_think(ball)
{
    if(!is_valid_ent(ball))
        return;

    new Float:oldangles[3],Float:angles[3]
    pev(ball,pev_angles,oldangles)
    angles[0] = oldangles[0] + random_float(20.0,100.0)
    angles[1] = oldangles[1] + random_float(10.0,80.0)
    angles[2] = oldangles[2] + random_float(10.0,80.0)
    set_pev(ball,pev_angles,angles)

    new Float:Velocity[3]
    pev(ball,pev_velocity,Velocity)

    if(Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0) remove_entity(ball)

    entity_set_float(ball, EV_FL_nextthink, get_gametime() + 0.1)

}
-->
Код:
public ball_think(ball)
{
    if(!pev_valid(ball))
        return;
    
    set_pev(ball, pev_nextthink, get_gametime() + 0.1)
    
    new Float:angles[3];    pev(ball,pev_angles,angles)
    angles[0] += random_float(20.0,100.0)
    angles[1] += random_float(10.0,80.0)
    angles[2] += random_float(10.0,80.0)
    set_pev(ball,pev_angles,angles)

    new Float:Velocity[3];    pev(ball,pev_velocity,Velocity)

    if(Velocity[0] < 1.0 && Velocity[2] < 1.0 && Velocity[1] < 1.0)
        remove_entity(ball)
}
 
Сообщения
61
Реакции
9
Помог
1 раз(а)
Flymic24, спасибо! Проверю как можно скорее. А почему избавиться? Код плохой или еще какие-то беды? Есть переписанная -
Код:
/*
    Revenant Ice 1.0 (2023)    by R1CHICOREJZ

    Some functions/stocks taken from t3rkecorejz plugins
*/

public stock const PluginName[] =      "[ZP] ZClass: Revenant Ice";
public stock const PluginVersion[] = "1.0 | 2023";
public stock const PluginAuthor[] =     "R1CHICOREJZ";

/* -> Main includes <- */
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <reapi>
#include <xs>

/* -> Other includes <- */
#include <zombieplague>
// #include <zmgorod>

/* -> Macroses <- */
#define LOWER_LIMIT_OF_ENTITIES            100

#define PrecacheArray(%0,%1)            for(new i; i < sizeof %1; i++) engfunc(EngFunc_Precache%0, %1[i])

#define _is_user_zombie(%0)             zp_get_user_zombie(%0)
#define _is_ice_zombie_class(%0)         (zp_get_user_zombie_class(%0) == gl_iRevenantIce)
#define _is_user_nemesis(%0)            zp_get_user_nemesis(%0)

#define BIT_ADD(%0,%1)                    (%0 |= BIT(%1))
#define BIT_SUB(%0,%1)                    (%0 &= ~BIT(%1))
#define BIT_VALID(%0,%1)                bool: ((%0 & BIT(%1)) ? true : false)

#define Vector3(%0)                        Float: %0[3]
#define IsUserValid(%0)                    bool: (0 < %0 <= 32)

#define ZOMBIE_HURT                        true     // (false - zombies will not have the sound of pain and death)

/* -> Entity: Ball <- */
new const ENTITY_BALL_CLASSNAME[] =     "ent_revice_ball_x";
new const ENTITY_BALL_MODEL[] =         "models/LR_ZP/w_hiddentail2_fix.mdl";
new const ENTITY_BALL_TRAIL[] =            "sprites/laserbeam.spr";
new const ENTITY_BALL_DESTROY[] =        "sprites/pistol_smoke1.spr";
new const ENTITY_GLASS_DESTROY[] =        "models/glassgibs.mdl";
const Float: ENTITY_BALL_SPEED =        600.0;    // Ball Speed
const Float: ENTITY_BALL_LIFETIME =        4.0;    // How long ball still alive
const Float: ENTITY_FREEZE_LIFETIME =    4.0;    // How long player still freeze

/* -> Other Zombie Class Settings <- */
new const ZM_CLASS_GRENADE[] =            "models/LR_ZP/v_zombibomb_rev_ice.mdl";    // Grenade model
const Float: ZM_SKILL_COOLDOWN =         15.0;     // Skill reload time

/* -> Params <- */
new gl_iRevenantIce,

    gl_iMaxEntities,

    gl_bitPlayerSkillActive,
    gl_bitPlayerFrozen,

    Float: g_flSkillWait[MAX_CLIENTS + 1];

enum {
    ModelIndex_BallTrail,
    ModelIndex_DestroySprite,
    ModelIndex_DestroyGlass,
    ModelIndex_List
}

new gl_iszModelIndex[ModelIndex_List];

new Ham:Ham_Player_ResetMaxSpeed = Ham_Item_PreFrame

new Float: g_frozen_gravity[33];                 // store previous gravity when frozen

/* -> Sounds <- */
new const BALL_SOUNDS[][] =
{
    "warcraft3/frostnova.wav",
    "warcraft3/impalehit.wav",
    "warcraft3/impalelaunch1.wav"
}

enum {
    eRevenant_BallDestroy,
    eRevenant_BallFrozen,
    eRevenant_BallUnFrozen
}

#if ZOMBIE_HURT == true
    new const PAIN_SOUNDS[][] =
    {
        "zombi/passzombie_hurt1.wav",
        "zombi/passzombie_hurt2.wav",
        "zombi/passzombie_death1.wav",
        "zombi/passzombie_death2.wav"
    }

    enum {
        eRevSound_HurtOne = 0,
        eRevSound_HurtTwo,
        eRevSound_DeathOne,
        eRevSound_DeathTwo
    }
#endif

/* -> AMX <- */
public plugin_init()
{
    register_plugin(PluginName, PluginVersion, PluginAuthor);
   
    new const GRENADES_ENTITY[][] = { "weapon_hegrenade", "weapon_flashbang", "weapon_smokegrenade" };
   
    /* -> HamSandWich <- */
    for(new i = 0; i < sizeof GRENADES_ENTITY; i++)
        RegisterHam(Ham_Item_Deploy, GRENADES_ENTITY[i], "CGrenade__Deploy_Post", true);

    RegisterHam(Ham_Player_ResetMaxSpeed, "player", "CPlayer_ResetMaxSpeed_Post", true);

    /* -> ReAPI <- */
    RegisterHookChain(RG_CSGameRules_RestartRound, "CSGameRules_RestartRound", false);
    RegisterHookChain(RG_CBasePlayer_Killed, "CBasePlayer_Killed", true);

    #if ZOMBIE_HURT == true
        RegisterHookChain(RH_SV_StartSound, "SV_StartSound");
    #endif

    /* -> Client Commands <- */
    register_clcmd("drop", "Command_HookDrop");

    /* -> Other <- */
    gl_iMaxEntities = global_get(glb_maxEntities);
}

public plugin_precache()
{
    /* -> Register Zombie Class <- */
    gl_iRevenantIce = zp_register_zombie_class(
        "RevenantIce", // Name
        "RevenantI_desc", // Description
        "revenant_ice_zombie", // Model
        "v_knife_revenant_ice.mdl", // Claw
        // ADMIN_BAN, // Zombie Access     / _ (not required)
        8000, // Health Points
        240, // Speed
        0.77, // Gravity
        0.8) // Knockback

    /* -> Precache Models <- */
    engfunc(EngFunc_PrecacheModel, ZM_CLASS_GRENADE);
    engfunc(EngFunc_PrecacheModel, ENTITY_BALL_MODEL);
    gl_iszModelIndex[ModelIndex_BallTrail] = engfunc(EngFunc_PrecacheModel, ENTITY_BALL_TRAIL);
    gl_iszModelIndex[ModelIndex_DestroySprite] = engfunc(EngFunc_PrecacheModel, ENTITY_BALL_DESTROY);
    gl_iszModelIndex[ModelIndex_DestroyGlass] = engfunc(EngFunc_PrecacheModel, ENTITY_GLASS_DESTROY);

    /* -> Precache Sounds <- */
    PrecacheArray(Sound, BALL_SOUNDS);

    #if ZOMBIE_HURT == true
        PrecacheArray(Sound, PAIN_SOUNDS);
    #endif

    UTIL_PrecacheSoundsFromModel(ZM_CLASS_GRENADE);
}

public plugin_natives() register_native("zp_is_revenant_ice_zombie", "zpr_native_rev_ice_zombie", 1)

/*
    This Native, returns already assigned zombie class (true or false)

    Example for use:
       
        if (zp_is_revenant_ice_zombie(id))
            client_print(id, print_chat, "Your Zombie Class is Revenant Ice");
        else client_print(id, print_chat, "Your Zombie Class is not Revenant Ice");
*/

public bool: zpr_native_rev_ice_zombie(const pPlayer)
{
    return zp_get_user_zombie_class(pPlayer) == gl_iRevenantIce ? true : false;
}

Reset_Value(pPlayer)
{
    if (BIT_VALID(gl_bitPlayerSkillActive, pPlayer))
        BIT_SUB(gl_bitPlayerSkillActive, pPlayer);

    if (BIT_VALID(gl_bitPlayerFrozen, pPlayer))
        BIT_SUB(gl_bitPlayerFrozen, pPlayer);

    g_flSkillWait[pPlayer] = 0.0;
}

public client_putinserver(pPlayer) Reset_Value(pPlayer);
public client_disconnected(pPlayer) Reset_Value(pPlayer);

/* -> Zombie Plague <- */
public zp_user_humanized_post(pPlayer) Reset_Value(pPlayer);
public zp_user_infected_post(pPlayer) Reset_Value(pPlayer);

/* -> Ham: Grenade <- */
public CGrenade__Deploy_Post(iItem) {
    new pPlayer = get_member(iItem, m_pPlayer);
    if(!_is_user_zombie(pPlayer) || _is_user_nemesis(pPlayer)) return;

    if(_is_ice_zombie_class(pPlayer))
        set_entvar(pPlayer, var_viewmodel, ZM_CLASS_GRENADE);
}

/* -> Ham: Speed <- */
public CPlayer_ResetMaxSpeed_Post(pPlayer)
{
    if (!is_user_alive(pPlayer) || !BIT_VALID(gl_bitPlayerFrozen, pPlayer))
        return;

    set_entvar(pPlayer, var_velocity, NULL_VECTOR);
    set_entvar(pPlayer, var_maxspeed, 1.0);
}

/* -> ReAPI: Emit Sound Forward <- */
public CSGameRules_RestartRound()
{
    new szPlayers[MAX_PLAYERS], iPlayersNum, pPlayer = NULLENT;
    get_players_ex(szPlayers, iPlayersNum, GetPlayers_ExcludeHLTV);

    for (new i; i < iPlayersNum; i++)
    {
        pPlayer = szPlayers[i];
        if (!is_user_connected(pPlayer))
            continue;
       
        Reset_Value(pPlayer);
    }

    UTIL_DestroyEntitiesByClass(ENTITY_BALL_CLASSNAME);
}

public CBasePlayer_Killed(pPlayer) Reset_Value(pPlayer);

/* -> Emit Sound Forward <- */
#if ZOMBIE_HURT == true
    public SV_StartSound(recipients, pPlayer, channel, sample[], volume, Float:attn, flags, pitch)
    {
        // Replace these next sounds for zombies only
        if(!is_user_connected(pPlayer))
            return HC_CONTINUE;

        if(!_is_user_zombie(pPlayer) || !_is_ice_zombie_class(pPlayer) || _is_user_nemesis(pPlayer))
            return HC_CONTINUE;

        // Zombie being hit
        if(sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't') // hits
        {
            // if (zp_get_user_on_fire(pPlayer))
            //     return HC_SUPERCEDE; // Block sounds
           
            rh_emit_sound2(pPlayer, 0, CHAN_STATIC, PAIN_SOUNDS[random_num(eRevSound_HurtOne, eRevSound_HurtTwo)]);
            return HC_SUPERCEDE; // also block default hits sounds
        }
        else if (sample[7] == 'd') // Death Sound
        {
            if (sample[8] == 'i' && sample[9] == 'e')
            {
                rh_emit_sound2(pPlayer, 0, CHAN_STATIC, PAIN_SOUNDS[random_num(eRevSound_DeathOne, eRevSound_DeathTwo)]);
            }
            else if (sample[8] == 'e' && sample[9] == 'a')
            {
                rh_emit_sound2(pPlayer, 0, CHAN_STATIC, PAIN_SOUNDS[random_num(eRevSound_DeathOne, eRevSound_DeathTwo)]);
            }
            return HC_SUPERCEDE; // also block default death sounds
        }
        else if (sample[0] == 'p' && sample[1] == 'l') // fix headshot sound
        {
            if (sample[7] == 'h' && sample[10] == 'd')
            {
                // if (zp_get_user_on_fire(pPlayer))
                //     return HC_SUPERCEDE; // Block sounds
               
                rh_emit_sound2(pPlayer, 0, CHAN_STATIC, PAIN_SOUNDS[random_num(eRevSound_HurtOne, eRevSound_HurtTwo)]);
                return HC_SUPERCEDE; // also block default hs sounds
            }
        }
        return HC_CONTINUE;
    }
#endif

/* -> Start Ice Ability <- */
public Command_HookDrop(const pPlayer)
{
    if(!is_user_alive(pPlayer) || !_is_user_zombie(pPlayer) || !_is_ice_zombie_class(pPlayer) || _is_user_nemesis(pPlayer)) return PLUGIN_CONTINUE;

    new pActiveItem = get_member(pPlayer, m_pActiveItem);
    if(is_nullent(pActiveItem) || (get_member(pActiveItem, m_iId) != WEAPON_KNIFE)) return PLUGIN_CONTINUE;

    if(BIT_VALID(gl_bitPlayerSkillActive, pPlayer)) return PLUGIN_HANDLED;

    static Float: flGameTime; flGameTime = get_gametime();
    if(g_flSkillWait[pPlayer] <= flGameTime)
    {
        if(CPlayer_Create_Ball(pPlayer))
        {
            // rh_emit_sound2(pPlayer, 0, CHAN_STATIC, ABILITY_SOUNDS[eWitchSound_Laugh]);
            BIT_ADD(gl_bitPlayerSkillActive, pPlayer);
        }
    }
    else client_print(pPlayer, print_center, "Reload skill [%i seconds until next use]", floatround(g_flSkillWait[pPlayer] - flGameTime));

    return PLUGIN_HANDLED;
}

/* -> Create Ice Ball <- */
public CPlayer_Create_Ball(const pPlayer)
{
    if(gl_iMaxEntities - engfunc(EngFunc_NumberOfEntities) <= LOWER_LIMIT_OF_ENTITIES) return NULLENT;

    new pEntity = rg_create_entity("info_target");
    if(is_nullent(pEntity)) return NULLENT;

    new Float: vecOrigin[3]; get_entvar(pPlayer, var_origin, vecOrigin);
    new Float: vecViewOfs[3]; get_entvar(pPlayer, var_view_ofs, vecViewOfs);
    new Float: vecViewAngle[3]; get_entvar(pPlayer, var_v_angle, vecViewAngle);
    new Float: vecForward[3]; angle_vector(vecViewAngle, ANGLEVECTOR_FORWARD, vecForward);
    new Float: vecVelocity[3]; xs_vec_copy(vecForward, vecVelocity);

    // Start Origin
    xs_vec_mul_scalar(vecForward, 10.0, vecForward);
    xs_vec_add(vecViewOfs, vecForward, vecViewOfs);
    xs_vec_add(vecOrigin, vecViewOfs, vecOrigin);

    // Speed for missile
    xs_vec_mul_scalar(vecVelocity, ENTITY_BALL_SPEED, vecVelocity);

    set_entvar(pEntity, var_classname, ENTITY_BALL_CLASSNAME);
    set_entvar(pEntity, var_solid, SOLID_TRIGGER);
    set_entvar(pEntity, var_movetype, MOVETYPE_BOUNCEMISSILE);
    set_entvar(pEntity, var_owner, pPlayer);
    set_entvar(pEntity, var_velocity, vecVelocity);
    set_entvar(pEntity, var_origin, vecOrigin);
    set_entvar(pEntity, var_ltime, get_gametime() + ENTITY_BALL_LIFETIME);
    set_entvar(pEntity, var_nextthink, get_gametime());

    UTIL_SetEntityAnim(pEntity);
    UTIL_TE_BEAMFOLLOW(MSG_BROADCAST, pEntity, gl_iszModelIndex[ModelIndex_BallTrail], 10, 5, {100, 255, 255}, 150);

    engfunc(EngFunc_SetModel, pEntity, ENTITY_BALL_MODEL);
    engfunc(EngFunc_SetSize, pEntity, Float: {-5.0, -5.0, -5.0}, Float: {5.0, 5.0, 5.0});

    SetTouch(pEntity, "CBall_Touch");
    SetThink(pEntity, "CBall_Think");

    return true;
}

/* -> Ball touch players <- */
public CBall_Touch(const pEntity, const pToucher)
{
    if (is_nullent(pEntity) || !IsUserValid(pToucher)) return;

    new pOwner = get_entvar(pEntity, var_owner);
    if (pToucher == pOwner) return;

    if (!is_user_alive(pToucher))
    {
        CBall_Destroy(pEntity, pOwner);
        return;
    }

    if (!_is_user_zombie(pToucher) && !BIT_VALID(gl_bitPlayerFrozen, pToucher))
    {
        // Set the frozen flag
        BIT_ADD(gl_bitPlayerFrozen, pToucher);

        log_amx("Player Touched");

        // Set rendering for player
        UTIL_SetEntityRendering(pToucher, kRenderFxGlowShell, Float: { 100.0, 255.0, 255.0 }, _, 10.0) // Player glowing

        CBall_TouchPlayer(pToucher);
        CPlayer_Set_SkillWait(pOwner, ZM_SKILL_COOLDOWN);

        client_print_color(pOwner, print_team_grey, "^3[RevICE] ^4You`re froze: %n", pToucher)
        client_print_color(pToucher, print_team_grey, "^3[RevICE] ^4You`re frozen by: %n", pOwner)

        set_entvar(pEntity, var_fuser1, pToucher);
        set_entvar(pEntity, var_ltime, get_gametime() + ENTITY_BALL_LIFETIME);
        set_entvar(pEntity, var_nextthink, get_gametime() + ENTITY_FREEZE_LIFETIME);
        set_entvar(pEntity, var_effects, EF_NODRAW);

        SetThink(pEntity, "CBall_ResetThink");
        SetTouch(pEntity, "");
    }
}

/* -> Reset think for ball <- */
public CBall_ResetThink(const pEntity)
{
    if(is_nullent(pEntity))
        return;  

    new pToucher; pToucher = get_entvar(pEntity, var_fuser1);
    if (BIT_VALID(gl_bitPlayerFrozen, pToucher))
    {
        log_amx("Player BIT_SUB");
        BIT_SUB(gl_bitPlayerFrozen, pToucher);
        CPlayer_RemoveFreezeEffects(pToucher);
        UTIL_KillEntity(pEntity);
    }

    set_entvar(pEntity, var_nextthink, get_gametime());
}

/* -> Ball thinking <- */
public CBall_Think(const pEntity)
{
    if(is_nullent(pEntity)) return;

    new pOwner = get_entvar(pEntity, var_owner);
    if (get_entvar(pEntity, var_ltime) < get_gametime())
    {
        CBall_Destroy(pEntity, pOwner);
        return;
    }

    set_entvar(pEntity, var_nextthink, get_gametime());
}

/* -> Ball destroyed <- */
public CBall_Destroy(const pEntity, const pOwner)
{
    if (is_nullent(pEntity)) return;

    new Float: vecOrigin[3]; get_entvar(pEntity, var_origin, vecOrigin);

    rh_emit_sound2(pEntity, 0, CHAN_WEAPON, BALL_SOUNDS[eRevenant_BallDestroy]);
    UTIL_TE_EXPLOSION(MSG_PAS, gl_iszModelIndex[ModelIndex_DestroySprite], vecOrigin, 10.0, 5, 30, 2|4|8);

    CPlayer_Set_SkillWait(pOwner, ZM_SKILL_COOLDOWN);
    UTIL_KillEntity(pEntity);
}

/* -> Ball "destroyed" on toucher <- */
public CBall_TouchPlayer(const pToucher)
{
    // Sound & explosion (sprite)
    new Float: vecOrigin[3]; get_entvar(pToucher, var_origin, vecOrigin);

    rh_emit_sound2(pToucher, 0, CHAN_WEAPON, BALL_SOUNDS[eRevenant_BallFrozen]);
    UTIL_TE_EXPLOSION(MSG_PAS, gl_iszModelIndex[ModelIndex_DestroySprite], vecOrigin, 10.0, 5, 30, 2|4|8);

    // Save player's old gravity (bugfix)
    get_entvar(pToucher, var_gravity, g_frozen_gravity[pToucher]);
   
    // Prevent from jumping
    if (get_entvar(pToucher, var_flags) & FL_ONGROUND)
        set_entvar(pToucher, var_gravity, 999999.9) // set really high
    else
        set_entvar(pToucher, var_gravity, 0.000001) // no gravity

    // Set speed
    ExecuteHamB(Ham_Player_ResetMaxSpeed, pToucher)
}

/* -> Remove freeze effects <- */
public CPlayer_RemoveFreezeEffects(const pToucher)
{
    // Sound & render
    rh_emit_sound2(pToucher, 0, CHAN_WEAPON, BALL_SOUNDS[eRevenant_BallUnFrozen]);
    UTIL_SetEntityRendering(pToucher);

    // Set user gravity, which was saved
    set_entvar(pToucher, var_gravity, g_frozen_gravity[pToucher]);

    // Reset speed
    ExecuteHamB(Ham_Player_ResetMaxSpeed, pToucher)

    // Glass shatter
    new Vector3(vecVelocity);
    vecVelocity[0] = random_float(-50.0, 50.0);
    vecVelocity[1] = random_float(-50.0, 50.0);
    vecVelocity[2] = 25.0;

    new Float: vecOrigin[3]; get_entvar(pToucher, var_origin, vecOrigin);
    UTIL_TE_BREAKMODEL(MSG_BROADCAST, vecOrigin, Float: { 16.0, 16.0, 16.0 }, vecVelocity, 10, gl_iszModelIndex[ModelIndex_DestroyGlass], 10, 25, 0x01); // 0x01 - glass
}

/* -> Set player countdown and remove BIT <- */
public CPlayer_Set_SkillWait(const pPlayer, const Float: flWaitTime)
{
    g_flSkillWait[pPlayer] = get_gametime() + flWaitTime;
    BIT_SUB(gl_bitPlayerSkillActive, pPlayer);
}

/* -! Stocks !- */

/* -> Destroy All Entities by ClassName <- */
stock UTIL_DestroyEntitiesByClass(const szClassName[])
{
    static pEntity; pEntity = NULLENT;
    while ((pEntity = rg_find_ent_by_class(pEntity, szClassName)) > 0)
        UTIL_KillEntity(pEntity);
}

/* -> Destroy Entity <- */
stock UTIL_KillEntity(const pEntity)
{
    set_entvar(pEntity, var_flags, FL_KILLME);
    set_entvar(pEntity, var_nextthink, get_gametime());
}

/* -> Precache Sounds From Model <- */
stock UTIL_PrecacheSoundsFromModel(const szModelPath[])
{
    new pFile;
    if(!(pFile = fopen(szModelPath,"rt")))
        return;

    new szSoundPath[MAX_RESOURCE_PATH_LENGTH];
    new iNumSeq, iSeqIndex;
    new iEvent, iNumEvents, iEventIndex;

    fseek(pFile, 164, SEEK_SET);
    fread(pFile, iNumSeq, BLOCK_INT);
    fread(pFile, iSeqIndex, BLOCK_INT);

    for(new i = 0; i < iNumSeq; i++)
    {
        fseek(pFile, iSeqIndex + 48 + 176 * i, SEEK_SET);
        fread(pFile, iNumEvents, BLOCK_INT);
        fread(pFile, iEventIndex, BLOCK_INT);
        fseek(pFile, iEventIndex + 176 * i, SEEK_SET);

        for(new k = 0; k < iNumEvents; k++)
        {
            fseek(pFile, iEventIndex + 4 + 76 * k, SEEK_SET);
            fread(pFile, iEvent, BLOCK_INT);
            fseek(pFile, 4, SEEK_CUR);

            if(iEvent!=5004)
                continue;

            fread_blocks(pFile, szSoundPath, 64, BLOCK_CHAR);

            if(strlen(szSoundPath))
            {
                new szBuffer[MAX_RESOURCE_PATH_LENGTH];

                strtolower(szSoundPath);
                format(szBuffer, charsmax(szBuffer), "sound/%s", szSoundPath);
                engfunc(EngFunc_PrecacheGeneric, szBuffer);
            }
        }
    }

    fclose(pFile);
}

/* -> Entity Animation <- */
stock UTIL_SetEntityAnim(const pEntity, const iSequence = 0)
{
    set_entvar(pEntity, var_frame, 1.0);
    set_entvar(pEntity, var_framerate, 1.0);
    set_entvar(pEntity, var_animtime, get_gametime());
    set_entvar(pEntity, var_sequence, iSequence);
}

/* -> TE_EXPLOSION <- */
stock UTIL_TE_EXPLOSION(const iDest, const iszModelIndex, const Vector3(vecOrigin), const Float: flUp, const iScale, const iFramerate, const bitsFlags = TE_EXPLFLAG_NODLIGHTS|TE_EXPLFLAG_NOSOUND|TE_EXPLFLAG_NOPARTICLES)
{
    message_begin_f(iDest, SVC_TEMPENTITY, vecOrigin);
    write_byte(TE_EXPLOSION);
    write_coord_f(vecOrigin[0]);
    write_coord_f(vecOrigin[1]);
    write_coord_f(vecOrigin[2] - flUp);
    write_short(iszModelIndex);
    write_byte(iScale); // Scale
    write_byte(iFramerate); // Framerate
    write_byte(bitsFlags); // Flags
    message_end();
}

/* -> TE_BEAMFOLLOW <- */
stock UTIL_TE_BEAMFOLLOW(const iDest, const pEntity, const iszModelIndex, const iLife, const iWidth, const iColor[3], const iBrightness)
{
    message_begin_f(iDest, SVC_TEMPENTITY);
    write_byte(TE_BEAMFOLLOW);
    write_short(pEntity); // Entity: attachment to follow
    write_short(iszModelIndex); // Model Index
    write_byte(iLife); // Life in 0.1's
    write_byte(iWidth); // Line width in 0.1's
    write_byte(iColor[0]); // Red
    write_byte(iColor[1]); // Green
    write_byte(iColor[2]); // Blue
    write_byte(iBrightness); // Brightness
    message_end();
}

/* -> TE_BREAKMODEL <- */
stock UTIL_TE_BREAKMODEL(const iDest, const Vector3(vecOrigin), const Vector3(vecSize), const Vector3(vecVelocity), const iRandomVelocity, const iszModelIndex, const iCount, const iLife, const bitsFlags)
{
    message_begin_f(iDest, SVC_TEMPENTITY, vecOrigin);
    write_byte(TE_BREAKMODEL);
    write_coord_f(vecOrigin[0]); // Origin X
    write_coord_f(vecOrigin[1]); // Origin Y
    write_coord_f(vecOrigin[2]); // Origin Z
    write_coord_f(vecSize[0]); // Size X
    write_coord_f(vecSize[1]); // Size Y
    write_coord_f(vecSize[2]); // Size Z
    write_coord_f(vecVelocity[0]); // Velocity X
    write_coord_f(vecVelocity[1]); // Velocity Y
    write_coord_f(vecVelocity[2]); // Velocity Z
    write_byte(iRandomVelocity); // Random Velocity in 10's
    write_short(iszModelIndex); // Model Index
    write_byte(iCount); // Count
    write_byte(iLife); // Life in 0.1's
    write_byte(bitsFlags); // Flags
    message_end();
}

/* -> Set Entity Rendering <- */
stock UTIL_SetEntityRendering(const pEntity, const iRenderFx = kRenderFxNone, const Float:flRenderColor[3] = { 255.0, 255.0, 255.0 }, const iRenderMode = kRenderNormal, const Float: flRenderAmount = 16.0)
{
    set_entvar(pEntity, var_renderfx, iRenderFx);
    set_entvar(pEntity, var_rendercolor, flRenderColor);
    set_entvar(pEntity, var_rendermode, iRenderMode);
    set_entvar(pEntity, var_renderamt, flRenderAmount);
}
Но он тут под REhlds, а у меня обычный hlds, из-за этого ошибки в консоле и опять же неправильная работа плагина :( Подумал этот будет лучше, но судя по твоим словам - нет. Или можно как-то заставить reHlds версию работать на обычной? Если да, то готов опять поставить re-версию и с ошибками вернуться сюда =)
 
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
zmuser, почему не ставите rehlds, если не секрет?
 
Сообщения
61
Реакции
9
Помог
1 раз(а)
Nordic Warrior, да просто страшно что другие плагины полетят, заново настраивать. В принципе можно попробовать, но перед этим резервную копию создать)) может этим и займусь сейчас, посмотрю что и как
 
Сообщения
3,593
Реакции
1,576
Помог
141 раз(а)
zmuser, вероятность этого достаточно небольшая, не запуститься могут обычно плагины, использующие модуль orpheu, но они не часто встречаются. В крайнем случае, можно обратиться на этот же форум
 
Сообщения
61
Реакции
9
Помог
1 раз(а)
Nordic Warrior, у меня из орфея вроде ничего нет, буду надеяться что все будет ок))
Немного отошел от темы, но можешь подсказать какая сейчас актуальная версия reHlds'а? У меня предлагает установить ReHlds-3.13.0.788-dev_mpatch, все верно?
 
Статус
В этой теме нельзя размещать новые ответы.

Пользователи, просматривающие эту тему

Сейчас на форуме нет ни одного пользователя.
Сверху Снизу