падает сервер из плагина

Статус
В этой теме нельзя размещать новые ответы.
Сообщения
70
Реакции
-8
Ошибка
L 05/08/2021 - 15:32:34: Invalid multi-lingual line (file "cstrike/addons/amxmodx/data/lang/deagsmapmanager.txt" key "; This file must be saved with UTF-8 (without BOM) encoding." lang "")
L 05/08/2021 - 15:32:34: Invalid multi-lingual line (file "cstrike/addons/amxmodx/data/lang/deagsmapmanager.txt" key "; DV needs to be updated for each revision." lang "")
L 05/08/2021 - 15:32:34: Invalid multi-lingual line (file "cstrike/addons/amxmodx/data/lang/deagsmapmanager.txt" key "; If new revision is compatible with current source code, increment by one. (Ex: 480->481)" lang "")
L 05/08/2021 - 15:32:34: Invalid multi-lingual line (file "cstrike/addons/amxmodx/data/lang/deagsmapmanager.txt" key "; Up to 9 compatible revisions are allowed before source code modification is required." lang "")
L 05/08/2021 - 15:32:34: Invalid multi-lingual line (file "cstrike/addons/amxmodx/data/lang/deagsmapmanager.txt" key "; If not compatible, increment to the next multiple of 10. (Ex: 480->490, 485->490)" lang "")
L 05/08/2021 - 15:32:34: Invalid multi-lingual line (file "cstrike/addons/amxmodx/data/lang/deagsmapmanager.txt" key "; This also requires source code modification of DMAP_EXPECTED_DV." lang "")
ОС
Linux
Amx Mod X
AMX Mod X 1.9.0.5263 (http://www.amxmodx.org
Билд
Exe version 1.1.2.7/Stdio (cstrike)
ReHLDS version: 3.8.0.702-dev
Build date: 18:22:55 Nov 8 2020 (2402)
Build from: https://github.com/dreamstalker/rehlds/commit/543728d
ReGamedll
ReGameDLL version: 5.20.0.492-dev
Build date: 15:26:35 Jan 4 2021
Build from: https://github.com/s1lentq/ReGameDLL_CS/commit/aae507c
Версия Metamod
Metamod-r v1.3.0.128, API (5:13)
Metamod-r build: 17:47:54 Aug 24 2018
Metamod-r from: https://github.com/theAsmodai/metamod-r/commit/0cf2f70
Список метамодулей
[ 1] AMX Mod X        RUN   -    amxmodx_mm_i386.so          v1.9.0.5263      ini  Start ANY  
[ 2] Reunion RUN - reunion_mm_i386.so v0.1.92d ini Start Never
[ 3] Rechecker RUN - rechecker_mm_i386.so v2.5 ini Chlvl ANY
[ 4] ReSemiclip RUN - resemiclip_mm_i386.so v2.3.9 ini Chlvl ANY
[ 5] POD-Bot mm RUN - podbot_mm_i386.so vV3B22b ini Chlvl ANY
[ 6] VoiceTranscoder RUN - VoiceTranscoder.so v2017RC5 ini ANY ANY
[ 7] WHBlocker RUN - whblocker_mm_i386.so v1.5.697 ini Chlvl ANY
[ 8] Fun RUN - fun_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[ 9] Engine RUN - engine_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[10] FakeMeta RUN - fakemeta_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[11] GeoIP RUN - geoip_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[12] CStrike RUN - cstrike_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[13] CSX RUN - csx_amxx_i386.so v1.9.0.5271 pl1 ANY ANY

[14] Ham Sandwich RUN - hamsandwich_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[15] MySQL RUN - mysql_amxx_i386.so v1.9.0.5271 pl1 ANY ANY
[16] ReAPI RUN - reapi_amxx_i386.so v5.18.0.203-dev pl1 ANY Never
[17] ReAimDetector RUN - reaimdetector_amxx_i386.so v0.2.2 pl1 ANY Never
[18] CSDM2 RUN - csdm_amxx_i386.so v2.1.3c-KWo pl1 ANY ANY
[19] AuthEmu RUN - authemu_amxx_i386.so v5.2.12.425-dev pl1 ANY Never
Список плагинов
[  1] Vip Test                1.0         daywer            vip_test.amxx    running  
[ 2] Advanced Roll The Dice v2.5 RC 4 Striker roll_the_dice.a running
[ 3] Money Rewards 1.0.1 the_hunter money_rewards.a running
[ 4] Anti-Ad 0.1 Mati antiad.amxx running
[ 5] MapConfigX 1.1 AdaskoMX mapconfigx.amxx running
[ 6] AMXBans: Screens Gm 1.6 Larte Team amxbans_ssban.a running
[ 7] AMXBans: Main Gm 1.6 Larte Team amxbans_main.am debug
[ 8] AMXBans: Freeze Gm 1.6 Larte Team amxbans_freeze. running
[ 9] Lite VoteBan 1.4 neygomon lite_voteban.am running
[ 10] AMXBans: Core Gm 1.6 Larte Team amxbans_core.am running
[ 11] AMXBans: Flagged Gm 1.6 Larte Team amxbans_flagged running
[ 12] AES: Informer 0.5 Vega serfreeman1337 aes_informer.am running
[ 13] Stats Configuration 1.9.0.5263 AMXX Dev Team statscfg.amxx running
[ 14] AES: CStrike Addon 0.5 Vega serfreeman1337 aes_exp_cstrike running

[ 15] Advanced Experience Sy 0.5 Vega serfreeman1337 aes_main.amxx running
[ 16] AES: StatsX 0.5 Vega serfreeman1337 aes_statsx_cstr running
[ 17] Prefix Manager 0.1 serfreeman1337 prefixManager.a running
[ 18] Hide Slash Commands 1.0.0 Kreation +mod.le SymbolChat.amxx running
[ 19] Steam Models 0.1b+mod.l Freedo.m steam_models.am running
[ 20] Afk Control 0.4 Stable Freedo.m | neygo afk_control.amx running
[ 21] Admin Spectator ESP 1.3 KoST admin_spec_esp. running
[ 22] ReAimDetector API 0.2.2 ReHLDS Team reaimdetector.a running
[ 23] Admin Commands 1.9.0.5263 AMXX Dev Team admincmd.amxx running
[ 24] Admin Help 1.9.0.5263 AMXX Dev Team adminhelp.amxx running
[ 25] Slots Reservation 1.9.0.5263 AMXX Dev Team adminslots.amxx running
[ 26] Multi-Lingual System 1.9.0.5263 AMXX Dev Team multilingual.am running
[ 27] Menus Front-End 1.9.0.5263 AMXX Dev Team menufront.amxx running
[ 28] Commands Menu 1.9.0.5263 AMXX Dev Team cmdmenu.amxx running
[ 29] Players Menu 1.9.0.5271 AMXX Dev Team plmenu.amxx running

[ 30] Teleport Menu 1.9.0.5263 AMXX Dev Team telemenu.amxx running
[ 31] Plugin Menu 1.9.0.5263 AMXX Dev Team pluginmenu.amxx running
[ 32] Admin Chat 1.9.0.5263 AMXX Dev Team adminchat.amxx running
[ 33] Anti Flood 1.9.0.5263 AMXX Dev Team antiflood.amxx running
[ 34] Scrolling Message 1.9.0.5263 AMXX Dev Team scrollmsg.amxx running
[ 35] Info. Messages 1.9.0.5263 AMXX Dev Team imessage.amxx running
[ 36] Admin Votes 1.9.0.5263 AMXX Dev Team adminvote.amxx running
[ 37] TimeLeft 1.9.0.5263 AMXX Dev Team timeleft.amxx running
[ 38] CS Shop 5.0 iNeedHelp CS_Shop_n.amxx running
[ 39] MoneyTransfer 0.3 ZETA [M|E|N] money_transfer_ running
[ 40] Admin Rich 1.0 Emilioneri admin_rich_with debug
[ 41] Autoresponder/Advertis 0.5 MaximusBrood ad_manager.amxx running
[ 42] Reset Score 1.0 Silenttt resetscore.amxx running
[ 43] CSDM Auto Balance 1.0 xPaw csdm_auto_balan running
[ 44] Weapon Menu 1.0 Mattcook & xerob weaponmenu_rus. running

[ 45] GunGame AMMO 2.2 Prayer gg_ammo.amxx running
[ 46] Ultimate Gore 1.6 JTP10181 amx_gore_ultima running
[ 47] Super Bunny Hopper 1.2 Cheesy Peteza bhop.amxx running
[ 48] Bullet Damage 0.0.1 ConnorMcLeod bullet_damage.a running
[ 49] MultiJump 1.1 Solo[59rus] multijump_with_ running
[ 50] Vampire 1.0c Shalfey vampire3+vip.am running
[ 51] Grenade Trail 1.0 Jim grenade_trail.a running
[ 52] Sentry CSDM Menu 1.0 sap273 amx_sentry_menu running
[ 53] Sentry CSDM Menu 1.0 sap273 amx_sentry_menu running
[ 54] AMX Admin Model 1.1.1 whitemike amx_adminmodel. running
[ 55] Blue Fade 0.1 Stimul Blue_Fade.amxx running
[ 56] Golden Ak 47 1.0 AlejandroSk GoldenAk_ul.amx running
[ 57] Automatic Unstuck 1.5 NL)Ramon(NL stuck.amxx running
[ 58] Spec Switch 0.2.2 many dm_spec.amxx running
[ 59] SF TripMine 0.3.4 serfreeman1337 sfTripMine_FIX_ running

[ 60] DeagsMapManager 3.25Beta Deags/AMXX Commu deagsmapmanager running
[ 61] Maps Menu 1.9.0.5263 AMXX Dev Team mapsmenu.amxx running
[ 62] Golden M4A1 1.0 Alicx DarK GoldenM4a1_ul.a running
[ 63] VIP CSDM 1.0 Godzilla csdm_vipmenu_27 running
[ 64] Unlimited Clip v 1.0 Sap unlimited_clip_ running
[ 65] Kill Rewards 1.4 HoLLyWooD kill_rewards.am running
[ 66] WalkGuard 1.3.2 mogel walkguard.amxx running
[ 67] Knife Scratch 1.0 PahanCS KnifeScratch.am running
[ 68] All Chat 1.1 Ian Cammarata allchat.amxx running
[ 69] No Radio Flood 1.1 Starsailor no_radio_flood. running
[ 70] Unlimited Team Changes 1.3 HamletEagle unlimited_teamc running
[ 71] silentnades 1.0 regalis silent_nades.am running
[ 72] Test dhud_message_te running
[ 73] effect day/night 1.3 Destro day_night.amxx running
[ 74] Block name change 1.0 grankee changename.amxx running

[ 75] Unlimited Money 2.0 NL)Ramon(NL unlimited_money running
[ 76] Sentry guns 1.1 JGHG & miRror sentryguns_ul_2 running
[ 77] Connect Exec 1.0 AleX connect_exec.am running
[ 78] Knife Double Frags 0.3 Rul4 kdf_ul.amxx running
[ 79] Golden AWP 1.1 Anonymousstar goldenawp_ul.am running
[ 80] Auto recording demo 2.0 IzI | Bonaqua (R amx_autodemorec running
[ 81] plugin_trail 1.3.1 Bahrmanou plugin_trail.am running
[ 82] Change Team 1.1 neygomon & Alien changeteam.amxx running
[ 83] x x x map.amxx running
[ 84] say /motd 1.1 Pa1n say_motd.amxx running
[ 85] AntiFlash FINAL 5.0 Leo_[BH] antiflash5.amxx running
[ 86] ReChecker Logging 1.0 custom rc_logging.amxx running
[ 87] Golden Deagle 1.6 AlejandroSk deaglegold_ul.a running
[ 88] Game Namer 1.1 NeuroToxin gamenamechanger running
[ 89] Ultimate Chats Control 5.2(c) neygomon ucc.amxx running

[ 90] unknown unknown unknown ucc_api_example running
[ 91] UCC Addon: VoteGAG 1.2 neygomon ucc_votegag.amx running
[ 92] Steam_GSClient_Bonus 1.0.5 ApXuTekToR Steam_GSClient_ running
[ 93] AuthEmu API 1.0 Dev-MS Team authemu.amxx running
[ 94] GFonTime 1.3 ApXuTekToR Give_Flags_on_T running
[ 95] Build Dispenser #1.0.6.0 tuty BuildDispenser_ running
[ 96] MG Grab 1.0 Nickron mg_grab.amxx running
[ 97] Black Smoke 1.0 xPaw, Justick colored_smoke.a running
[ 98] CSDM Main 3.6 CSDM Team csdm_main.amxx running
[ 99] ReCSDM Equip 3.6 ReCSDM Team csdm_equip.amxx debug
[100] CSDM Spawns 3.6 CSDM Team csdm_spawn_pres running
[101] CSDM Misc 3.6 CSDM Team csdm_misc.amxx running
[102] CSDM Protection 3.6 BAILOPAN csdm_protection running
Автор плагина
PLUGIN_VERSION, "NOVA & SHIELD"
Версия плагина
PLUGIN_VERSION, "NOVA & SHIELD"
Исходный код
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <engine>
#include <fun>
#include <xs>
#include <money_ul>
#if AMXX_VERSION_NUM < 183
#include <colorchat>

#define print_team_default DontChange
#define print_team_grey Grey
#define print_team_red Red
#define print_team_blue Blue

#include <dhudmessage>
#endif

new g_iCvar[30]
new Float:g_fTime[33]

#define PLUGIN_NUM 343



#define PLUGIN_VERSION "#1.0.5"
#define PLUGIN_PREFIX "[Раздатчик]"
#define BREAK_COMPUTER 6
#define HUD_DELAYTIME 0.2
#define MAX_PLAYERS 32
#define TASK_PLANT 15100

native get_sentry_team(sentry)
native get_sentry_lvl(sentry)

#define is_valid_player(%1) ( 1 <= %1 <= gMaxPlayers )

enum
{
STATUS_BUILDING,
STATUS_ACTIVE
}

new const gDamageSounds[ ][ ] = {
"debris/metal1.wav",
"debris/metal2.wav",
"debris/metal3.wav"
}

#define Sound_ignor "nova/sentry/ignor.wav"
#define Sprite_Chastic "sprites/nova/spr_2.spr"

new g_Chastic
new const gDispenserClassnameHpArm[ ] = "NiceDispenser";
new const gDispenserActive[ ] = "buttons/button9.wav";
new const gDispenserDestroy[ ] = "grab_bury.wav";
new const gHealingSprite[ ] = "sprites/dispensers.spr";

new gBeamcolor[ MAX_PLAYERS ][ 3 ];
new bool:bDispenserHpArm[ MAX_PLAYERS ];
new bool:bFullHealth[ MAX_PLAYERS ];
new bool:bFullArmor[ MAX_PLAYERS ];
new bool:bFullAmoo[ MAX_PLAYERS ];
new Float:gDispenserOrigin[ MAX_PLAYERS ][ 3 ];

new gHealingBeam, gMaxPlayers ;
new iEntity;

new const SPRITELIST[][] = {
"sprites/kf/b.spr",
"sprites/kf/g.spr",
"sprites/kf/r.spr",
"sprites/kf/y.spr"
};

new g_pSprites[sizeof SPRITELIST];


new g_model_1_ct, g_model_2_ct, g_model_3_ct, g_model_1_t, g_model_2_t, g_model_3_t
new Model_disp_1_ct[90], Model_disp_2_ct[90], Model_disp_3_ct[90]
new Model_disp_1_t[90], Model_disp_2_t[90], Model_disp_3_t[90]

new g_vampir[3], g_vampir_max[3]

new Float:g_HEALTHS[4]
new g_bar_time

public plugin_init( )
{
register_plugin( "Build Dispenser", PLUGIN_VERSION, "NOVA & SHIELD" );
register_dictionary( "nv_dispenser.txt" );

register_event( "TextMsg", "EVENT_TextMsg", "a", "2&#Game_C", "2&#Game_w", "2&#Game_will_restart_in" );
register_logevent( "LOG_RoundEnd", 2, "1=Round_End" );

register_forward ( FM_TraceLine, "fw_TraceLine_Post", 1 );
register_forward(FM_CmdStart,"fm_cmdstart")

register_touch ( gDispenserClassnameHpArm, "player", "fw_DispenserTouch" )

RegisterHam( Ham_TakeDamage, "info_target", "bacon_TakeDamage", 1 );
RegisterHam( Ham_TakeDamage, "info_target", "bacon_TakeDamagePre", 0 );
RegisterHam( Ham_TraceAttack, "info_target", "bacon_TraceAttack" );

register_think( gDispenserClassnameHpArm, "DispenserHpArmThink" );

register_clcmd( "build_dispenser", "HpArmDispenserBuild" )
g_bar_time = get_user_msgid("BarTime2")
gMaxPlayers = get_maxplayers( );

g_iCvar[0]=register_cvar("disp_reward", "3000") //Награда за разрушение
g_iCvar[1]=register_cvar("disp_cost", "3000") //Цена раздатчика
g_iCvar[2]=register_cvar("disp_cost_up", "4000") //Цена Улудшения
g_iCvar[24]=register_cvar("disp_cost_up2", "4000")
g_iCvar[3]=register_cvar("disp_radius", "400") //Радиус лечения
g_iCvar[4]=register_cvar("disp_hp_1", "900.0") //Здоровие раздатчика 1 уровень
g_iCvar[5]=register_cvar("disp_hp_2", "1500.0") //Здоровие раздатчика 2 уровень
g_iCvar[6]=register_cvar("disp_hp_3", "2000.0") //Здоровие раздатчика 3 уровень
g_iCvar[7]=register_cvar("disp_hp_p_max_1", "200") //Здоровие на которое лечит раздатчик 1 уровня
g_iCvar[8]=register_cvar("disp_hp_p_max_2", "400") //Здоровие на которое лечит раздатчик 2 уровня
g_iCvar[9]=register_cvar("disp_hp_p_max_3", "600") //Здоровие на которое лечит раздатчик 3 уровня
g_iCvar[10]=register_cvar("disp_ap_p_max_1", "200") //Браня на которую лечит раздатчик 1 уровня
g_iCvar[11]=register_cvar("disp_ap_p_max_2", "400") //Браня на которую лечит раздатчик 2 уровня
g_iCvar[12]=register_cvar("disp_ap_p_max_3", "600") //Браня на которую лечит раздатчик 3 уровня
g_iCvar[13]=register_cvar("disp_ap_p_speed_1", "1")
g_iCvar[14]=register_cvar("disp_ap_p_speed_2", "1")
g_iCvar[15]=register_cvar("disp_ap_p_speed_3", "1")
g_iCvar[16]=register_cvar("disp_hp_p_speed_1", "1")
g_iCvar[17]=register_cvar("disp_hp_p_speed_2", "1")
g_iCvar[18]=register_cvar("disp_hp_p_speed_3", "1")
g_iCvar[19]=register_cvar("disp_hp_e_speed_1", "1")
g_iCvar[20]=register_cvar("disp_hp_e_speed_2", "1")
g_iCvar[21]=register_cvar("disp_hp_e_speed_3", "1")
g_iCvar[22]=register_cvar("disp_rem_cost", "1")
g_iCvar[23]=register_cvar("disp_rem_speed", "1")
g_iCvar[25]=register_cvar("disp_ugol_float", "50.0")
g_iCvar[26]=register_cvar("disp_up_time", "2.5")


g_vampir[0]=register_cvar("disp_vampir_1", "1")
g_vampir[1]=register_cvar("disp_vampir_2", "1")
g_vampir[2]=register_cvar("disp_vampir_3", "1")
g_vampir_max[0]=register_cvar("disp_vampir_max_1", "50")
g_vampir_max[1]=register_cvar("disp_vampir_max_2", "30")
g_vampir_max[2]=register_cvar("disp_vampir_max_3", "20")

g_HEALTHS[0] = get_pcvar_float(register_cvar("nv_sg_hp_1","3000.0"))
g_HEALTHS[1] = get_pcvar_float(register_cvar("nv_sg_hp_2","4000.0"))
g_HEALTHS[2] = get_pcvar_float(register_cvar("nv_sg_hp_3","6000.0"))
g_HEALTHS[3] = get_pcvar_float(register_cvar("nv_sg_hp_4","8000.0"))


}


public plugin_cfg(){
new configsdir[128]
get_localinfo("amxx_configsdir", configsdir, 127)
server_cmd("exec %s/nova/dispenser.cfg", configsdir)
server_exec()
}


public plugin_natives( ){
set_native_filter( "native_filter" );
}

public native_filter( const name[], index, trap ) {
if ( !trap )
{
return PLUGIN_HANDLED;
}
return PLUGIN_CONTINUE;
}



new remont_is[33]
public fm_cmdstart(id, uc_handle, seed) {
if(!is_user_alive(id)) return
if(g_fTime[id]>get_gametime()) return

new buttons = get_uc(uc_handle,UC_Buttons)

if(buttons & IN_USE)
{
new target, body
get_user_aiming(id, target, body, 128)

static ClassName[32]
pev(target, pev_classname, ClassName, charsmax(ClassName))
if (equal(ClassName, gDispenserClassnameHpArm))
{
g_fTime[id]=get_gametime()+0.1
new iTeam = pev ( target, pev_iuser4 )

if ( _:cs_get_user_team ( id ) != iTeam )
return

new Float:Health
pev(target, pev_health, Health)

remont_is[id] = 1
if(cs_get_user_money_ul(id) < get_pcvar_num(g_iCvar[22])){
client_print_color(id, print_team_blue,"%L",id, "DISP_REM_TXT_1", get_pcvar_num(g_iCvar[22]))
return
}

new Float:Max=get_pcvar_float(g_iCvar[pev(target, pev_euser4)+3])

if(Health>=Max)return

if(Health>=Max - get_pcvar_num(g_iCvar[23])){
client_print_color(id, print_team_blue,"%L",id, "DISP_REM_TXT_2" )
Health = Max
message_begin(MSG_ONE, g_bar_time, _, id)
write_short(10000)
write_short(100)
message_end()
}else{
new Float:max_pro = Max/100
new Float:progres_bar = Health / max_pro
message_begin(MSG_ONE, g_bar_time, _, id)
write_short(10000)
write_short(floatround(progres_bar))
message_end()
Health+=get_pcvar_num(g_iCvar[23])
}
g_fTime[id]=get_gametime()+0.1
cs_set_user_money_ul( id, cs_get_user_money_ul( id ) - get_pcvar_num(g_iCvar[22]))
set_pev(target, pev_health, Health)
}
}else{
if(remont_is[id] == 1){
remont_is[id] = 0
message_begin(MSG_ONE, 108, _, id)
write_byte(0)
write_byte(0)
message_end()
}
}
}

public client_connect( id ){
bFullHealth[ id ] = false;
bFullArmor[ id ] = false;
bDispenserHpArm[ id ] = false;
bFullAmoo[ id ] = false
}

public client_disconnected( id ){
new iEnt
while( ( iEnt = find_ent_by_class( iEnt, gDispenserClassnameHpArm ) ) )
{
new iOwner = pev( iEnt, pev_iuser2 );
if(id == iOwner)
{
bDispenserHpArm[ id ] = false;
set_pev( iEnt, pev_flags, pev( iEnt, pev_flags ) | FL_KILLME );
}
}

}

public plugin_precache( )
{
g_model_1_ct = 0
g_model_2_ct = 0
g_model_3_ct = 0
g_model_1_t = 0
g_model_2_t = 0
g_model_3_t = 0

new iFile = fopen("addons/amxmodx/configs/nova/dispenser.cfg", "rt");
if(iFile){
new szLineBuffer[600]
while(!(feof(iFile))){
fgets(iFile, szLineBuffer, charsmax(szLineBuffer));

if(!(szLineBuffer[0]) || szLineBuffer[0] == ';' || szLineBuffer[0] == '#')
{
continue;
}
new Imeil[600]
new Model[600]

parse(szLineBuffer, Imeil, charsmax(Imeil),Model, charsmax(Model));

if(equal(Imeil, "mdl_disp_1_t")){
g_model_1_t = 1
formatex(Model_disp_1_t, charsmax(Model_disp_1_t), "%s", Model);
} if(equal(Imeil, "mdl_disp_2_t")){
g_model_2_t = 1
formatex(Model_disp_2_t, charsmax(Model_disp_2_t), "%s", Model);
} if(equal(Imeil, "mdl_disp_3_t")){
g_model_3_t = 1
formatex(Model_disp_3_t, charsmax(Model_disp_3_t), "%s", Model);
} if(equal(Imeil, "mdl_disp_1_ct")){
g_model_1_ct = 1
formatex(Model_disp_1_ct, charsmax(Model_disp_1_ct), "%s", Model);
} if(equal(Imeil, "mdl_disp_2_ct")){
g_model_2_ct = 2
formatex(Model_disp_2_ct, charsmax(Model_disp_2_ct), "%s", Model);
} if(equal(Imeil, "mdl_disp_3_ct")){
g_model_3_ct = 3
formatex(Model_disp_3_ct, charsmax(Model_disp_3_ct), "%s", Model);
}
}
}

if(g_model_1_t == 0){
formatex(Model_disp_1_t, charsmax(Model_disp_1_t), "models/nova/dispenser/dispenser_1_lvl_te.mdl");
} if(g_model_2_t == 0){
formatex(Model_disp_2_t, charsmax(Model_disp_2_t), "models/nova/dispenser/dispenser_2_lvl_te.mdl");
} if(g_model_3_t == 0){
formatex(Model_disp_3_t, charsmax(Model_disp_3_t), "models/nova/dispenser/dispenser_3_lvl_te.mdl");
} if(g_model_1_ct == 0){
formatex(Model_disp_1_ct, charsmax(Model_disp_1_ct), "models/nova/dispenser/dispenser_1_lvl_ct.mdl");
} if(g_model_2_ct == 0){
formatex(Model_disp_2_ct, charsmax(Model_disp_2_ct), "models/nova/dispenser/dispenser_2_lvl_ct.mdl");
} if(g_model_3_ct == 0){
formatex(Model_disp_3_ct, charsmax(Model_disp_3_ct), "models/nova/dispenser/dispenser_3_lvl_ct.mdl");
}

precache_model(Model_disp_1_ct)
precache_model(Model_disp_2_ct)
precache_model(Model_disp_3_ct)
precache_model(Model_disp_1_t)
precache_model(Model_disp_2_t)
precache_model(Model_disp_3_t)
precache_sound( Sound_ignor )
precache_sound( gDispenserActive )
precache_sound( gDispenserDestroy )
g_Chastic = precache_model(Sprite_Chastic)
new i
for( i = 0; i < sizeof gDamageSounds; i++ )
{
precache_sound( gDamageSounds[ i ] )
}
for(new i; i < sizeof SPRITELIST; i++) {
g_pSprites[i] = precache_model(SPRITELIST[i]);
}
gHealingBeam = precache_model( gHealingSprite )
}

new Float: Trace_lini[999]
public fw_TraceLine_Post ( Float:v1[3], Float:v2[3], noMonsters, id )
{
if( !is_valid_player(id) || is_user_bot(id) || !is_user_alive(id)) return FMRES_IGNORED
if(Trace_lini[id] > get_gametime()) return FMRES_IGNORED

Trace_lini[id] = get_gametime() + 0.5
new iHitEnt = get_tr(TR_pHit)

if( iHitEnt <= gMaxPlayers || !pev_valid(iHitEnt)) return FMRES_IGNORED
new sClassname[32]
pev(iHitEnt, pev_classname, sClassname, charsmax(sClassname))

if(!equal(sClassname, gDispenserClassnameHpArm)) return FMRES_IGNORED

new iTeam = pev ( iHitEnt, pev_iuser4 )

if ( _:cs_get_user_team ( id ) != iTeam ) return FMRES_IGNORED
new iHealth = pev ( iHitEnt, pev_health )

if (iHealth <= 0) return FMRES_IGNORED

new iOwner = pev ( iHitEnt, pev_iuser2 )
if ( !is_user_connected(iOwner)) return FMRES_IGNORED

new sName[33]
get_user_name ( iOwner, sName, charsmax ( sName ) )
new iLevel = pev ( iHitEnt, pev_euser4 )
set_dhudmessage ( iTeam == 1 ? 150 : 0, 50, iTeam == 2 ? 200 : 0, -1.0, 0.35, 0, 0.0, 0.55, 0.0, 0.0 )
show_dhudmessage ( id, "%L", id, "DISP_INFO", sName, iHealth, iLevel )
return FMRES_IGNORED
}

new Float: Disp_toush_up[33]

public fw_DispenserTouch ( ent, id )
{
if( !is_valid_player(id) || is_user_bot(id) || !is_user_alive(id)) return

if(Disp_toush_up[id] > get_gametime()) return

Disp_toush_up[id] = get_gametime() + get_pcvar_float(g_iCvar[26])

if ( pev ( ent, pev_iuser4 ) != _:cs_get_user_team ( id ) )
return

new iOwner = pev ( ent, pev_iuser2 )
if(get_user_flags(id) & ADMIN_LEVEL_D)
{
}
else
{
if ( iOwner == id ){
emit_sound(id,0,Sound_ignor,1.0, ATTN_NORM, 0, PITCH_NORM )
client_print_color(id, print_team_blue,"%L", id, "DISP_INFORM_1" )
return
}
}

if ( pev ( ent, pev_euser4 ) >= 3) return

new money = cs_get_user_money_ul ( id )

if (pev (ent, pev_euser4 ) == 1){
if ( money < get_pcvar_num(g_iCvar[2])){
emit_sound(id,0,Sound_ignor,1.0, ATTN_NORM, 0, PITCH_NORM )
client_print_color(id, print_team_blue,"%L", id, "DISP_ZAPRET_2" )
return
}

set_pev ( ent, pev_euser4, 2 )
set_pev ( ent, pev_health, get_pcvar_float(g_iCvar[5]))
switch ( _:cs_get_user_team ( id ) ){
case 1:entity_set_model ( ent, Model_disp_2_t )
case 2:entity_set_model ( ent, Model_disp_2_ct )
}
engfunc( EngFunc_SetSize, ent, Float:{ -12.0, -10.0, -1.0 }, Float:{ 5.0, 5.0, 50.0 } )
emit_sound( ent, CHAN_STATIC, gDispenserActive, VOL_NORM, ATTN_NORM, 0, PITCH_NORM )


new Float:flAngles[ 3 ];
pev( ent, pev_angles, flAngles );
flAngles[ 1 ] += get_pcvar_float(g_iCvar[25])
set_pev( ent, pev_angles, flAngles );

if ( !is_user_connected(iOwner)) return
cs_set_user_money_ul(id, money - get_pcvar_num(g_iCvar[2]))

set_pev( ent, pev_iuser1, id );
Disp_toush_up[id] = get_gametime() + get_pcvar_float(g_iCvar[26])
new sUpgraderName[32]
get_user_name ( id, sUpgraderName, charsmax ( sUpgraderName ) )
UTIL_ChatColor ( iOwner, "%L",iOwner , "DISP_OBNOWA_1", sUpgraderName )
return
}

if ( pev ( ent, pev_euser4 ) == 2){
set_pev( ent, pev_iuser1, id );

if(id == pev( ent, pev_iuser1)){
if(get_user_flags(id) & ADMIN_LEVEL_D)
{
}
else
{
emit_sound(id,0,Sound_ignor,1.0, ATTN_NORM, 0, PITCH_NORM )
client_print_color(id, print_team_blue,"%L", id, "DISP_INFORM_3" )
}
}

if ( money < get_pcvar_num(g_iCvar[24])){
emit_sound(id,0,Sound_ignor,1.0, ATTN_NORM, 0, PITCH_NORM )
client_print_color(id, print_team_blue,"%L", id, "DISP_ZAPRET_2")
return
}

set_pev ( ent, pev_euser4, 3 )
set_pev ( ent, pev_health, get_pcvar_float(g_iCvar[6]) )
switch ( _:cs_get_user_team ( id ) ){
case 1:entity_set_model ( ent, Model_disp_3_t )
case 2:entity_set_model ( ent, Model_disp_3_ct )
}
engfunc( EngFunc_SetSize, ent, Float:{ -12.0, -10.0, -1.0 }, Float:{ 5.0, 5.0, 50.0 } )
emit_sound( ent, CHAN_STATIC, gDispenserActive, VOL_NORM, ATTN_NORM, 0, PITCH_NORM )

new Float:flAngles[ 3 ];
pev( ent, pev_angles, flAngles );
flAngles[ 1 ] += get_pcvar_float(g_iCvar[25])
set_pev( ent, pev_angles, flAngles );

if ( !is_user_connected(iOwner)) return

cs_set_user_money_ul(id, money - get_pcvar_num(g_iCvar[2]))

new sUpgraderName[32]
get_user_name ( id, sUpgraderName, charsmax ( sUpgraderName ) )
UTIL_ChatColor ( iOwner, "%L",iOwner , "DISP_OBNOWA_2", sUpgraderName )
}

}

public HpArmDispenserBuild( id )
{

if( !is_user_alive( id )){
client_print_color(id, print_team_blue,"%L",id, "DISP_ZAPRET_1")
return PLUGIN_CONTINUE
}

if(!(pev(id, pev_flags) & FL_ONGROUND)) return PLUGIN_HANDLED

if(pev(id, pev_flags ) & FL_DUCKING || pev(id, pev_oldbuttons) & IN_DUCK) return PLUGIN_HANDLED;


if( bDispenserHpArm[ id ] == true){
client_print_color(id, print_team_blue,"%L",id, "DISP_ZAPRET_3")
return PLUGIN_HANDLED;
}

new iMoney = cs_get_user_money_ul( id )
new iCost = get_pcvar_num(g_iCvar[1])

if(iMoney < iCost){
client_print_color(id, print_team_blue,"%L",id, "DISP_ZAPRET_2", iCost)
return PLUGIN_HANDLED
}

new Float:flPlayerOrigin[ 3 ]
pev( id, pev_origin, flPlayerOrigin )

new Float:flHealth = get_pcvar_float(g_iCvar[4])
iEntity = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) )

if( !pev_valid( iEntity ) )
return PLUGIN_HANDLED

gDispenserOrigin[ id ][ 0 ] = flPlayerOrigin[ 0 ]
gDispenserOrigin[ id ][ 1 ] = flPlayerOrigin[ 1 ]
gDispenserOrigin[ id ][ 2 ] = flPlayerOrigin[ 2 ] - 35.0

switch ( _:cs_get_user_team ( id ) ){
case 1:entity_set_model ( iEntity, Model_disp_1_t )
case 2:entity_set_model ( iEntity, Model_disp_1_ct )
}

new szName[ 32 ]
set_pev( iEntity, pev_classname, gDispenserClassnameHpArm )
engfunc( EngFunc_SetSize, iEntity, Float:{ -12.0, -10.0, -1.0 }, Float:{ 5.0, 5.0, 50.0 } )
set_pev( iEntity, pev_origin, flPlayerOrigin )
set_pev( iEntity, pev_solid, SOLID_NOT )
set_pev( iEntity, pev_movetype, MOVETYPE_TOSS )
set_pev( iEntity, pev_health, flHealth )
set_pev( iEntity, pev_takedamage, DAMAGE_YES )
set_pev( iEntity, pev_iuser2, id )
set_pev( iEntity, pev_iuser4, _:cs_get_user_team ( id ) )
set_pev( iEntity, pev_euser4, 1 ); // уровень
set_pev( iEntity, pev_nextthink, get_gametime( ) + 0.1 )

bDispenserHpArm[ id ] = true

set_task(2.0, "BuildDispenserSolid", iEntity )
cs_set_user_money_ul( id, iMoney - iCost, 1 )
get_user_name( id, szName, charsmax( szName ) )
return PLUGIN_HANDLED
}

