Hello,
the map my server is running on has special doors which should only be accessed by certain teams, e.g: Police or Firefighters. The Police and Fire Department also have gates.
I wish to open these gates if the player is in the area(vector) altough i don’t know how to detect this.
my code so far:
local policedoors = {
{Vector(-8656, 9392, 314), '*59'},
{Vector(-8656, 9680, 314), '*60'},
}
local function gateDoorspolice
for k, v in pairs(policedoors ) do
for _, ent in pairs(something with sphere? i don't know.) do
if (ent:IsDoor() && ent:GetModel() == v[2]) then
ent:Fire("lock", "", 0);
end
end
end
end
Should i use some kind of hook here? would think be okay?