MxAgent Posted October 16, 2008 Share Posted October 16, 2008 (edited) Hey, Currently converting my big RPG-Server from SA-MP to MTA. And now the question is: In the Wiki there is a solution for seperate files for the cars: http://development.mtasa.com/index.php?title=Resources "" But whicht root-element is required in the vehicle-list.xml and in which file goes ""? Can i also write this into mymap.map? regards, fabian Edited October 17, 2008 by Guest Link to comment
Willy Posted October 16, 2008 Share Posted October 16, 2008 "" goes in the meta.xml (as it says on the link you posted). You can also put the vehicles in a .map file (same syntax as an .xml file but mta recognises it as a map) and you would put in your meta.xml (if your vehicles file was called vehicles.map). Your map file may look like this: <map> <vehicle model="400" posX="1710" posY="-1354" posZ="13" rotX="359" rotY="5" rotZ="3"/> </map> which would place a vehicle at the given position and rotation, of the specified model. Add more tags to add more vehicles. Link to comment
MxAgent Posted October 17, 2008 Author Share Posted October 17, 2008 Yea.. i know that But okay.. maybe i need to reword my question: I want multiple files for my cars (one for each RPG-User). Currently we're 3 Users. But each player added about 50 cars.. So I want separate files... For example: vehicles_player1.xml, vehicles_player2.xml or whatever.. So how to "split" the cars out of the main .map file in separate files? Regards from Germany, Fabian Link to comment
Ace_Gambit Posted October 17, 2008 Share Posted October 17, 2008 These are the functions you are probably interested in the most. http://development.mtasa.com/index.php? ... _functions Link to comment
[UVA]Bart Posted October 19, 2008 Share Posted October 19, 2008 i have done something like this but not as a map file i just used a xml file then looped through vehicle node and find the subnode "id" once you found that then create the vehicle it worked ok for me but took for ever creating the xml mine looked something like this <vehicles> <vehicle id="333" posx="blah" posy="blah" posx="blah" rotx="blah" roty="blah" rotz="blah description="name of vehicle" myid="1" /> </vehicles> Link to comment
TimJ Posted October 25, 2008 Share Posted October 25, 2008 i just stuck all mine in a lua file and used: createVehicle ( model, x, y, z, rx, ry, rz ) Link to comment
Ace_Gambit Posted October 25, 2008 Share Posted October 25, 2008 i just stuck all mine in a lua file and used: createVehicle ( model, x, y, z, rx, ry, rz ) That's one way of doing it. It is however advised to use map files for things like vehicles. Link to comment
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