Spezi01

RageMP Mapping

Recommended Posts

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 by Spezi01
  • Like 1

Share this post


Link to post
Share on other sites

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 :P

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 by McWulf1991
Schreibfehler

Share this post


Link to post
Share on other sites

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!

 

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites
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ß

Share this post


Link to post
Share on other sites
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ß

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.