Hey guys, call me noob if you feel like it just because i'll host a DarkRP.
Anyways. I want a bomb wich is able to blow doors off. Not very big radius. Just like a C2.
I want it to be on the door when planted, but its not necessary.
Short and poor request. Ask if there is something you wonder.
Thanks in advance
I'm going to need a LOT of [url=http://en.wikipedia.org/wiki/Vitamin_C2]C2[/url] to blow freaking doors off. :v:
Hm. They're usually used to blow locks off, but.. W/e. Cool if they blew whole door off
gbombs has a door breaching charge
but then putting gbombs in a server is very risky due to mingebags that would spam the nukes
[QUOTE=VG Cats;18282523]gbombs has a door breaching charge
but then putting gbombs in a server is very risky due to mingebags that would spam the nukes[/QUOTE]
Making it admin only is easy.
The gbombs door breaching charge won't blow through prop_door_rotatings.
[QUOTE=Wolfie13;18284963]Making it admin only is easy.
The gbombs door breaching charge won't blow through prop_door_rotatings.[/QUOTE]
I can't imagine how stripping that bomb from the pack and making it work on all types of doors could be a problem.
[QUOTE=Wolfie13;18284963]Making it admin only is easy.
The gbombs door breaching charge won't blow through prop_door_rotatings.[/QUOTE]
I dont want it to rotate. Or do i? Not sure how that works.
I want it like, blowing a door with shotugun.. Something like that
Call me a noob but...
To make the door blow off, why don't you go and take some of CSS-realistic weapons LUA-codes from the Shotguns that can shoot a door off?
Sorry for bumping, but i found this somewhere, Credits to whoever made the SWEP.
init.lua
[code]
include("sh_init.lua");
-- Add the files that need to be sent to the client.
AddCSLuaFile("cl_init.lua");
AddCSLuaFile("sh_init.lua");
-- This is called when the entity initializes.
function ENT:Initialize()
self:SetModel("models/weapons/w_c4_planted.mdl");
self:SetMoveType(MOVETYPE_VPHYSICS);
self:PhysicsInit(SOLID_VPHYSICS);
self:SetSolid(SOLID_VPHYSICS);
self:SetUseType(SIMPLE_USE);
-- Get the physics object of the entity.
local physicsObject = self:GetPhysicsObject();
-- Check if the physics object is a valid entity.
if ( ValidEntity(physicsObject) ) then
physicsObject:Wake();
physicsObject:EnableMotion(true);
end;
end;
-- A function to set the door for the entity to breach.
function ENT:SetDoor(door, trace)
self._Door = door;
self._Door:DeleteOnRemove(self);
-- Set the position and angles of the entity.
self:SetPos(trace.HitPos);
self:SetAngles( trace.HitNormal:Angle() + Angle(90, 0, 0) );
if (door:GetClass() != "prop_dynamic") then
constraint.Weld(door, self, 0, 0);
else
if ( ValidEntity( self:GetPhysicsObject() ) ) then
self:GetPhysicsObject():EnableMotion(false);
end;
end;
-- Set the health of the entity.
self:SetHealth(100);
end;
-- Called every frame.
function ENT:Think()
self:SetNetworkedInt( "cider_Health", math.Round( self:Health() ) );
end;
-- Explode the entity.
function ENT:Explode()
local effectData = EffectData();
-- Set the information for the effect.
effectData:SetStart( self:GetPos() );
effectData:SetOrigin( self:GetPos() );
effectData:SetScale(1);
-- Create the effect from the data.
util.Effect("Explosion", effectData);
end;
-- Called when the entity takes damage.
function ENT:OnTakeDamage(damageInfo)
self:SetHealth( math.max(self:Health() - damageInfo:GetDamage(), 0) );
-- Check if the entity has run out of health.
if (self:Health() <= 0) then
self:Explode();
self:Remove();
-- Open the door instantly as if it's been blown open.
cider.entity.openDoor(self._Door, 0, true, true);
end;
end; [/code]
sh_init.lua
[code]
ENT.Type = "anim";
ENT.Base = "base_gmodentity";
ENT.PrintName = "Breach";
ENT.Author = "Dalle";
ENT.Spawnable = false;
ENT.AdminSpawnable = false;
[/code]
cl_init.lua
[code]
include("sh_init.lua")
function ENT:Draw() self.Entity:DrawModel(); end;
[/code]
Sorry, you need to Log In to post a reply to this thread.