Cinema Restrict an area

Is there a way I can restrict people from entering the VIP area on theater_nexmultiplex_1m map?

Thanks in advance.

Check if the ents are a player, if they are, and they aren’t VIP, move them to the spawn or kill them or something. You also need to find the coordinates for the ‘VIP area’.

Or you can just create a static prop at the enterance if you want nobody in there.

Take a look at the serverside hooks here. Add a hook to PrePlayerEnterTheater using the example code that’s commented out. Returning false will prevent the player from being added to the theater’s player list, thus preventing them from receiving the videos, etc. Then you can handle whether you want to teleport them somewhere or just respawn them. Privileged theaters use the THEATER_PREVILEGED enum for its flag.

if(SERVER) then
function VIP ()
for k, v in pairs(ents.FindInBox( Vector(x,y,z), Vector(x2,y2,z2) )) do
if v and v:IsValid() then
if( v:EV_GetRank() == “vip” || v:EV_GetRank() == “admin” || v:EV_GetRank() == “superadmin”)
v:PrintMessage( HUD_PRINTCENTER, “Welcome, " … v:Nick() … " !”)

v:PrintMessage( HUD_PRINTCENTER, “You can’t enter in this area.”)
v:SetPos(Vector(x,y,z)) – Teleport the player at this location on the map
hook.Add(‘Think’, ‘vip’, VIP);

But this will spam messages.
It’s better to use gamemode hooks.

Please add me on steam, “Daniels1771”