Door system?

Can someone give me some pointers on how to make a door system, where you buy the door and no one but you can lock and unlock it. Kinda like DakRP. And I have no clue how I would start this so any help at all would be appreciated.

I assume you already have a currency system, so I will just explain how I would implement the rest.

You can make a menu pop up whenever you press +use on a door (GM:PlayerUse); First you check who the owner of the door is. If the player owns the door, make the menu have the items “Lock” or “Unlock”, else if nobody owns the door set a menu item for “Buy”.

The rest can be handled with console commands.

Yes, I do have a currency system. Thanks for for the help. And what type of console commands? And if anyone has any other pointers let me know please.

ent_fire [Door ent name here] lock

Yes, though this is the lua section, so this would be:
[lua]ent:Fire(“lock”, true)[/lua] or something like that.

[lua]
Door:Fire( “lock”, “” , 0 )
[/lua]
Fixed it for you.