Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local RedBloodEffect = {
- "blood_advisor_pierce_spray",
- "blood_advisor_pierce_spray_b",
- "blood_advisor_pierce_spray_c",
- "blood_advisor_puncture_withdraw",
- "blood_zombie_split_spray"}
- local Playermodels = {
- "models/monstermash/deer_haunter.mdl",
- "models/monstermash/skeleton.mdl",
- "models/monstermash/guest.mdl",
- "models/monstermash/vampire.mdl",
- "models/monstermash/stein.mdl",
- "models/monstermash/witch.mdl",
- "models/monstermash.headless_horseman.mdl",
- "models/monstermash/mummy.mdl",
- "models/monstermash/scarecrow.mdl",
- "models/monstermash/nosferatu.mdl",
- "models/monstermash/bloody_mary.mdl"}
- local Weps_CanDecapitate = {
- "mm_axe",
- "mm_battleaxe",
- "mm_scythe",
- "mm_sword"}
- local Weps_CanBifurcate = {
- "mm_battleaxe",
- "mm_scythe"}
- local meta = FindMetaTable("Player")
- function meta:CreateRagdoll()
- end
- function GM:PlayerDeathSound()
- return true
- end
- function stuff(victim,inflictor,attacker)
- if !(victim == attacker) then
- attacker:SetNWInt("killcounter", attacker:GetNWInt("killcounter") + 1)
- end
- if victim:IsPlayer() then
- victim:ConCommand("play gameplay/death.wav")
- end
- local ply_pos = victim:GetPos()
- local ply_ang = victim:GetAngles()
- local ply_mdl = victim:GetModel()
- local ply_skn = victim:GetSkin()
- local ply_col = victim:GetColor()
- local ply_mat = victim:GetMaterial()
- if victim.DamageTaken == nil then
- victim.DamageTaken = 0
- end
- if (IsValid(attacker) && !(victim == attacker) && attacker:IsPlayer() && IsValid(attacker:GetActiveWeapon()) && (attacker:GetActiveWeapon():GetClass() == "mm_shovel" )) then
- local ent = ents.Create("prop_dynamic")
- ent:SetPos(ply_pos)
- ent:SetAngles(ply_ang + Angle(0,180,0))
- ent:SetModel("models/misc/gravestone.mdl")
- ent:Spawn()
- ent:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- timer.Simple(60,function() if !IsValid(ent) then return end ent:Remove() end)
- elseif (IsValid(attacker) && !(victim == attacker) && attacker:IsPlayer() && IsValid(attacker:GetActiveWeapon()) && (attacker:GetActiveWeapon():GetClass() == "mm_battleaxe" || attacker:GetActiveWeapon():GetClass() == "mm_scythe") && victim.lastHitGroup && !(victim.lastHitGroup == HITGROUP_HEAD)) then
- local ent = ents.Create("prop_ragdoll")
- ent:SetPos(ply_pos+Vector(0,0,40))
- ent:SetAngles(ply_ang - Angle(ply_ang.p,0,-90))
- if ply_mdl == "models/monstermash/deer_haunter.mdl" then
- ent:SetModel("models/monstermash/gibs/deerhaunter_top.mdl")
- elseif ply_mdl == "models/monstermash/skeleton.mdl" then
- ent:SetModel("models/monstermash/gibs/skeleton_top.mdl")
- elseif ply_mdl == "models/monstermash/guest.mdl" then
- ent:SetModel("models/monstermash/gibs/guest_top.mdl")
- elseif ply_mdl == "models/monstermash/vampire.mdl" then
- ent:SetModel("models/monstermash/gibs/vampire_top.mdl")
- elseif ply_mdl == "models/monstermash/stein.mdl" then
- ent:SetModel("models/monstermash/gibs/stein_top.mdl")
- elseif ply_mdl == "models/monstermash/witch.mdl" then
- ent:SetModel("models/monstermash/gibs/witch_top.mdl")
- elseif ply_mdl == "models/monstermash/headless_horseman.mdl" then
- ent:SetModel("models/monstermash/gibs/hhm_top.mdl")
- elseif ply_mdl == "models/monstermash/mummy.mdl" then
- ent:SetModel("models/monstermash/gibs/mummy_top.mdl")
- elseif ply_mdl == "models/monstermash/scarecrow.mdl" then
- ent:SetModel("models/monstermash/gibs/scarecrow_top.mdl")
- elseif ply_mdl == "models/monstermash/nosferatu.mdl" then
- ent:SetModel("models/monstermash/gibs/nosferatu_top.mdl")
- elseif ply_mdl == "models/monstermash/bloody_mary.mdl" then
- ent:SetModel("models/monstermash/gibs/bm_top.mdl")
- end
- ent:SetSkin(ply_skn)
- ent:SetMaterial(ply_mat)
- ent:Spawn()
- ent:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- ent:SetBodygroup(1 ,0)
- ent:EmitSound("physics/flesh/flesh_bloody_break.wav")
- if ply_mdl == "models/monstermash/mummy.mdl" || ply_mdl == "models/monstermash/deer_haunter.mdl" || ply_mdl == "models/monstermash/vampire.mdl" || ply_mdl == "models/monstermash/stein.mdl" || ply_mdl == "models/monstermash/witch.mdl" || ply_mdl == "models/monstermash/nosferatu.mdl" || ply_mdl == "models/monstermash/bloody_mary.mdl" then
- local RandomBlood = table.Random(RedBloodEffect)
- local BloodTrail = ents.Create( "info_particle_system" )
- BloodTrail:SetKeyValue( "effect_name", RandomBlood )
- BloodTrail:SetKeyValue( "start_active", tostring( 1 ) )
- BloodTrail:SetPos( ply_pos+Vector(0,0,10) )
- BloodTrail:SetAngles( ply_ang )
- BloodTrail:SetParent(ent)
- BloodTrail:Spawn()
- BloodTrail:Activate()
- BloodTrail:Fire( "Kill", nil, 0.4 )
- end
- if not ent:IsValid() then return end
- local plyvel = victim:GetVelocity()
- for i = 1, ent:GetPhysicsObjectCount() do
- local bone = ent:GetPhysicsObjectNum(i)
- if bone and bone.IsValid and bone:IsValid() then
- local bonepos, boneang = victim:GetBonePosition(ent:TranslatePhysBoneToBone(i))
- bone:SetPos(bonepos)
- bone:SetAngles(boneang)
- bone:AddVelocity(plyvel)
- end
- end
- if victim:IsOnFire() then ent:Ignite(math.Rand(6, 8), 0) end
- victim:SpectateEntity(ent)
- victim:Spectate(OBS_MODE_CHASE)
- local ent2 = ents.Create("prop_ragdoll")
- ent2:SetPos(ply_pos)
- ent2:SetAngles(ply_ang - Angle(ply_ang.p,0,0))
- if ply_mdl == "models/monstermash/deer_haunter.mdl" then
- ent2:SetModel("models/monstermash/gibs/deerhaunter_lower.mdl")
- elseif ply_mdl == "models/monstermash/skeleton.mdl" then
- ent2:SetModel("models/monstermash/gibs/skeleton_lower.mdl")
- elseif ply_mdl == "models/monstermash/guest.mdl" then
- ent2:SetModel("models/monstermash/gibs/guest_lower.mdl")
- elseif ply_mdl == "models/monstermash/vampire.mdl" then
- ent2:SetModel("models/monstermash/gibs/vampire_lower.mdl")
- elseif ply_mdl == "models/monstermash/stein.mdl" then
- ent2:SetModel("models/monstermash/gibs/stein_lower.mdl")
- elseif ply_mdl == "models/monstermash/witch.mdl" then
- ent2:SetModel("models/monstermash/gibs/witch_lower.mdl")
- elseif ply_mdl == "models/monstermash/headless_horseman.mdl" then
- ent2:SetModel("models/monstermash/gibs/hhm_lower.mdl")
- elseif ply_mdl == "models/monstermash/mummy.mdl" then
- ent2:SetModel("models/monstermash/gibs/mummy_lower.mdl")
- elseif ply_mdl == "models/monstermash/scarecrow.mdl" then
- ent2:SetModel("models/monstermash/gibs/scarecrow_lower.mdl")
- elseif ply_mdl == "models/monstermash/nosferatu.mdl" then
- ent:SetModel("models/monstermash/gibs/nosferatu_lower.mdl")
- elseif ply_mdl == "models/monstermash/bloody_mary.mdl" then
- ent:SetModel("models/monstermash/gibs/bm_lower.mdl")
- end
- ent2:SetSkin(ply_skn)
- ent2:SetMaterial(ply_mat)
- ent2:Spawn()
- ent2:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- ent2:SetBodygroup(1 ,0)
- if not ent2:IsValid() then return end
- local plyvel = victim:GetVelocity()
- if victim:IsOnFire() then ent2:Ignite(math.Rand(6, 8), 0) end
- elseif ((IsValid(attacker) && !(victim == attacker) && attacker:IsPlayer() && IsValid(attacker:GetActiveWeapon()) && (attacker:GetActiveWeapon():GetClass() == "mm_axe" || attacker:GetActiveWeapon():GetClass() == "mm_hacksaw" || attacker:GetActiveWeapon():GetClass() == "mm_battleaxe" || attacker:GetActiveWeapon():GetClass() == "mm_scythe" || attacker:GetActiveWeapon():GetClass() == "mm_sword" || attacker:GetActiveWeapon():GetClass() == "mm_musketpistol" || attacker:GetActiveWeapon():GetClass() == "mm_repeater" || attacker:GetActiveWeapon():GetClass() == "mm_pumpshotgun" || attacker:GetActiveWeapon():GetClass() == "mm_sawedoff" ) && victim.lastHitGroup && (victim.lastHitGroup == HITGROUP_HEAD)) || (IsValid(attacker) && !(victim == attacker) && attacker:IsPlayer() && (attacker:GetActiveWeapon():GetClass() == "mm_knife") && victim.DamageTaken == 100)) then
- local ent = ents.Create("sent_mm_body")
- ent:SetPos(ply_pos)
- ent:SetAngles(ply_ang - Angle(ply_ang.p,0,0))
- ent:SetModel(ply_mdl)
- ent:SetSkin(ply_skn)
- ent:SetMaterial(ply_mat)
- ent:Spawn()
- ent:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- if !(attacker:GetActiveWeapon():GetClass() == "mm_knife" ) then
- ent:SetBodygroup(1 ,1)
- end
- ent:SetSequence( ent:LookupSequence( "death_04" ) )
- ent:SetNWFloat("Time", CurTime() + 2)
- ent:EmitSound("physics/flesh/flesh_bloody_break.wav")
- if not ent:IsValid() then return end
- local plyvel = victim:GetVelocity()
- for i = 1, ent:GetPhysicsObjectCount() do
- local bone = ent:GetPhysicsObjectNum(i)
- if bone and bone.IsValid and bone:IsValid() then
- local bonepos, boneang = victim:GetBonePosition(ent:TranslatePhysBoneToBone(i))
- bone:SetPos(bonepos)
- bone:SetAngles(boneang)
- bone:AddVelocity(plyvel)
- end
- end
- if attacker:GetActiveWeapon():GetClass() != "mm_knife" && (ply_mdl == "models/monstermash/mummy.mdl" || ply_mdl == "models/monstermash/deer_haunter.mdl" || ply_mdl == "models/monstermash/vampire.mdl" || ply_mdl == "models/monstermash/stein.mdl" || ply_mdl == "models/monstermash/witch.mdl" || ply_mdl == "models/monstermash/nosferatu.mdl" || ply_mdl == "models/monstermash/bloody_mary.mdl") then
- ent.DoBlood = true
- end
- if victim:IsOnFire() then ent:Ignite(math.Rand(6, 8), 0) end
- if !(attacker:GetActiveWeapon():GetClass() == "mm_knife" || attacker:GetActiveWeapon():GetClass() == "mm_musketpistol" || attacker:GetActiveWeapon():GetClass() == "mm_repeater" || attacker:GetActiveWeapon():GetClass() == "mm_pumpshotgun" || attacker:GetActiveWeapon():GetClass() == "mm_sawedoff") then
- if ply_mdl == "models/monstermash/mummy.mdl" || ply_mdl == "models/monstermash/deer_haunter.mdl" || ply_mdl == "models/monstermash/vampire.mdl" || ply_mdl == "models/monstermash/stein.mdl" || ply_mdl == "models/monstermash/witch.mdl" || ply_mdl == "models/monstermash/nosferatu.mdl" || ply_mdl == "models/monstermash/bloody_mary.mdl") then
- local RandomBlood = table.Random(RedBloodEffect)
- local BloodTrail = ents.Create( "info_particle_system" )
- BloodTrail:SetKeyValue( "effect_name", RandomBlood )
- BloodTrail:SetKeyValue( "start_active", tostring( 1 ) )
- BloodTrail:SetPos( ply_pos+Vector(0,0,20) )
- BloodTrail:SetAngles( ply_ang )
- BloodTrail:SetParent(ent)
- BloodTrail:Spawn()
- BloodTrail:Activate()
- BloodTrail:Fire( "Kill", nil, 0.4 )
- end
- CreateGib("models/monstermash/deer_haunter.mdl","models/monstermash/gibs/head_deerhaunter.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/skeleton.mdl","models/monstermash/gibs/head_skull.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,false)
- CreateGib("models/monstermash/guest.mdl","models/monstermash/gibs/head_skull.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,false)
- CreateGib("models/monstermash/vampire.mdl","models/monstermash/gibs/head_vampire.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/stein.mdl","models/monstermash/gibs/head_stein.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/witch.mdl","models/monstermash/gibs/head_witch.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/headless_horseman.mdl","models/monstermash/gibs/head_pumpkin.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/mummy.mdl","models/monstermash/gibs/head_mummy.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/scarecrow.mdl","models/monstermash/gibs/head_scarecrow.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,false)
- CreateGib("models/monstermash/nosferatu.mdl","models/monstermash/gibs/head_nosferatu.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/bloody_mary.mdl","models/monstermash/gibs/head_mary.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- end
- if victim:IsOnFire() then ent2:Ignite(math.Rand(6, 8), 0) end
- victim:SpectateEntity(ent)
- victim:Spectate(OBS_MODE_CHASE)
- elseif (IsValid(inflictor) && inflictor:GetClass() == "ent_pumpkin_nade" || inflictor:GetClass() == "ent_cannonball") || (victim.DamageTaken > 119) then
- CreateGib("models/monstermash/deer_haunter.mdl","models/monstermash/gibs/head_deerhaunter.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/deer_haunter.mdl","models/monstermash/gibs/dh_gib_1.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/deer_haunter.mdl","models/monstermash/gibs/dh_gib_2.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/deer_haunter.mdl","models/monstermash/gibs/dh_gib_3.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/deer_haunter.mdl","models/monstermash/gibs/dh_gib_4.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/deer_haunter.mdl","models/monstermash/gibs/dh_gib_5.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/skeleton.mdl","models/monstermash/gibs/head_skull.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,false)
- CreateGib("models/monstermash/guest.mdl","models/monstermash/gibs/head_skull.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,false)
- CreateGib("models/monstermash/vampire.mdl","models/monstermash/gibs/head_vampire.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/stein.mdl","models/monstermash/gibs/head_stein.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/witch.mdl","models/monstermash/gibs/head_witch.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/headless_horseman.mdl","models/monstermash/gibs/head_pumpkin.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/mummy.mdl","models/monstermash/gibs/head_mummy.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/scarecrow.mdl","models/monstermash/gibs/head_scarecrow.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,false)
- CreateGib("models/monstermash/nosferatu.mdl","models/monstermash/gibs/head_nosferatu.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib("models/monstermash/bloody_mary.mdl","models/monstermash/gibs/head_mary.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_1.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_2.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_3.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_4.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_5.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_6.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_7.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- CreateGib(ply_mdl,"models/monstermash/gibs/gib_8.mdl",ply_pos+Vector(0,0,60),ply_ang - Angle(ply_ang.p,0,0),victim,true)
- for i=0,10 do
- local vPoint = ply_pos+Vector(0,0,60)
- local effectdata = EffectData()
- effectdata:SetOrigin( vPoint )
- util.Effect("bloodstream",effectdata)
- end
- elseif (IsValid(inflictor) && inflictor:GetClass() == "ent_cleaver") || (victim.DamageTaken > 119) then
- local ent = ents.Create("prop_ragdoll")
- ent:SetPos(ply_pos)
- ent:SetAngles(ply_ang - Angle(ply_ang.p,0,0))
- ent:SetModel(ply_mdl)
- ent:SetSkin(ply_skn)
- ent:SetMaterial(ply_mat)
- ent:Spawn()
- ent:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- ent:SetBodygroup(1 ,0)
- local model = ents.Create("prop_physics")
- model:SetModel("models/weapons/monstermash/cleaver_headshot.mdl")
- model:SetPos(ent:GetPos()+Vector(0,0,0))
- model:SetAngles(ent:GetAngles())
- model:Spawn()
- model:FollowBone( ent, ent:LookupBone("ValveBiped.Bip01_Head1") )
- model:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- else
- local ent = ents.Create("prop_ragdoll")
- ent:SetPos(ply_pos)
- ent:SetAngles(ply_ang - Angle(ply_ang.p,0,0))
- ent:SetModel(ply_mdl)
- ent:SetSkin(ply_skn)
- ent:SetMaterial(ply_mat)
- ent:Spawn()
- ent:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- ent:SetBodygroup(1 ,0)
- timer.Simple(60,function() if !IsValid(ent) then return end ent:Remove() end)
- if not ent:IsValid() then return end
- local plyvel = victim:GetVelocity()
- for i = 1, ent:GetPhysicsObjectCount() do
- local bone = ent:GetPhysicsObjectNum(i)
- if bone and bone.IsValid and bone:IsValid() then
- local bonepos, boneang = victim:GetBonePosition(ent:TranslatePhysBoneToBone(i))
- bone:SetPos(bonepos)
- bone:SetAngles(boneang)
- bone:AddVelocity(plyvel)
- end
- end
- if victim:IsOnFire() then ent:Ignite(math.Rand(6, 8), 0) end
- victim:SpectateEntity(ent)
- victim:Spectate(OBS_MODE_CHASE)
- end
- if (IsValid(attacker) && !(victim == attacker) && attacker:IsPlayer() && IsValid(attacker:GetActiveWeapon()) && (attacker:GetActiveWeapon():GetClass() == "mm_boner")) then
- local ent = ents.Create("item_healthkit")
- ent:SetPos(ply_pos)
- ent:SetAngles(ply_ang - Angle(ply_ang.p,0,0))
- ent:Spawn()
- end
- end
- hook.Add("PlayerDeath", "stuff", stuff)
- function CreateGib(check,path,vector,angle,victim,dobleed)
- local ent2 = ents.Create("prop_physics")
- ent2:SetPos(vector)
- ent2:SetAngles(angle)
- if victim:GetModel() == check then
- ent2:SetModel(path)
- end
- ent2:SetSkin(victim:GetSkin())
- ent2:SetMaterial(victim:GetMaterial())
- ent2:Spawn()
- local num = math.Rand(1,3)
- if dobleed == true then
- for i = 0.1, num, 0.1 do
- timer.Simple(i,function()
- if !IsValid(ent2) then return end
- local effectdata = EffectData()
- effectdata:SetOrigin( ent2:GetPos() )
- util.Effect( "BloodImpact", effectdata )
- end)
- end
- if victim:IsOnFire() then ent2:Ignite(math.Rand(6, 8), 0) end
- local color = Color( 105, 0, 0, 255 )
- local trail = util.SpriteTrail(ent2, 0, color, false, 7, 1, 1, 1/(15+1)*0.5, "effects/bloodstream.vmt")
- end
- ent2:SetCollisionGroup(COLLISION_GROUP_WEAPON or COLLISION_GROUP_DEBRIS_TRIGGER)
- timer.Simple(25,function() if !IsValid(ent2) then return end ent2:Remove() end)
- end
- function stuff2( ply, HitGroup, dmginfo )
- ply.lastHitGroup = HitGroup
- /*local att = dmginfo:GetAttacker()
- if not att or not att:IsPlayer() then return end
- local wep = att:GetActiveWeapon()
- if wep:GetClass() == "mm_coachgun" then
- local leng = ply:GetPos():Distance( att:GetPos() )
- local scale = math.Clamp(leng,64, 512)
- local dmgscld = leng
- print(64/leng)
- dmginfo:ScaleDamage( 64/leng )
- else*/
- if not att or not att:IsPlayer() then return end
- local wep = att:GetActiveWeapon()
- if wep:GetClass() == "mm_huntingrifle" && HitGroup == HITGROUP_HEAD then
- dmginfo:ScaleDamage( 2 )
- else
- dmginfo:ScaleDamage( 1 )
- end
- end
- hook.Add("ScalePlayerDamage", "stuff2", stuff2)
- function stuff3(ply)
- ply:RemoveAllDecals()
- end
- hook.Add("PlayerSpawn", "stuff3", stuff3)
- function stuff4(victim,attacker,hpremain,dmgtaken)
- if (victim == attacker) then
- victim.DamageTaken = 0
- else
- victim.DamageTaken = dmgtaken
- end
- victim:DoReloadEvent()
- end
- hook.Add("PlayerHurt","stuff4",stuff4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement