SuperM Posted October 14, 2019 Posted October 14, 2019 Hello there, I need some help because I have no clue on how to prevent for example item id 1569 object (ADAM_V_DOOR) from open when punched. If you place it on the map and you punch it, it will open, but when it returns to is original position if you punch it will not open, how can I prevent it from open al the time, I need it to block th entrance and for that it can't move.
Moderators IIYAMA Posted October 14, 2019 Moderators Posted October 14, 2019 (edited) @SuperM Open your map file in your text editor. Search for the id. And give the node the attribute: frozen="true". (Check if the attribute is already added) Add it like that: (don't copy/past) <object frozen="true"></object> https://wiki.multitheftauto.com/wiki/Element/Object Edited October 14, 2019 by IIYAMA Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
SuperM Posted October 14, 2019 Author Posted October 14, 2019 (edited) 12 hours ago, IIYAMA said: @SuperM Open your map file in your text editor. Search for the id. And give the node the attribute: frozen="true". (Check if the attribute is already added) Add it like that: (don't copy/past) <object frozen="true"></object> https://wiki.multitheftauto.com/wiki/Element/Object Hello there and thanks you so much for your help! I still have a problem, at the moment I'm getting the object position from database and the line of code is this one: local Object = createObject(row["objectID"], row["X"], row["Y"], row["Z"], row["RX"], row["RY"], row["RZ"]) and my output to the server is the following one: 1569, 1796, -1744.5, 12.6, 0, 0, 180.5 So if if i was scripting it it should look like this: createObject ( 1569, 1796, -1744.5, 12.6, 0, 0, 180.5 ) How can I add those Frozen parameter to it? I mean I was checking the page https://wiki.multitheftauto.com/wiki/CreateObject and there is no option for it. Edited October 14, 2019 by SuperM 1
SuperM Posted October 14, 2019 Author Posted October 14, 2019 (edited) . Edited October 14, 2019 by SuperM
JustinMTA Posted October 15, 2019 Posted October 15, 2019 Maybe put something like an invisible ped or object behind the door to block it from opening I can do 3D vehicle/object mods and basic scripts from scratch, contact me for free help!! Skype/Discord/Telegram: [email protected] / Justin|X5|#0977 / @JustinX5 Xtreme 5 Gaming - COMING SOON! I'd love it if more people in MTA utilized these amazing features, so please ask me anything related to 3D modeling/basic scripting/etc. The expert knows more and more about less and less until they know everything about nothing.
Moderators IIYAMA Posted October 15, 2019 Moderators Posted October 15, 2019 8 hours ago, SuperM said: How can I add those Frozen parameter to it? With: https://wiki.multitheftauto.com/wiki/SetElementFrozen Do you want to improve your Lua programming skills and make less mistakes? Start with Lua Language Server! Useful functions 3x Spoiler checkPassiveTimer getScreenStartPositionFromBox getPedGender Tutorials 4x Spoiler Scaling DX Events Attach an addEventHandler on a group of elements Debugging
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now