Advertisement
Guest User

Open / Close Snippet

a guest
Sep 22nd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. function ENT:Use( activator, caller ) -- If a player uses this entity, play an animation
  2. if ( !self.Opened ) then -- If we are not "opened"
  3. self:ResetSequence( "open" ) -- Play the open sequence
  4. self.Opened = true -- We are now opened
  5. else
  6. self:ResetSequence( "close" ) -- Play the close sequence
  7. self.Opened = false -- We are now closed
  8. end
  9. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement