Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/02/20 in all areas

  1. Hey there, I had quite a headache trying to figure this out so I figured I'd make a tutorial to help other people. Tools required OpenIV — http://openiv.com/ ArchiveFix —http://gtaforums.com/topic/871168-affix-fix-your-rpf-archives-and-work-without-openiv/ Initialising ArchiveFix Firstly you'll want to fetch the keys for ArchiveFix (afix) to do so download and unpack the ArchiveFix package. Open Command Prompt and type (replace with where you unpacked ArchiveFix) cd E:\ArchiveFix then open GTA 5 and let it sit on the loading screens, return to your command prompt and enter archivefix.exe fetch this may take some time to fetch the encryption keys, as it depends on your CPU power. Just be patient and let it do its job. After you've successfully acquired all the encryption keys, we can move on. Afixing and using Add-on vehicles We'll start by finding a modification from here: https://www.gta5-mods.com/vehicles/tags/add-on Once you have found your modification of choice (I'll be using this: https://www.gta5-mods.com/vehicles/mazda-rx7-c-west) Inside the archive (/Add-on/) there is a file called readme.txt — inside it references the modification as <item>dlcpacks:\rx7cwest\</item> So we won't append dlc_* to our folder name. Navigate to your ArchiveFix root directory and create a new folder with the name of the modification (rx7cwest) and inside create the following folders: "oldrpf", "newrpf" and "unpack" Move the dlc.rpf from the downloaded mods archive to the newly created "oldrpf" folder. Using OpenIV navigate to the /rx7cwest/ folder inside our ArchiveFix root, making sure you're in EDIT MODE right click the dlc.rpf and 'Save Contents/Export' select the /unpack/ folder we just created. Navigate inside /unpack/ copy all the unpacked folders into /newrpf/. Drag and drop any subsequent *.rpf files inside /newrpf/ onto ArchiveFix.exe Using OpenIV create a new dlc.rpf file inside /newrpf/ and drag all the afixed files from inside /newrpf/ (make sure you don't copy the new dlc.rpf file) into the dlc.rpf inside OpenIV Drag the new dlc.rpf file onto ArchiveFix.exe to encrypt it Create a new folder inside RageMP's /server-files/client_packages/dlcpacks/ called /rx7cwest/ (remember the actual add-on's name dictates the name of this folder) and drag the new dlc.rpf inside. Making use of the new mod Start your server, and connect to it you will download the new /dlcpacks/ files, and then once it reconnects automatically close the game. Reconnect to the server and spawn the new vehicle by typing the hashname (if you're not sure, you can check the setup2.xml file inside dlc.rpf) in this case it is "rx7cwest" Credits nobodyltu Lokote1998 Splak George
    1 point
  2. Hey guys. Back in January I've started working on this gamemode. It never seen the light since it was never finished. 8 Jobs: Bus Driver, Pizza Driver, Detective, Lawyer, Car Jacker, Taxi Driver, Trucker (not completed) 2 Factions: Medics and Cops. Has a 'half-dynamic' faction system. Easy to add another one. Inventory with trading. Personal vehicles with unlimited slots that can be bought from the vip store. House system. Clothes system that are saved (Bug: Props aren't seen by other players) YouTube MP3 (Needs another API Token from them) -- you can play music for others, in your vehicle or play a song from youtube in the club for everyone inside. Uses MongoDB for database. Here are the pictures: (They are included in the github repo) https://ibb.co/bmjz9GL https://ibb.co/0JcjBMq https://ibb.co/NpQ1kj3 https://ibb.co/LRzsY0w https://ibb.co/CK5ZY9M https://ibb.co/ZLBBY6b https://ibb.co/6HR0hRZ https://ibb.co/TW27pvK https://ibb.co/Q6KHXxs Known bugs: After completing the trade, the vehicle keys aren't sent to the new owner. Login buttons sometimes during restarts not being clickable (Had a few windows issues back then, can't prove it was me or smth else) The chat is built inside the Vue Web Application. Sometimes if you spam the chat long enough the last event to unfreeze your character isn't sent. And maybe more. The server didn't had huge bugs but I'm advising you guys to either use it just as a resource or test it from head to toe again before using it on a public server. Feel free to contribute to the gamemode on github if you fix anything. The gamemode language is English. I'm sorry for my grammar mistakes in the gamemode. I'm not a native english speaker. https://github.com/Hurdock/gta5-ragemp-server Common bugs & how to fix them
    1 point
  3. Hello RAGE Beast's! I want to write this tutorial instead of releasing my packages with the Ped-Syncing, so people wont get spoonfeeded and everyone who can code and use brain, can reconstruct what i've done in many hours of work. In this tutorial i just want to show, or explain, the basics of syncinc peds for everybody at the server. First of all we need to start thinking about, what we need, and how we can realize our idea of syncing them. I've started to get more knowledge about how pedestrians work on GTA and how i can control the activities of what they do.. so i've sit down.. working hours on studying natives, functions, behaviour and some more stuff about how to get "life" into a spawned ped object. At the start i've just controlled them client-sided.. playing animations, let them walk around.. and such stuff. After this i came to the conclusion that i'll not get far in programming with the given functions GTA5 handles to me.. Since we've no direct access to the engine / internals of GTA i've need to build my own "AI" to make the Peds "think" what they do. The restriction of not having access to control internal stuff is starting at directly receive informations what the ped is doing.. which animation is tasked.. and s lot of other problems who popped up. So i've sit down again, starting to construct new classes.. kind of creating my own Controling-Class of my Peds, instead of using RAGEMP's one. You can use RAGEMP's "mp.peds.new" but i just wanted to make clear, i'm using my own stuff. The controlling class is working with the Natives of GTA5. So the class manage to spawn peds and directly put the handle into a class-object which contains all informations of what i do with them.. positions, animations, flags (walking, running, random walking).. Since we've a unique ID for each ped, we can control them via ID's and our Control-Class has the ability to pick out those ID's and control the single ped. Since everything is stored in the class.. we need to start working on functions which give our Peds an own AI. First of all we need to know math (vectors, cos / sinus / tan), thanks to RAGE and GTA we've also got ray-casting. At this tutorial i'll just explain how to let them walk in one direction... with a "random" heading (15°-20°) to left or right.. Kind of a "human" natural walk. Since ped.getHeading() isnt that accurate for our AI.. we need to use our own "heading" variable.. so i've just popped it into my Ped-Class.. and we also need to check the "old" and the "new" position of where the Ped should work. Let's store the "old" position before we set a new one. this.oldPos = new mp.Vector3(this.handle.getCoords(false).x, this.handle.getCoords(false).y, this.handle.getCoords(false).z); After this we create our "random" heading. To the "old" heading we add the needed "left" or "right" pitch. So we create a temporary variable storing our old heading in it and add a random value. var randomHeading = this.oldHeading + ((Math.random() * 1.0) - 0.5); this.newHeading = randomHeading; You need to think about that we're using cos/sin and to make sure that you know we're working inside of a coordinate/vector system. (x/y/z) So you need to think about the relations about degree and single steps inside of a coordinate system. (1 is a unit of length) After this we're going to calculate the new position in relation to your null-point (the player) so we pick our "new" heading and multiply it by 3. (1 unit is like 1 ingame meter) var headingX = Math.cos(this.newHeading) * 3; var headingY = Math.sin(this.newHeading) * 3; Since we've got your range from direct null-point we need to add those headingX / headingY to your real player coordinates. (x / y) var position = this.handle.getCoords(false); this.newPos = new mp.Vector3(position.x + headingX, position.y + headingY, position.z); Since Z is the same and remains the same.. we dont need a tan. So we've got our "new" position out of this calulcation. After this we're going to check if the new position is traceable / ray-cast.. so we check if the ped is running / walking against a wall or not. You can find this function inside the RAGE Wiki. (raytrace) If there is no object between the old position and the new position.. you can set the ped walking at the position. If there is something between the old and new position.. You'll need to take care to walk or recalculate the path. At my point, i've just set the heading * 2. if (isTraceable(this.oldPos, this.newPos)) { this.walk(new mp.Vector3(position.x + headingX, position.y + headingY, position.z)); this.oldHeading = this.newHeading; this.position = this.newPos; } else { this.oldHeading = this.newHeading * 2; this.randomwalk(); } So the rest of the other stuff, you can do it.. if you know where we are at the current point. We've done our client-side stuff.. so we need to go over how to sync the ped with the players. The biggest question is how to get the sync between the server and the client. Since we're storing all information about our ped at our client.. we need to send it to the server.. but we need to take care that we don't spam the server with our informations and also take care to send smallest infos as possible.. think about that there could be hundret of players who send informations.. so take care of resources. The red dots are the peds of other users.. as client.. we dont need to send the informations of them to the server.. since they're controlled by another user. The green dots are the peds of our user.. as client.. we need to send the informations to the server.. cuz we control them. The blue dots are all peds stored at the server.. which contains informations.. (ids, positions, ...) the server sends the information the the clients The orange dots are all peds who aren't created at the client-side and theyre from other users.. so you need to create them and update the information of them. I decided to just send the unique ID and the position data and also the flags to the server.. At the server we've got also a class with the informations.. kind of we build at our client. We need some functions to check if the unique ID already exists.. and if we can update the informations or if we need to destroy the element and stuff. If there is no ID at the server, the server will update the sended informations of the client and send all the informations to each other player on the server, who is in range the ped. (virutal ped, since the position is server-sided) This is the first step of preventing the server using too much bandwidth/stress. When the server sends the data to each client.. the clients need to check if the ID of the ped exists on their client.. if not, create the ped and store the informations send by the server to the ped-object class. Also check if the ped you've created is client-side or server-side. Since we dont need the data of your own peds the client-side has been created. So to put everything together: Your client creates peds.. they're local. You just stream the information of your OWN peds to the server.. while this happens.. the server send the information of other player peds to you. If you dont got the ped with the unique ID created.. you need to create the ped and update the informations you've got.. so let the ped wak to xyz.. update models,.. health... I hope with this non-spoonfeed tutorial i helped you a bit.. Ask question if you want.. Thank you! :)
    1 point
  4. RAGE Multiplayer 1.1 is the new version based on 1.0-DP1, with almost 200 bug-fixes from 1.0 just in the last few weeks of pre-public testing and cool new features such as synchronised NPCs and more! So far, a tiny part of 1.0 known as "DP#2" has been delayed in favour of earlier and way more stable 1.1-DP1 release. DP2 requires more time with QA and you will get updated on that accordingly. Today's release means you will get immediate access to a public Windows Client/Server testing build branch aimed for server developers and for testing, you won't be able to join public 0.3.7 servers with this branch. Resources Updated: drastically improved streaming performance of encrypted game resources, also improved ram usage on heavy dlcpacks. Made encryption of game resources independent of individual system information, so you can keep redistributing huge files separately. Added support for overloading whole default dlcpacks (previously this would've caused "undefined" behaviour). Re-implemented the server resource scanner with better parallelisation of compression/encryption and the whole process (e.g. time required to scan and cache in the server memory 6GB of assets (LC-IV and VC to V map conversions bundle) has been decreased from >30s to 8-10s on test machine) Made client launcher and in-game resource verification multi-threaded. Added an ability to register raw game assets (i.e., you could decrease dlcpacks weight using this), example: /client_packages/game_resources/raw/infernus2.ytd. Synchronization Updated: synchronisation extrapolation is now optional, toggle-able through server config: "'enable-synchronisation-extrapolation': true". It's disabled by default (recommended for gamemodes when any desynchronisation caused by that latency is important though) in 1.0, this was always enabled in earlier releases, and the difference is it's just optional now. A few optimisations have been implemented for the new synchronisation. Security Ported 0.3.7’s latest anti-cheat/security mitigations, optimisations and additional useful branch changes that have not been ported yet. Implemented more multiplayer memory protections measures. Improved client-side package management code protection. Implemented additional cheating protecting over C# client-side scripting runtime API. Added "server-side-weapons-only-mode" to synchronise only weapons that have been given to the player by the server and not client-side script (which features it's own protection measurements too, which is why this option is disabled by default). API Added: out of the box (experimental) server-sided static and dynamic (synchronised) peds. Dynamic peds are synchronised/controlled by the player that your gamemode manually assigns and can be reassigned at any moment. let dynamicPed = mp.peds.new(mp.joaat('mp_m_freemode_01'), mp.players.at(0).position, {dynamic:true}); dynamicPed.controller = mp.players.at(0); let staticPed = mp.peds.new(mp.joaat('player_zero'), mp.players.at(0).position, { dynamic: false, // still server-side but not sync'ed anymore frozen: true, invincible: true }); Basic footage of peds on-foot sync (Franklin NPC shown in static mode): Cops AI/ped driving synchronisation: Added: server-side player.kickSilent, useful for quick reconnects, debugging and such (the client will act as if it's been timed out). Added: client-side cancellable event incomingDamage(sourceEntity, sourcePlayer, targetEntity, weapon, boneIndex, damage). Added: client-side cancellable event outgoingDamage(sourceEntity, targetEntity, targetPlayer, weapon, boneIndex, damage). Added: client-side dummyEntityDestroyed(entity, dummyType). Added: mp.Pool.getClosestInDimension(position, dimension[, numberOfEntities]); only server-side. Added: client-side event entityControllerChange(entity, newController) for peds and vehicles. Added: client-side mp.game.weapon.unequipEmptyWeapons. C# API: renamed server-side "Client" to "Player" to match other APIs. C# API: implement client-side-like entity pool APIs (e.g., RAGE.Entities.Players - yes, it *already* uses RAGE namespace like client-side API instead of "API" or "NAPI"). C# API: add UIMenu.SetMenuData and UIMenuItem.SetItemData which lets you link your own data to items to make menu handling logic simpler. C# API: Fixed incorrect boolean results in a few client-side methods. C# API: Added: AddSubMenu(UIMenu menu, string text, string description, System.Drawing.Point offset) overload. C# API: Added missing client-side 1.0 methods to C#. C# API: Fixed a naming mistake in RAGE.Game.Gxt. C# API: Fixed NAPI.Task-related issue. C# API: Added missing enums hashes. C# API: Updated vehicle seats enum. C# API: Updated vehicleData.json. C# API: Added support for custom vehicleData.json: name your file "vehicleData.custom.json" to use it instead (useful for add-on vehicle servers). C# API: Added missing IncomingConnection event. C# API: Fixed System.EntryPointNotFoundException. C# API: Fixed NAPI.Command not being available. C# API: Changed Entity.GetSharedData return type to object from dynamic. C# API: Added server-side player.Heading (with setter as well), fixed player.SetRotation. C++ API: Server: Increment SDK version (so it gives plugin incompatibility warning when it should). NodeJS API: Updated to NodeJS to v13.1.0. NodeJS API: Fixed NodeJS issues happening since 1.0/v13. NodeJS API: Fixed entity.setVariable and other related issues. NodeJS API: Fixed --inspect option not being handled by NodeJS. JS API: Changed mp.Pool.forEach behavior back to how it worked in 0.3 to prevent potential crashes; added mp.Pool.forEachFast for fast (but not entity.destroy()-safe) lookups (how it used to work in 1.0/1.1 initially). Other 1.50 game patch compatibility (the current public stable branch has already been updated to 1.50 (The Diamond Casino Heist Update) and was done in less than 5 hours after release - that's a new record for game's major patches!). Huge networking library optimisations - live 1800+ players server stress tests on an actual "feature-rich" gamemode with that optimisations ported to an experimental 0.3.7 server showed roughly ~10x networking performance improvements, possibly delivering even more effect on higher-end CPUs. Fixed a server memory leak (which occurred most often when there was a single player on the server, but other cases were possible also). Optimised client-side shared data getters for both scripting runtimes. Fixed nametag rendering jitter when target player is in a vehicle on high speed. Wine Launcher compatibility improvements (still can't get in the game at this stage though). Fixed bug that caused a ped to get duplicated after a model took too long to load. Added long string support for nametags and text labels. Updated Chromium to 79.0.3945.117. Fixed playerCreate/RemoveWaypoint client-side event. Updated server-side .NET Core to 3.1. Fixed client-side C# senseless "error" being logged into 'clientside_cs.txt' once on every initialisation. Update localisations: added Indonesian and Thai languages; updated a few other localisations. Fixed some of game limit adjustments not being applied correctly resulting in undefined behaviour. Fixed a few legacy crashes. Fixed updater image so configs don't get overwritten. Launcher: Fixed launcher storage.json being overwritten. Launcher: Fixed CEF debugger port not being saved when changed through launcher. Known Issues (ones that we didn't consider breaking and decided to not delay public testing because of them - they will be fixed before stable release though) There are a few cases when vehicle synchronisation might get "glitched" (like tyres state desync or unexpected unoccupied synchronisation behaviour). "trailerAttached" server-side event is not currently functioning exactly like it did in 0.3.*. Timeout reconnect might require manual rejoin through F1. Peds API is still at experimental stage and there are a few issues being worked on right now (mostly related to smoothing streaming). You might just crash 😶 And a few more bugs, to be listed once BugTracker goes online 0.3.7 compatibility guide Make sure your server-side resources use correct seat IDs (it starts from 0, not -1 anymore) C# only: Make sure to update GetData syntax (in most of cases you can just autoreplace "GetData(" with "GetData<object>(" for exact 0.3.7 behavior). C# only: "Client" got renamed with "Player". C# only: Vehicle occupants API now returns Entity instead of Player - that's because 1.1 synchronized peds could be vehicle occupants too C# only: EntityCreated/Destroyed events now pass Entity argument instead of NetHandle Optional: Make sure to use RGSC IDs instead of RGSC Nicknames Make sure to implement new chat API initerface. 0.3.7-.1.1 compatibility wrapper (CEF code): let api = {"chat:push": chatAPI.push, "chat:clear": chatAPI.clear, "chat:activate": chatAPI.activate, "chat:show": chatAPI.show}; for(let fn in api) { mp.events.add(fn, api[fn]); } 0.3.7 plugins should be removed from /plugins/, it's not compatible. Moreover, both "bridge.dll" and "rpfencrypt.dll" are redutant: C# API doesn't require a plugin to work. DLCPack files should be moved from /client_packages/dlcpacks to /client_packages/game_resources/dlcpacks. If required, custom server-sided gameconfig.xml (/client_packages/game_resources/common/data/gameconfig.xml) could be used. Don't confuse "/server-fiiles/ragemp-server.exe" (1.1) with "/server-files/server.exe" or "/server-files/dotnet/" with "/server-files/bridge/" Review all your custom synchronization code, some parts might be redutant with 1.1 More may follow, be sure to check this again if you find incompatibility issues. Download Branch name is "10_mNwuchuQ4ktWbR8d2N5jUzRt". If you don't know what to do with this, you probably don't need this. We only recommend you download this branch if you are comfortable with testing experimental features and software. 1.1 bugs and issues should only be reported where it's explicitly allowed and nowhere else.
    1 point
  5. Hello Guys, Welcome again to another tutorial. Very simple, when you climb on top of the vehicle it activates and does not let you fall. Client-side: mp.events.add('render', gameplay); function gameplay() { const player = mp.players.local; if(player.isHangingOnToVehicle()){//do not fall off the vehicle player.isRagdoll(); player.setRagdollFlag(2); } } good day to you PS:google traduction
    0 points
×
×
  • Create New...