Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 12/11/19 in Posts

  1. Links Webseite: https://www.inf-reallife.de/ Forum: https://www.inf-reallife.de/forum/ Social Media Facebook: https://www.facebook.com/InfinityReallife/ Twitter: https://twitter.com/InfReallife Youtube: https://www.youtube.com/c/InfinityReallifeServer
    1 point
  2. OwlGaming is the place to be tbh. You are able to roleplay whatever your heart desires. Some things that are common and interesting to play as is a blue or white collar worker, a gang or mafia member, law enforcement or even a politician running for office! The limit is truly your imagination, you can build your own empire with fellow players, create factions, work independently or for others, open a store/company, and much more. I've been playing OwlGaming for a few years now, ever since it was on Multi Theft Auto (a multiplayer platform like RageMP, but for GTA SA). Owl has been around for 2014 and has stood the test of time.
    1 point
  3. Disclaimer: If you dont know where to start, please go to: So, you got NodeJS and Visual Studio Code running? Good, let's start coding! Step 1: Files RESOURENAME is a placeholder. Name id how you want your Resource should be called, like Roleplay-Gamemode. Open Visual Studio Code in the C:/RAGEMP/server-files/packages folder. Then, create a folder named RESOURENAME (Change that). In that folder, we create a file called index.js. At that point, Visual Studio Code should look like this: Step 2: Making a base In RESOURENAME create a file called commands.js Now head to index.js and type in following: require("./commands.js"); With that statement, we tell our resource that it should load the file called commands.js. You can to that even for folders, like: require("./commands/vehicleCommand.js"); Step 3: Lets code! Javascript is a script language. That means, we don't need much constructers. Lets use that!: We want to make the simplest and most helpfull command: A /vehicle command! How we do that? Well, if you got into javascript, its not complicated. With the power of autocomplete, try to achieve following: mp.events.addCommand("vehicle", (player, vehicle) => { }); So, mp is a const. That means, its a variable that we cant change. events is a property of mp. And addCommand is a method. addCommand has the following usage: mp.events.addCommand(commandName, (player, args) => { }); commandName is self-explaining, player too. But whats args? args are our aguments. That means, we can add howmany we want. Our command above will be executed like this: /vehicle VEHICLEHASH //example: /vehicle Alpha So, got that? Lets move on! Now we want that a vehicle spawns if we use that command, todo so: mp.events.addCommand("vehicle", (player, vehicle) => { mp.vehicles.new(mp.joaat(vehicle), player.position); }); So, like before, mp is our const, vehicles is a property of mp. And new is a method. same for mp.joaat(). mp is our const, and joaat is a method that returns a number. player is a variable, and position a property. position is from type mp.Vector3. Vectors are positions in RAGEMP, and our function mp.vehicles.new has the following usage: mp.vehicles.new(model, position, options?); Whats options? ? If a variable has a ? behind, that means its optional. So you dont need to set that. Lets safe everything, and it should work! If you got questions, look at the Wiki! (https://wiki.rage.mp/index.php?title=Main_Page) Here are some usefull Wiki pages: https://wiki.rage.mp/index.php?title=Getting_Started_with_Commands https://wiki.rage.mp/index.php?title=Getting_Started_with_Client-side https://wiki.rage.mp/index.php?title=Getting_Started_with_Events Stay tuned for Part 3!
    1 point
×
×
  • Create New...