Jump to content

Select objects by id


dam034

Recommended Posts

Posted

Hi,

in the game I found 5 S.A.M. launchers, I want to select them by id in a LUA variable and set them unbreakable.

How can I do?

Thanks

dam034

I'm developing a revolution for MTASA

Posted

About getElementByID(), the wiki tells: "Note: The ID in this context is the value of the 'id' data item of the element (the id=".." attribute in the .map file), NOT the model ID, weapon ID or similiar."

I need to select in a variable all the objects which have a model ID specified by me.

Thanks

dam034

I'm developing a revolution for MTASA

Posted

You cannot modify the elements that are within the game world. You can only delete them and their LOD elements.

If I helped you, please click the like button on the right ;) Thanks!

  • Moderators
Posted

You have to create them, before you can use them.

createObject 

or use the editor*

Do you want to improve your Lua programming skills and make less mistakes?   Start with Lua Language Server!   🙀

 

  Useful functions  3x 

  Tutorials  4x 

 

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.
×
×
  • Create New...