Locking & Unlocking Doors

How can I pass the outputs of Unlock or Lock to an entity (a door), and how can I also check for those values?

**[Entity.Fire

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.Fire)**

and you can’t. Best you can do is check if it has the spawnflag at the start, then keep switching a variable when you use your locking code.

	**[Entity.HasSpawnFlags

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Entity.HasSpawnFlags)**