Garry's mod gates open by team

So what i want are these gates: to open when a certain team DRIVES up to them. Anyone got code for that? Or can tell me how i can do it.

How about you learn to do it yourself.

Well if i knew how / could find out how i probably wouldn’t ask? :slight_smile: Why make a shit reply when you cant actually help?

He said “how about you learn to do it yourself” and you say if you knew how/could find it(how to do it yourself?) his link links to that.
edit: oops doesn’t link to that, this does tho:

Either way I assume you could create some entity that is located there and ENT:Touch( entity ) check if the entity is a vehicle, if it is, check if the driver is correct job, if it is, then probably do Fire: on that entity( maybe ents.FindInSphere ), I am not sure; I’m just trying to help but you are quite rude because you come to the developer forum and asks someone to write a script for you, then you are rude when you get pointed in the right direction. edit: wasn’t pointed in the right direction
this message is a mess now, sorry I will see if I can help write a script for that, what map is it

You could make a simple entity, that would be placed both before and after the gate.

In the ENT:Think, you could have a ents.FindInSphere, as Busan1 said, and check if the entity around it (probably 15 units) is a vehicle, and the driver’s team is correct, you would ENT:Fire.

That would prevent the driver being forced to touch the gate with their vehicle, adding a sense of realism.

Looks like rp_evocity_v4b1, or a variant of the V4B1 map.

Its a custom verison of rp_evocity_v33x and thanks mindfull and busan i will try something :slight_smile:

Also heres a pic ture of the gate in chat you can see its *439 and it does work. But it needs a code to fire.


[editline]25th April 2015[/editline]


This is probably dumb(i never use hammer) but set up a trigger an point that to a console command thing which just does a “lua_run someswagteamcheckingcode”


He’s been making his PERP server for a month or two now, but lacks Lua knowledge so any of his posts are most likely about PERP.