Spezi01 Posted November 11, 2018 Share Posted November 11, 2018 (edited) Hello everyone, i was a huge fan of SA:MP and scripted some stuff and now i started scripting in Rage MP last week and already got some usable results. Now i want to map some stuff and get it into my server, but i have some problems. The first problem is to find the right mapping tool. The Map Editor from notsosmart, which is downloadable here at RageMP is not working, probably because it is not compatible with the newest GTA V Update. After some googeling i got the Mapping Tool from CodeWalker and the one from Menyoo. I startet with CodeWalker, which is a little bit complicated on first use, but i played a little bit with it and spawned some cars and saved the .ymap file, so that i can try to integrate it into my RageMP Server. My Problem is, i don't know how to integrate/convert the ymap file into my server. I googled for a solution and searched in the forum, but i couldn't find anything. If someone would describe step by step how to do that, i would be very thankful. The second mapping tool from Menyoo was easier to use and i spawnt some cars and saved the .xml file. I tried different xml to json converters from the internet and the one, which is downloadable at RageMP, and copied the JSON Files i got from the different Converters into my maps folder and my server says that the .json is loaded, but non of them worked. When i connect to my server and go to the position where i mapped the cars, the cars aren't there/didn't spawn. If someone could explain how i get the XML from Menyoo into working JSON Files for RageMP, it would be great. And lust but not least, i have question: Which is the best way of spawning cars in RageMP, when i want to do some stuff with them, e.g. check if the player who wants to get in Vehicle XY is a cop and authorized to use the car. Thank you very much! Sorry for my bad english, i'm from Germany. Edited November 11, 2018 by Spezi01 1 Link to comment Share on other sites More sharing options...
TheStronght Posted November 20, 2018 Share Posted November 20, 2018 ymap? dlcpack friend Link to comment Share on other sites More sharing options...
McWulf1991 Posted December 2, 2018 Share Posted December 2, 2018 (edited) Hey I try to write it in english, so everyone could understand me Especially for cars, i used some Clientside Javascript. Here is my Example: mp.vehicles.new(mp.game.joaat("neon"), new mp.Vector3(246.3203, -377.455, 44.65885), { heading: 20 , numberPlate: "ADMIN 1", color: [[50, 3, 160], [50, 2, 144]] }); So nun auf Deutsch: Extra für Autos die an einer bestimmten Stelle spawnen habe ich diesen Codeabschnitt verwendet. Kann dir gerne mal die komplette Datei schicken (mit Index) wenn du was brauchst Bin zwar Laie aber das hat mir zumindest geholfen nicht immer mit Befehlen zu hantieren (Adminbefehle und so :D) Falls noch fragen offen sind kannst du mich gerne per PN anhauen @Spezi01 Greets McWulf PS: Hab auch mal in meiner Admindatei geschaut, Lösung zum Fahrzeugspawnen ist folgende, allerdings brauchst du eine entsprechend aktualisierte vehicleData.json und dieser Code ist in C# geschrieben. [Command("auto", "~y~VERWENDUNG: ~w~/auto [Fahrzeugname] [Farbe 1] [Farbe 2] um ein Fahrzeug zu erstellen.")] public void CMD_SpawnCar(Client player, string vehName, int color1 = 1, int color2 = 1) { VehicleHash vehHash = NAPI.Util.VehicleNameToModel(vehName); if (vehHash != 0) { NAPI.Player.SetPlayerIntoVehicle(player, NAPI.Vehicle.CreateVehicle(vehHash, player.Position, player.Rotation, color1, color2), -1); SendAdmMsg(player, "Du hast erfolgreich folgendes Fahrzeug erstellt : ~o~" + vehName.ToUpper()); return; } else { NAPI.Chat.SendChatMessageToPlayer(player, "~r~FEHLER: ~w~Es gibt kein Fahrzeug mit folgendem Namen: ~o~" + vehName); return; } else SendNoPermMsg(player); } Edited December 2, 2018 by McWulf1991 Schreibfehler Link to comment Share on other sites More sharing options...
Spezi01 Posted December 4, 2018 Author Share Posted December 4, 2018 Hallo, vielen Dank für die Antwort! Mein Befehl zum Autos spawnen sieht so aus: mp.events.addCommand('veh', (player, veh) => { if(!veh) return player.outputChatBox("Syntax: /veh [vehicle]"); if(player.data.adminlevel >= 4) { pos = player.position; pos.x += 2; var NewVeh = mp.vehicles.new(veh, new mp.Vector3(pos)); NewVeh.dimension = player.dimension } else { player.outputChatBox("Du bist kein Admin oder dein AdminLevel reicht nicht aus!") } }); Wenn ich so aber ein Auto spawne ist das unkaputtbar, ich frage mich wieso. Hast du oder sonst jemand eine Idee? English: The code shows my command for spawning a car, but the spawned car is not destroyable with guns. Does anybody know why? Thanks a lot! Link to comment Share on other sites More sharing options...
xForcer Posted January 13, 2019 Share Posted January 13, 2019 Topic bump! I would also like to know how to import custom maps made with Code Walker. I realised I should make dlcpacks, but I don't know how. Is the tutorial for affixing vehicle addons the same for map objects? Link to comment Share on other sites More sharing options...
Spezi01 Posted January 24, 2019 Author Share Posted January 24, 2019 https://rage.mp/forums/topic/3261-tutorial-how-to-add-ymaps-into-your-server-client-sided-stable-mapping/ Here is a Tutorial for creating a dlcpack. If i remember right, the dlcpack has to be bigger than 5KB to work properly. Link to comment Share on other sites More sharing options...
TobseN Posted January 25, 2019 Share Posted January 25, 2019 Am 4.12.2018 um 17:44 schrieb Spezi01: Hallo, vielen Dank für die Antwort! Mein Befehl zum Autos spawnen sieht so aus: mp.events.addCommand('veh', (player, veh) => { if(!veh) return player.outputChatBox("Syntax: /veh [vehicle]"); if(player.data.adminlevel >= 4) { pos = player.position; pos.x += 2; var NewVeh = mp.vehicles.new(veh, new mp.Vector3(pos)); NewVeh.dimension = player.dimension } else { player.outputChatBox("Du bist kein Admin oder dein AdminLevel reicht nicht aus!") } }); Wenn ich so aber ein Auto spawne ist das unkaputtbar, ich frage mich wieso. Hast du oder sonst jemand eine Idee? English: The code shows my command for spawning a car, but the spawned car is not destroyable with guns. Does anybody know why? Thanks a lot! Ganz einfach. NewVeh.Invincible = false; Gruß Link to comment Share on other sites More sharing options...
Siman Posted January 25, 2019 Share Posted January 25, 2019 Tutorial stable mapping Link to comment Share on other sites More sharing options...
Spezi01 Posted January 28, 2019 Author Share Posted January 28, 2019 Am 25.1.2019 um 10:42 schrieb TobseN: Ganz einfach. NewVeh.Invincible = false; Gruß Hallo und erstmal vielen Dank für die Rückmeldung! Das ganze sieht jetzt folgendermaßen bei mir aus: mp.events.addCommand('veh', (player, veh) => { if(!veh) return player.outputChatBox("Syntax: /veh [vehicle]"); if(player.data.adminlevel >= 4) { pos = player.position; pos.x += 2; var NewVeh = mp.vehicles.new(veh, new mp.Vector3(pos)); NewVeh.dimension = player.dimension NewVeh.Invincible = false; } else { player.outputChatBox("Du bist kein Admin oder dein AdminLevel reicht nicht aus!") } }); Funktioniert aber leider nicht, hab mit nem Raketenwerfer drauf geschossen und nichts ist passiert. Gruß Link to comment Share on other sites More sharing options...
TobseN Posted January 29, 2019 Share Posted January 29, 2019 vor 14 Stunden schrieb Spezi01: Hallo und erstmal vielen Dank für die Rückmeldung! Das ganze sieht jetzt folgendermaßen bei mir aus: mp.events.addCommand('veh', (player, veh) => { if(!veh) return player.outputChatBox("Syntax: /veh [vehicle]"); if(player.data.adminlevel >= 4) { pos = player.position; pos.x += 2; var NewVeh = mp.vehicles.new(veh, new mp.Vector3(pos)); NewVeh.dimension = player.dimension NewVeh.Invincible = false; } else { player.outputChatBox("Du bist kein Admin oder dein AdminLevel reicht nicht aus!") } }); Funktioniert aber leider nicht, hab mit nem Raketenwerfer drauf geschossen und nichts ist passiert. Gruß Es kann sein das die Fahrzeuge immer unzerstörbar sind wenn niemand drinne ist. Teste es mal indem du reingehst und versuchst es kaputt zu machen. Link to comment Share on other sites More sharing options...
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