Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnStart()
- {
- AddEntityCollideCallback("Handle", "AreaConnect", "AttachLever", true, 1);
- }
- void AttachLever(string &in asParent, string &in asChild, int alState)
- {
- SetEntityActive("Lever", true);
- PlaySoundAtEntity("", "pickaxe_charge.snt", "Lever", 0, false);
- SetEntityActive(asParent, false);
- SetEntityActive("Mount", false);
- }
- void UnlockDoor(string &in asEntity, int LeverState)
- {
- if(LeverState == 1) {
- SetSwingDoorLocked("Door", false, true);
- PlaySoundAtEntity("", "unlock_door.snt", "Door", 0, false);
- SetLeverStuckState(asEntity, LeverState, true);
- }
- }
- void Puzzle(string &in asEntity, int LeverState)
- {
- if(GetLeverState("Lever1") == -1
- && GetLeverState("Lever2") == 1)
- {
- SetPropHealth("Door", 0);
- SetLeverStuckState("Lever1", -1, true);
- SetLeverStuckState("Lever2", 1, true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement