4ªUTnutscripts/vscriptsdirector_base_addon2 óÿ¡ÿÿbepT=Í\ÿ¡ÿÿBEP <- {} BEP.OnGameEvent_weapon_fire <- function ( params ) { if( !("weapon" in params) || params.weapon != "pipe_bomb" )return; DoEntFire("!self", "RunScriptCode", "g_ModeScript.BEP.FindPipeBomb(" + params.userid + ")" , 0.2 , null, Entities.First()); } BEP.FindPipeBomb <- function ( bomber ) { local Bomber = GetPlayerFromUserID( bomber ); local PipeBomb = null; while( PipeBomb = Entities.FindByClassnameWithin( PipeBomb, "pipe_bomb_projectile", Bomber.EyePosition(), 128 ) ) { if( NetProps.GetPropEntity(PipeBomb, "m_hThrower") == Bomber )NetProps.SetPropFloat( PipeBomb, "m_flElasticity", 1.0 ); } } BEP.OnGameEvent_grenade_bounce <- function ( params ) { local Origin = Vector( params.x, params.y, params.z ); local PipeBomb = null; while(PipeBomb = Entities.FindByClassnameWithin( PipeBomb, "pipe_bomb_projectile", Origin, 2 )) { PipeBomb.ValidateScriptScope(); local PS = PipeBomb.GetScriptScope(); if( !("Bounce" in PS) )PS.Bounce <- 0 PS.Bounce++ local Bomber = NetProps.GetPropEntity( PipeBomb, "m_hThrower" ); local Propane = SpawnEntityFromTable( "prop_physics", { origin = Origin, model = "models/props_junk/Propanecanister001a.mdl", spawnflags = 12, effects = 32, } ); if( !IsPlayerABot(Bomber) )DoEntFire( "!self", "RunScriptCode", "local P = EntIndexToHScript("+Propane.GetEntityIndex()+");if(P == null || !P.IsValid())return;P.TakeDamage(P.GetHealth(), 64, GetPlayerFromUserID("+Bomber.GetPlayerUserId()+"));", 0.033, null, Entities.First() ); else DoEntFire( "!self", "Break", "", 0.033, Bomber, Propane ); //Because bots can ignite propane via damage but never directly break them. if( PS.Bounce > 5 ){ PipeBomb.SetOrigin( PipeBomb.GetOrigin() + Vector(0,0,4096) ); //Because some SourceMod Plugins are hooked to "pipe_bomb_projectile" kill event and can trigger double effect. PipeBomb.Kill(); } } } __CollectGameEventCallbacks( BEP );IncludeScript("BEP");