Mudbill

Key Unlocks Door Script (Amnesia)

Feb 11th, 2013
2,366
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void OnStart()
  2. {
  3. AddUseItemCallback("", "Key", "Door", "UseKeyOnDoor", true);
  4. }
  5.  
  6. void UseKeyOnDoor(string &in asItem, string &in asEntity)
  7. {
  8. SetSwingDoorLocked(asEntity, false, true);
  9. PlaySoundAtEntity("", "unlock_door.snt", asEntity, 0, false);
  10. RemoveItem(asItem);
  11. }
RAW Paste Data