[Simple] A simple script i could use help on

Im lost in this but can someone help me by making me the script for clearing all decals in area, normally i know this but i cant remember! simple radius clear decals in the radius. Thank you!

RunConsoleCommand( “r_cleardecals” )

that should get you started

that i know its the radius i dont remember

[editline]22nd June 2014[/editline]

also it would have to clean up the decals in the radius
so it doesnt just clean the decals in the whole map

I might be wrong, but I don’t think you can clean decals in a certain radius.

Im starting to think your right cus i have tried a lot of different ways and still nothing. :frowning:

Run on server

timer.Create( "Clear", 1, 0, function()
       for _, y in pairs( player.GetAll() ) do
              y:ConCommand( "r_cleardecals" )

This will run the clear decals command on every player in the server every 1 second, which can be changed
Sorry about spacing, Tab doesn’t work for some reason so I had to use the space bar -_-

use this for remove decals on a entity

You can use ents.FindInSphere also

why dont you supply some ways youve tried it because youve made an appearance of you dont know what the fuck your trying to do

on topic; try use ents.FindInSphere like gonza said

You guys aren’t listening to what he is asking for - he wants to clear ALL decals ( not just on entities ) in a certain radius - but not all of them ( so r_cleardecals isn’t what he needs ).

Unfortunately, there isn’t really a good way to do this.

Many moons ago ( > 4 years ), someone made a Broom SWEP that allowed you to do this and worked by swamping a small area with decals.

	--The Source Engine will remove decals in a given area if there
	--are too many of them, thus giving us a cleaning effect.
	for i=0, math.random( 10, 15 ) do
		local Pos1 = traceHit.HitPos + traceHit.HitNormal
		local Pos2 = traceHit.HitPos - traceHit.HitNormal

		util.Decal( "Splash.Large", Pos1, Pos2 );

Where traceHit is of course a trace result.

I don’t know if this method works anymore, but that worked back then so it might help now.

I tried it but it doesnt work, thank you though! How does the gascan swep work? doesnt it remove the decals after they are on fire or something?

[editline]24th June 2014[/editline]

Im pretty sure i saw a PERP server do it once where you can clean blood marks

Gas can doesn’t remove decals, you just hit the decal limit and it starts removing the old ones.

The only way I can think of to remove decals would be to make your own decal system using effects and sending a message to end the effect in a certain radius, but that is a bit overkill unless you absolutely need this.