Is there a Taser that does not ragdoll but just freeze/slow.

I was wondering about this because when you taze a player, they loose their weapons ect and overall just having the Taser to ragdoll someone is a OP advantage.

So I was wondering has anyone came across a Taser that freezes or Slows the player temporarily?
Has someone here maybe made one that does it?

Just edit the taser that ragdolls to slow the player using SetWalkSpeed().

Uhh sorry I am a Noob at Lua…where exactly should I replace it?

If it hurts the player, fine. I just need him to slow down heaps. Also maybe to make it that he does not loose his weapons (As ragdolling does that…)

Change

ents.Create( “prop_ragdoll” )
to it

Here is all of the code:



function SWEP:PrimaryAttack()
if ( !self:CanPrimaryAttack() ) then return end

local eyetrace = self.Owner:GetEyeTrace() 

if !eyetrace.Entity:IsPlayer() then return end
if eyetrace.Entity:IsFrozen() then
ULib.tsayError( self.Owner, eyetrace.Entity:Nick() .. " is frozen!", true )
return
end
local dist = self.Owner:EyePos():Distance(eyetrace.Entity:GetPos())
--[[
If the distance between the taser owner and the target is above the maximum,
returns nothing and create a message in the HUD, what will make the weapon doesn't shoot.
]]
if dist > Distance:GetFloat() and not self.Owner:TaserAdmin() then
self.Owner:PrintMessage( HUD_PRINTCENTER, "Too Far Away")
return
end

if (!SERVER) then return end 
if eyetrace.Entity:IsPlayer() then
self:EmitSound( "Weapon_StunStick.Activate" )
self:tasePlayer(eyetrace.Entity, self.Owner)
end
end


function SWEP:tasePlayer(ply, shooter)
local logtext = shooter:Nick().." tased "..ply:Nick().."
"
local eyetrace = self.Owner:GetEyeTrace()

if eyetrace.Entity:TaserAdmin() and self.Owner:IsCP() then
self.Owner:PrintMessage( HUD_PRINTCENTER, AdminText:GetString())
return end

if self.Owner:IsCP() and eyetrace.Entity:IsCP() then
self.Owner:PrintMessage( HUD_PRINTCENTER, CopText:GetString())
return end

-- Logs the taze to every possible place
DB.Log(logtext)
ServerLog(logtext)
Msg(logtext)
ulx.fancyLogAdmin( shooter, "#A tased #P", ply )

-- player vars
ply:DisallowNoclip( true )
ply:DisallowMoving( true )
ply:DisallowSpawning( true )
ply:DisallowVehicles( true )
ply:SetWalkSpeed(50) -- Sets the speed to 1/2 of the normal run/walk speed

-- bring the motherfucker back
timer.Create("taseredrags"..ply:SteamID(), Timer:GetFloat(), 0, function() self:SetWalkSpeed(100) end)
if not self.Owner:TaserAdmin() then
	self:SetNextPrimaryFire( CurTime() + Delay:GetFloat() )
end

function SWEP:taserevive()

end

function SWEP:SecondaryAttack()

end

local playerMeta = FindMetaTable("Player")
function playerMeta:TaserAdmin()
	if not IsValid(self) then return false end
	return self:Team()==TEAM_STAFF or self:Team()==TEAM_ADMIN or self:Team()==TEAM_OWNER or self:Team()==TEAM_MOD
end


Set’s the players walk speed to 50, when the tazer time is up it will set it back to 100.
Replace everything in the shared.lua with this. Untested, should work though.