public bacon_TakeDamagePre( ent, idinflictor, idattacker, Float:damage, damagebits )
{
new szClassname[ 32 ];
pev( ent, pev_classname, szClassname, charsmax( szClassname ) );

if( equal( szClassname, gDispenserClassnameHpArm ) ){
new iOwner = pev( ent, pev_iuser2 );

if(!is_user_connected(iOwner) || 1 > iOwner > 32 || !is_user_connected(idattacker) || 1 > idattacker > 32) return HAM_SUPERCEDE

if(cs_get_user_team(iOwner)==cs_get_user_team(idattacker) && idattacker != iOwner) return HAM_SUPERCEDE
}
return HAM_IGNORED
}

public bacon_TakeDamage( ent, idinflictor, idattacker, Float:damage, damagebits )
{
if( !pev_valid( ent ) )
return HAM_IGNORED

new szClassname[ 32 ];
pev( ent, pev_classname, szClassname, charsmax( szClassname ) );

if( equal( szClassname, gDispenserClassnameHpArm ) )
{
new iOwner = pev( ent, pev_iuser2 );

if( !is_user_connected( iOwner ) || 1 > iOwner > 32 || !is_user_connected( idattacker ) || 1 > idattacker > 32 ) return HAM_SUPERCEDE

if( cs_get_user_team( iOwner ) == cs_get_user_team( idattacker ) && idattacker != iOwner ) return HAM_SUPERCEDE

new Float:entorigin[3]
pev( ent, pev_origin, entorigin )

message_begin(MSG_ALL, SVC_TEMPENTITY);
write_byte(TE_SPRITETRAIL);
engfunc(EngFunc_WriteCoord, entorigin[0] + random_num(- 10, 10));
engfunc(EngFunc_WriteCoord, entorigin[1] + random_num(- 10, 10));
engfunc(EngFunc_WriteCoord, entorigin[2] + random_num(10, 30));
engfunc(EngFunc_WriteCoord, entorigin[0] - random_num(- 100, 100));
engfunc(EngFunc_WriteCoord, entorigin[1] - random_num(- 100, 100));
engfunc(EngFunc_WriteCoord, entorigin[2] + random_num(- 100, 100));
write_short(g_Chastic); // Индекс спрайта из прекеша (index of precached sprite)
write_byte(3); //колличество спрайтов
write_byte(1); //вроде время сущиствования
write_byte(1); //размер
write_byte(1); // 10's
write_byte(5); // 10's
message_end();

if( pev( ent, pev_health ) <= 0.0 ){
new szName[ 32 ];
get_user_name( idattacker, szName, charsmax( szName ) );
new Float:flOrigin[ 3 ];
pev( ent, pev_origin, flOrigin );
set_pev( ent, pev_flags, pev( ent, pev_flags ) | FL_KILLME );

if( idattacker == iOwner ){
UTIL_ChatColor( iOwner,"%L", iOwner, "DISP_DESTONE" );
}else{
UTIL_ChatColor( iOwner,"%L", iOwner, "DISP_DESTONE2", szName);
}
UTIL_ChatColor( idattacker, "%L", idattacker, "DISP_DESTONE3" )
cs_set_user_money_ul( idattacker, min ( cs_get_user_money_ul ( idattacker ) + get_pcvar_num(g_iCvar[0]), 999999 ) )
for(new i; i < sizeof g_pSprites; i++) {
CREATE_SPRITETRAIL(flOrigin, g_pSprites[i]);
}
emit_sound( ent, CHAN_STATIC, gDispenserDestroy, VOL_NORM, ATTN_NORM, 0, PITCH_NORM )
bDispenserHpArm[ iOwner ] = false
}
emit_sound( ent, CHAN_STATIC, gDamageSounds[ random_num( 0, charsmax( gDamageSounds ) ) ], VOL_NORM, ATTN_NORM, 0, PITCH_NORM ) ;
}
return HAM_IGNORED
}

stock CREATE_SPRITETRAIL(Float:fOrigin[3], pSprite, iReliable = 0){
message_begin(iReliable ? MSG_ALL : MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(TE_SPRITETRAIL);
engfunc(EngFunc_WriteCoord, fOrigin[0]);
engfunc(EngFunc_WriteCoord, fOrigin[1]);
engfunc(EngFunc_WriteCoord, fOrigin[2]);
engfunc(EngFunc_WriteCoord, fOrigin[0]);
engfunc(EngFunc_WriteCoord, fOrigin[1]);
engfunc(EngFunc_WriteCoord, fOrigin[2] + 5.0);
write_short(pSprite); // Индекс спрайта из прекеша (index of precached sprite)
write_byte(12);
write_byte(20); // 0.1's
write_byte(4);
write_byte(25); // 10's
write_byte(20); // 10's
message_end();
}

public bacon_TraceAttack( iVictim, iAttacker, Float:flDamage, Float:flDirection[ 3 ], iTr, iDamageBits ){
new szClassname[ 32 ]
pev( iVictim, pev_classname, szClassname, charsmax( szClassname ) )
if( equal( szClassname, gDispenserClassnameHpArm ) ){
new Float:flEndOrigin[ 3 ]
get_tr2( iTr, TR_vecEndPos, flEndOrigin )
UTIL_Sparks( flEndOrigin )
}
return HAM_IGNORED
}

public DispenserHpArmThink( iEnt ){
if(pev_valid(iEnt)){
new iOwner = pev( iEnt, pev_iuser2 );
if(_:cs_get_user_team ( iOwner ) != pev(iEnt, pev_iuser4 )){
bDispenserHpArm[ iOwner ] = false;
set_pev( iEnt, pev_flags, pev( iEnt, pev_flags ) | FL_KILLME );
return
}

new iStatus = pev( iEnt, pev_iuser3 );

switch( iStatus ){
case STATUS_BUILDING:
{
switch( cs_get_user_team( iOwner ) ){
case CS_TEAM_T: set_rendering( iEnt, kRenderFxDistort, 255, 0, 0, kRenderTransAdd, 70 );
case CS_TEAM_CT: set_rendering( iEnt, kRenderFxDistort, 0, 0, 255, kRenderTransAdd, 70 );
}
}

case STATUS_ACTIVE:{

set_pev(iEnt, pev_origin, gDispenserOrigin[iOwner])
new iLevel = pev ( iEnt, pev_euser4 );

new iHealth
new iArmor
new Speed_HP, Speed_AP, Float:Speed_ent
new vampire_num, vampire_max
if(iLevel == 1){
iHealth = get_pcvar_num(g_iCvar[7])
iArmor = get_pcvar_num(g_iCvar[10])
Speed_HP = get_pcvar_num(g_iCvar[16])
Speed_AP = get_pcvar_num(g_iCvar[13])
Speed_ent = float(get_pcvar_num(g_iCvar[19]))
vampire_num = get_pcvar_num(g_vampir[0])
vampire_max = get_pcvar_num(g_vampir_max[0])
} else if(iLevel == 2){
iHealth = get_pcvar_num(g_iCvar[8])
iArmor = get_pcvar_num(g_iCvar[11])
Speed_HP = get_pcvar_num(g_iCvar[17])
Speed_AP = get_pcvar_num(g_iCvar[14])
Speed_ent = float(get_pcvar_num(g_iCvar[20]))
vampire_num = get_pcvar_num(g_vampir[1])
vampire_max = get_pcvar_num(g_vampir_max[1])
} else if(iLevel == 3){
iHealth = get_pcvar_num(g_iCvar[9])
iArmor = get_pcvar_num(g_iCvar[12])
Speed_HP = get_pcvar_num(g_iCvar[18])
Speed_AP = get_pcvar_num(g_iCvar[15])
Speed_ent = float(get_pcvar_num(g_iCvar[21]))
vampire_num = get_pcvar_num(g_vampir[2])
vampire_max = get_pcvar_num(g_vampir_max[2])
}
new ent

while((ent = find_ent_by_class(ent,"sentry")) != 0){
if(get_sentry_team(ent) == fm_cs_get_user_team( iOwner )){
new Float:entorigin[3]
pev( ent, pev_origin, entorigin )

if(UTIL_IsVisible( ent, iEnt ) && get_distance_f( gDispenserOrigin[ iOwner ], entorigin ) <= get_pcvar_num(g_iCvar[3]) ){
new iLevel = get_sentry_lvl(ent)
if(pev(ent, pev_health) < g_HEALTHS[iLevel]){
set_pev(ent, pev_health, pev(ent, pev_health) + Speed_ent)
UTIL_BeamEnts( gDispenserOrigin[ iOwner ], entorigin, gBeamcolor[ iOwner ][ 0 ], gBeamcolor[ iOwner ][ 1 ], gBeamcolor[ iOwner ][ 2 ] );
}
}
}
}

while((ent = find_ent_by_class(ent,"NiceDispenser")) != 0){
if(ent == iEnt) continue
new owner_disp = pev( ent, pev_iuser2 )

if(fm_cs_get_user_team( iOwner ) == fm_cs_get_user_team(owner_disp)){
new iLevel = pev ( ent, pev_euser4 );
new Float:entorigin[3]
pev( ent, pev_origin, entorigin )

if(UTIL_IsVisible( ent, iEnt ) && get_distance_f( gDispenserOrigin[ iOwner ], entorigin ) <= get_pcvar_num(g_iCvar[3]) ){
if(pev(ent, pev_health) < get_pcvar_float(g_iCvar[iLevel + 3])){
set_pev(ent, pev_health, pev(ent, pev_health) + Speed_ent)
UTIL_BeamEnts( gDispenserOrigin[ iOwner ], entorigin, gBeamcolor[ iOwner ][ 0 ], gBeamcolor[ iOwner ][ 1 ], gBeamcolor[ iOwner ][ 2 ] );
}
}
}
}

new id;
for( id = 1; id <= gMaxPlayers; id++ ){
if( is_user_alive( id )){
new Float:flOrigin[ 3 ], iOrigin1[ 3 ], iOrigin2[ 3 ]
pev( id, pev_origin, flOrigin )

FVecIVec( gDispenserOrigin[ iOwner ], iOrigin1 )
FVecIVec( flOrigin, iOrigin2 )

if( get_distance_f( gDispenserOrigin[ iOwner ], flOrigin ) <= get_pcvar_num(g_iCvar[3]) && UTIL_IsVisible( id, iEnt )){
if(cs_get_user_team( id ) == cs_get_user_team( iOwner )){
if( get_user_health( id ) < iHealth ){
set_user_health( id, get_user_health( id ) + Speed_HP );
bFullHealth[ id ] = true;
}else{
bFullHealth[ id ] = false;
}

if( get_user_armor( id ) < iArmor ){
set_user_armor( id, get_user_armor( id ) + Speed_AP );
bFullArmor[ id ] = true;
}else{
bFullArmor[ id ] = false;
}

if(get_user_health( id ) < iHealth || get_user_armor( id ) < iArmor){
UTIL_BeamEnts( gDispenserOrigin[ iOwner ], flOrigin, gBeamcolor[ iOwner ][ 0 ], gBeamcolor[ iOwner ][ 1 ], gBeamcolor[ iOwner ][ 2 ] );
}
}

if(cs_get_user_team( id ) != cs_get_user_team( iOwner ))
{
if( get_user_health( id ) > vampire_max ){
set_user_health( id, get_user_health( id ) - vampire_num );

if(pev(iEnt, pev_health) < get_pcvar_float(g_iCvar[pev(iEnt,pev_euser4)+3])) set_pev(iEnt, pev_health, pev(iEnt, pev_health) + float(vampire_num))

new Float:StartOrigin[3]
StartOrigin[0] = flOrigin[0]
StartOrigin[1] = flOrigin[1]
StartOrigin[2] = flOrigin[2] - 35.0
switch( cs_get_user_team( iOwner )){
case CS_TEAM_T: UTIL_BeamEnts( StartOrigin, gDispenserOrigin[ iOwner ], 80, 50, 255 );
case CS_TEAM_CT: UTIL_BeamEnts(StartOrigin, gDispenserOrigin[ iOwner ], 255, 50, 80 );
}
}
}
}
}
}
}
}
set_pev( iEnt, pev_nextthink, get_gametime( ) + 0.1 );
}
}

public BuildDispenserSolid( iEntity )
{
if( pev_valid( iEntity ) ){
new iOwner = pev( iEntity, pev_iuser2 );

switch( cs_get_user_team( iOwner ) ){
case CS_TEAM_T:{
gBeamcolor[ iOwner ][ 0 ] = 255, gBeamcolor[ iOwner ][ 1 ] = 50, gBeamcolor[ iOwner ][ 2 ] = 80;
set_rendering( iEntity, kRenderFxGlowShell, gBeamcolor[ iOwner ][ 0 ], gBeamcolor[ iOwner ][ 1 ], gBeamcolor[ iOwner ][ 2 ], kRenderNormal, 3 );
} case CS_TEAM_CT:{
gBeamcolor[ iOwner ][ 0 ] = 80, gBeamcolor[ iOwner ][ 1 ] = 50, gBeamcolor[ iOwner ][ 2 ] = 255;
set_rendering( iEntity, kRenderFxGlowShell, gBeamcolor[ iOwner ][ 0 ], gBeamcolor[ iOwner ][ 1 ], gBeamcolor[ iOwner ][ 2 ], kRenderNormal, 3 );
}
}
set_pev( iEntity, pev_solid, SOLID_SLIDEBOX );
set_pev( iEntity, pev_iuser3, STATUS_ACTIVE );
engfunc( EngFunc_DropToFloor, iEntity );
emit_sound( iEntity, CHAN_STATIC, gDispenserActive, VOL_NORM, ATTN_NORM, 0, PITCH_NORM );
}
}

public EVENT_TextMsg( ){
UTIL_DestroyDispensers( );
}

public LOG_RoundEnd( ){
UTIL_DestroyDispensers( );
}

stock UTIL_DestroyDispensers( ){
new iEnt = FM_NULLENT;

while((iEnt = find_ent_by_class( iEnt, gDispenserClassnameHpArm))){
new iOwner = pev( iEnt, pev_iuser2 );
bDispenserHpArm[ iOwner ] = false;
set_pev(iEnt, pev_flags, pev( iEnt, pev_flags ) | FL_KILLME);
}
}

stock UTIL_BuildBar( index, timer ){
message_begin(MSG_ONE, 108, _, index)
write_short(timer)
message_end()
}

stock UTIL_BreakModel( Float:flOrigin[ 3 ], model, flags ){
engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flOrigin, 0 );
write_byte( TE_BREAKMODEL );
engfunc( EngFunc_WriteCoord, flOrigin[ 0 ] );
engfunc( EngFunc_WriteCoord, flOrigin[ 1 ] );
engfunc( EngFunc_WriteCoord, flOrigin[ 2 ] );
write_coord( 16 );
write_coord( 16 );
write_coord( 16 );
write_coord( random_num( -20, 20 ) );
write_coord( random_num( -20, 20 ) );
write_coord( 10 );
write_byte( 10 );
write_short( model );
write_byte( 10 );
write_byte( 9 );
write_byte( flags );
message_end( );
}

