2018-05-02 06:32:59 +08:00
SWEP.PrintName = " Remote Detonation Pack "
SWEP.Description = " A pack of explosives that can be placed on surfaces and detonated remotely, to deal large explosive damage. \n Press PRIMARY ATTACK to deploy. \n Press PRIMARY ATTACK again to detonate. \n Press SPRINT on a deployed detonation pack to disarm and retrieve it. "
2014-10-02 08:49:54 +08:00
SWEP.ViewModel = " models/weapons/v_pistol.mdl "
SWEP.WorldModel = Model ( " models/weapons/w_c4_planted.mdl " )
SWEP.AmmoIfHas = true
SWEP.Primary . ClipSize = 1
SWEP.Primary . DefaultClip = 1
SWEP.Primary . Ammo = " sniperpenetratedround "
2018-05-02 06:32:59 +08:00
SWEP.Primary . Delay = 0.1
2014-10-02 08:49:54 +08:00
SWEP.Primary . Automatic = true
2015-04-19 13:54:47 +08:00
SWEP.Secondary . ClipSize = 1
SWEP.Secondary . DefaultClip = 1
SWEP.Secondary . Ammo = " dummy "
2014-10-02 08:49:54 +08:00
2018-05-02 06:32:59 +08:00
SWEP.MaxStock = 8
2014-10-02 08:49:54 +08:00
SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOW
2018-05-02 06:32:59 +08:00
SWEP.NoDeploySpeedChange = true
2014-10-02 08:49:54 +08:00
function SWEP : Initialize ( )
2014-11-12 08:15:49 +08:00
self : SetWeaponHoldType ( " slam " )
2018-05-02 06:32:59 +08:00
GAMEMODE : DoChangeDeploySpeed ( self )
2014-10-02 08:49:54 +08:00
self : HideViewAndWorldModel ( )
end
function SWEP : SetReplicatedAmmo ( count )
self : SetDTInt ( 0 , count )
end
function SWEP : GetReplicatedAmmo ( )
return self : GetDTInt ( 0 )
end
function SWEP : GetWalkSpeed ( )
if self : GetPrimaryAmmoCount ( ) > 0 then
return self.FullWalkSpeed
end
end
function SWEP : Reload ( )
end
function SWEP : CanPrimaryAttack ( )
2018-05-02 06:32:59 +08:00
if self : GetOwner ( ) : IsHolding ( ) or self : GetOwner ( ) : GetBarricadeGhosting ( ) then return false end
2014-10-02 08:49:54 +08:00
if self : GetPrimaryAmmoCount ( ) <= 0 then
self : SetNextPrimaryFire ( CurTime ( ) + self.Primary . Delay )
return false
end
return true
end
function SWEP : CanSecondaryAttack ( )
return false
end
function SWEP : Deploy ( )
2018-05-02 06:32:59 +08:00
gamemode.Call ( " WeaponDeployed " , self : GetOwner ( ) , self )
2014-10-02 08:49:54 +08:00
return true
end
function SWEP : Holster ( )
return true
end