0905: toggle_door/set_door opcode in LUA?

Recommended Posts

Hi, it is possible to use GTA SA opcode 0905(set door object to close, or open) in LUA script? Or how can I create door object(by script), and get possibility to continue script by add options for set this door closeable, or set this door openable?

Share this post

Link to post
45 minutes ago, CodyJ(L) said:


Will freeze the door entirely. 

I saw that yesterday, but I fear this can freeze door in other than closed position. If so, I would need code to check door rotation, but I don't know how dynamic object "swingdoor" is seen by game (does it know present rotation angle of this object).

I know it's possible to do with "lockdoor" object(player can't open this door, door are open only when player get to interior(in SP)), because I saw that on some server, where player can buy apartment, and lock or unlock door(interior isn't in heaven like normal intriors, just in normal SA world).

Edited by ravebean

Share this post

Link to post

If I recall correctly, setElementFrozen will immediately reset the door's rotation to closed position so you don't have to worry about it freezing in the wrong rotation.

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.