stock UTIL_BeamEnts( Float:flStart[ 3 ], Float:flEnd[ 3 ], r, g, b ){
engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flStart );
write_byte( TE_BEAMPOINTS );
engfunc( EngFunc_WriteCoord, flEnd[ 0 ] );
engfunc( EngFunc_WriteCoord, flEnd[ 1 ] );
engfunc( EngFunc_WriteCoord, flEnd[ 2 ] );
engfunc( EngFunc_WriteCoord, flStart[ 0 ] );
engfunc( EngFunc_WriteCoord, flStart[ 1 ] );
engfunc( EngFunc_WriteCoord, flStart[ 2 ] + 35.0);
write_short( gHealingBeam );
write_byte( 5 );
write_byte( 2 );
write_byte( 1 );
write_byte( 60 );
write_byte( 0 );
write_byte( r );
write_byte( g );
write_byte( b );
write_byte( 999 );
write_byte( 30 );
message_end( );
}

stock UTIL_Sparks( Float:flOrigin[ 3 ] ){
engfunc( EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, flOrigin, 0 );
write_byte( TE_SPARKS );
engfunc( EngFunc_WriteCoord, flOrigin[ 0 ] );
engfunc( EngFunc_WriteCoord, flOrigin[ 1 ] );
engfunc( EngFunc_WriteCoord, flOrigin[ 2 ] );
message_end( );
}

stock bool:UTIL_IsVisible( index, entity, ignoremonsters = 0 ){
new Float:flStart[ 3 ], Float:flDest[ 3 ];
pev( index, pev_origin, flStart );
pev( index, pev_view_ofs, flDest );

xs_vec_add( flStart, flDest, flStart );

pev( entity, pev_origin, flDest );
engfunc( EngFunc_TraceLine, flStart, flDest, ignoremonsters, index, 0 );

new Float:flFraction;
get_tr2( 0, TR_flFraction, flFraction );

if( flFraction == 1.0 || get_tr2( 0, TR_pHit) == entity )
{
return true;
}

return false;
}

stock UTIL_ChatColor(const id, const input[], any:...){
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!t", "^3")
if(id)
players[0] = id
else
get_players(players, count, "ch")
for(new i=0; i<count; i++){
if(is_user_connected(players[i])){
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i])
write_string(msg)
message_end()
}
}
}

stock fm_cs_get_user_team(id){
if (pev_valid(id) != 2) return 0

return get_pdata_int(id, 114, 5)
}

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
здравствуйте плагин работает но из него падает причину не знаю,при пустом серваке проверил работает даже с ботами а если будет игроки играть сразу сервак падает если ставит раздатчик, сверху скинул ошибку лог не знаю связаны ли они но именно при падение эти ошибки пишут
 

Download all Attachments

RockTheStreet

Саппорт года
Сообщения
1,743
Реакции
344
Помог
40 раз(а)
Обратите внимание, если вы хотите заключить сделку с этим пользователем, он заблокирован
Сообщения
70
Реакции
-8
все тему можно закрывать мне на другом форуме сказали что написанно криво из за этого падает сервер!!!
 
Статус
В этой теме нельзя размещать новые ответы.

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

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