• Traitor Trip Mine
    2 replies, posted
Hi. Here is what I have so far for a trip mine. I want it so it shoots up a big red beam and so when you step on it, you will explode. I also want it so you have 2 seconds before it is armed so the traitor can get away from it. Here is the code so far: [CODE]if SERVER then AddCSLuaFile( "shared.lua" ) end SWEP.HoldType = "ar2" if CLIENT then SWEP.PrintName = "Trip Mine" SWEP.Slot = 7 SWEP.Icon = "VGUI/ttt/tripmine" SWEP.EquipMenuData = { type="Explosive", name="Trip Mine", desc="" }; end SWEP.Base = "weapon_tttbase" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.Kind = WEAPON_EQUIP1 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "None"; SWEP.Primary.Damage = 2000 SWEP.Primary.Cone = .0 SWEP.Primary.ClipSize = 1 SWEP.Primary.ClipMax = 1 -- keep mirrored to ammo SWEP.Primary.DefaultClip = 1 SWEP.Kind = WEAPON_EQUIP1 SWEP.CanBuy = {ROLE_TRAITOR} -- only traitors can buy SWEP.LimitedStock = true -- only buyable once SWEP.AutoSpawnable = false SWEP.AmmoEnt = "item_ammo_tripmine_ttt" SWEP.ViewModel = Model("models/weapons/v_slam.mdl") SWEP.WorldModel = Model("models/weapons/w_slam.mdl")[/CODE] [editline]21st April 2013[/editline] Also, is there a way to get rid of the remote that is in the other hand? [editline]21st April 2013[/editline] There is also no ammo for it [editline]21st April 2013[/editline] Here is the updated version: [QUOTE]if SERVER then AddCSLuaFile( "shared.lua" ) end SWEP.HoldType = "slam" if CLIENT then SWEP.PrintName = "Trip Mine" SWEP.Slot = 7 SWEP.Icon = "VGUI/ttt/tripmine" SWEP.EquipMenuData = { type="Explosive", name="Trip Mine", desc="" }; end function SWEP:PrimaryAttack() self.Weapon:SetNextPrimaryFire( CurTime() + self.Primary.Delay ) self:BombDrop() end SWEP.Base = "weapon_tttbase" SWEP.Spawnable = true SWEP.AdminSpawnable = true SWEP.Kind = WEAPON_EQUIP1 SWEP.Primary.Automatic = true SWEP.Primary.Ammo = "None"; SWEP.Primary.Damage = 2000 SWEP.Primary.Cone = .0 SWEP.Primary.ClipSize = -1 SWEP.Primary.ClipMax = -1 -- keep mirrored to ammo SWEP.Primary.DefaultClip = -1 SWEP.Kind = WEAPON_EQUIP1 SWEP.CanBuy = {ROLE_TRAITOR} -- only traitors can buy SWEP.LimitedStock = true -- only buyable once SWEP.AutoSpawnable = false SWEP.AmmoEnt = "item_ammo_tripmine_ttt" SWEP.ViewModel = Model("models/weapons/v_slam.mdl") SWEP.WorldModel = Model("models/weapons/w_slam.mdl")[/QUOTE]
You need to stop posting every little problem you have on the Forums - We are not here to be your Code Monkey. If you want a Community Coder then you are going to need to Hire one from CoderHire or somewhere similar.
Look it up on steam workshop there's one there
Sorry, you need to Log In to post a reply to this thread.