Jump to content

[HELP] CLOSE THIS TOPIC


Kazafka

Recommended Posts

  • Moderators

No, element-userdata-values are not elements. They are just references to the real elements and they are not re-use able when converted to a string. Use ID's to make that link. https://wiki.multitheftauto.com/wiki/SetElementID

 

 

You could also save it as a map and load it as a map.

 

local parent = createElement("vehicleParent")

local vehicle = createVehicle(...)

setElementParent(vehicle, parent)

local file = xmlCreateFile("saved.map", "map")
if file then    
 saveMapData ( file, parent)    xmlSaveFile ( file )    
 xmlUnloadFile ( file )
end

https://wiki.multitheftauto.com/wiki/SaveMapData

Edited by IIYAMA
Link to comment
20 minutes ago, IIYAMA said:

No, element-userdata-values are not elements. They are just references to the real elements and they are not re-use able when converted to a string. Use ID's to make that link. https://wiki.multitheftauto.com/wiki/SetElementID

 

 

You could also save it as a map and load it as a map.

 


local parent = createElement("vehicleParent")

local vehicle = createVehicle(...)

setElementParent(vehicle, parent)

local file = xmlCreateFile("saved.map", "map")
if file then    
 saveMapData ( file, parent)    xmlSaveFile ( file )    
 xmlUnloadFile ( file )
end

https://wiki.multitheftauto.com/wiki/SaveMapData

Thank you, but I resignated :(

And as a map? I couldn't save it as a map, because I have one.

I'll rather make just a pay-n-spray

Edited by VaporZ
Link to comment
  • Moderators
12 minutes ago, VaporZ said:

And as a map? I couldn't save it as a map, because I have one.

You can resave the map root out of:

https://wiki.multitheftauto.com/wiki/LoadMapData

Or duplicate when loaded with the meta.xml:

https://wiki.multitheftauto.com/wiki/GetResourceMapRootElement

 

17 minutes ago, VaporZ said:

I'll rather make just a pay-n-spray

Good luck!

 

Link to comment

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...