Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Called when a player attempts to unlock an entity.
- function PLUGIN:PlayerCanUnlockEntity(player, entity)
- if (Clockwork.entity:IsDoor(entity)) then
- local shop = player:GetCharacterData("shop")
- local shopNumber = string.sub(Clockwork.entity:GetDoorName(entity), 8)
- if (shopNumber == shop) then
- return true;
- end;
- end;
- end;
- -- Called when a player attempts to lock an entity.
- function PLUGIN:PlayerCanLockEntity(player, entity)
- if (Clockwork.entity:IsDoor(entity)) then
- local shop = player:GetCharacterData("shop")
- local shopNumber = string.sub(Clockwork.entity:GetDoorName(entity), 8)
- if (shopNumber == shop) then
- return true;
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement