Arrest Baton Warning System

This is another one of my client side scripts.

This script will warn you if a member of the Civil Protection has their DarkRP arrest baton out.

Features:

  • Intelligent system with very little (if any) FPS strain.

  • Can be disabled with the console command bc_abw (and likewise it can be enabled via this).

  • If the entity isn’t an arrest baton, then the script will display a tick under the players feat (Will only display ticks and crosses for members of the Civil Protection, so it wont show for everyone).

  • Checks for valid entities so the script won’t ever crash.

Please do not re-distribute this script in any way without my permission.

Have fun :).

Screenshots:

http://s3.garrysmod.org/img/dl/73054_1.jpg

http://s3.garrysmod.org/img/dl/73054_2.jpg

http://s3.garrysmod.org/img/dl/73054_3.jpg

http://www.garrysmod.org/img/?t=dll&id=73054

If only I still used DarkRP…

Still, cool idea

Thank you.
I might release another version if i get some good feedback like yours :).

FPtjes scripts have had this for a long while, I’m not sure if it actually works though as I forget to activate it. But it’s nice ot have a standalone version.

Sorry if I don’t get the point of this but…

In my eyes, the stun baton being OUT is more obvious than a small red X. I just see this as useless but I don’t “RP”, so do you mind explaining why the red x is important? To me, the stun baton makes it obvious enough already.

Because he may not have the Arrest Baton out, he may have the stunstick out, you don’t know which one it is.

Why is it important to know if he has it out? If you’ve done something wrong, you should be running from them no matter what swep is out, right?

True, but how would you know if it is the arrest baton or the stun?
Also with this system you can tell who is approaching.

Thanks for explaining, makes sense now :slight_smile:

I want that thing on the left side of the screen D:

throw it in a clientside autorun file.
[lua]function EntInFront()

local trace = LocalPlayer():GetEyeTrace();

if(trace.Entity and trace.Entity:IsValid()) then return trace.Entity end

end

local function Notify(words)
if GAMEMODE.AddNotify then
GAMEMODE:AddNotify( tostring( words ), NOTIFY_GENERIC, 3)
else
LocalPlayer():ChatPrint(tostring(words))
end
end

function math.DecimalPlaces(numb,places)
return math.Round(numb*10^places)/10^places
end
local a = “-- %-10s: %-73s --”
function f(b,c)
print(string.format(a,b,c))
end
concommand.Add( “propinfo”, function ( pl, cmd, args )
ent = EntInFront()
if( !ent or !ent:IsValid() ) then Notify( “No Entity” ) return end
print( “-------------------------------------------------------------------------------------------” )
print( “-- Prop info --” )
print( “-------------------------------------------------------------------------------------------” )
f( “tostring”,tostring( ent ) )

f( "Model",'"'..tostring( ent:GetModel() )..'"' )
print( "-------------------------------------------------------------------------------------------" )
Notify( tostring( ent ).."["..ent:GetModel().."]")
if( ent:IsPlayer() ) then
	pl:ChatPrint( "-- Name: "..tostring( ent:GetName() ) )
print( "-------------------------------------------------------------------------------------------" )
end
local pos = ent:GetPos()
f( "Position","Vector("..math.DecimalPlaces(pos.x,4)..", "..math.DecimalPlaces(pos.y,4)..", "..math.DecimalPlaces(pos.z,4)..")" )
local ang = ent:GetAngles()
f( "Angle","Angle("..math.Round(ang.p)..", "..math.Round(ang.y)..", "..math.Round(ang.r)..")" )
local r,g,b,a = ent:GetColor()
f( "Colour","Color("..r..", "..g..", "..b..", "..a..")" )
f( "Material",tostring( ent:GetMaterial() ) )
f("Size",tostring( ent:OBBMaxs() - ent:OBBMins() ) )
f("Radius",tostring( ent:BoundingRadius() ) )
print( "-------------------------------------------------------------------------------------------" )

end )[/lua]
edit: updated it to the version I just made.

You get hit with one of the two and fine out. :flashfap:

Still a good idea though