Scripts
207 files
-
[JS] Basic Clothes Menu
By SnakeWiz
Simple cloth menu, you can open it by pressing F2.
This script requires NativeUI library, download it from the resources tab.
It's my first resource, do not expect too much.
https://github.com/Snakewiz/ClothesMenu
2250 downloads
-
Character Creator
By Zekiloni
Hi, i'm giving this characte creator from my heart to you guys ❤️
It's on Serbian, sorry, you will get t
It's looking amazing ig, with camera and everything...
2299 downloads
-
Instructional buttons
By Captien
Hello,
I thought it would be a opportunity to introduce some basic scaleform scripts that would help out some users with their development aka. use less CEF for simple stuff.
This resource introduces the ability to give button instructions that supports controls (Meaning it'll detect your input whether its a gamepad or keyboard...).
API
You can always have a look at the Controls to get their ID. Using the resource is very simple to use and it supports different uses of customization: You can adjust style between Horizontal (1) and Vertical (-1) You can adjust background color with RGBA (Note you'll need to add it in array form) or HEX. Bulk support for buttons. new hud(style, color) /* * style: -1 for horizontal view, 1 for vertical view * color: HEX or RGBA [255, 255, 255, 255] */ hudClassInstance.addButton(title, controlID); /* * title: any text * controlID: you can find a list of controlID on wiki */ hudClassInstance.addButtons({ anyName: controlID1, anyName2: controlID2 }); /* * Bulk support for adding buttons */ hudClassInstance.removeButton(titleOrControlID); /* * titleOrControlID: remove button by its title or controlID */ hudClassInstance.removeButton(titleOrControlID); /* * removes all buttons */ hudClassInstance.toggleHud(state); /* * state: Boolean toggling visibility */ hudClassInstance.changeStyle(style); /* * style: -1 for horizontal and 1 for vertical */ hudClassInstance.setBackgroundColor(color); /* * color: HEX string or RGBA Array */ hudClassInstance.changeButtonTitle(index, newTitle); /* * index: controlID or currentButton title. (if custom button you can type its name t_buttonName) * newTitle: string */ hudClassInstance.changeButtonControl(index, newControl); /* * index: controlID or currentButton title. (if custom button you can type its name t_buttonName) * newControl: controlID or custom control (t_buttonName) */ If you have any issues, you know as usual contact me on Forums or discord. Any suggestions please add it in your review. If you liked the resource show me your support to produce some useful resources in the future.
549 downloads
-
Speedometer Script
For install just copy files to your server.
Don't forget edit index.js into client_packages if you have more resources.
Read the LICENSE.txt befor use.
6912 downloads
-
Scaleform Vehicle Spawner
By Yaann
This is a vehicle spawner menu made entirely under Scaleform, the native GUI for GTA V, based on Flash, which makes up nearly all of the displays used in the game. This menu works similar to vehicle websites in GTA Online, like Legendary Motorsport, note that this is not a modification of an existing Scaleform but a brand new custom one made entirely from scratch 👌!
I made this mostly as an exercise to mimic the games' UI functionalities by using Rockstar's own tools (and also showcase to you guys, other alternatives to opening web browsers in your game), however this is just one of the many examples that can be used with Scaleform, so I'm plaining in making more experiments with it.
This Scaleform features:
Updated vehicle list. Built-in cursor with supported mouse inputs and scroll. Multiple pages. Selectable buttons. Improved Scaleform code to handle return variables. Image import from .ytd files. Requirement but optional :
Better Clientside Commands by rootcause to call the menu on client-side but you can replace the call by a server-side command or a button prompt.
Github Repository, with the Scaleform source code included. So you can try your hands on Scaleform, it's not as hard as it looks like, trust me!
Vehicle images taken from the Rage MP Wiki and the GTA Wiki.
[Obligatory Certified Halal logo here]
966 downloads
-
SAMP Dialogs
By adri1
SA-MP Dialogs for RAGE MP (C# clientside).
This is my first resource so may contains bugs...
You must enable C# clientside!
Usage is simple: examples in Test.cs
Dialog(string dialog_name, string dialog_caption, string dialog_info, string[] dialog_buttons, string[] dialog_list_items = null, string dialog_input = null, string dialog_password_input = null)
935 downloads
-
Custom pause menu header
By hartority
This resource allows you to customize the header of the pause menu.
502 downloads
-
Sudodude's PedPicker
By sudodude
This is a simple module/script for changing the player model synced client/server. The values in the list are the model names that can be found on https://wiki.rage.mp/index.php?title=Peds. Click on a model in the list and you will switch to that model.
*F7* to open PedPicker Menu in game.
You should be able to just drop the files within the client_packages/packages directories and then add the requirements to the respective index.js files within those directories.
All source code is given from within the file download, but you can also find the repo here: AZAMOEBA_RAGE_PEDPICKER. If you are using this I'd appreciate a star or just let me know you found any of this useful. If I forgot a credit please let me know and I will get back to you and fix whatever is necessary. Enjoy!
Message for any comments/questions and I'll try to get back asap.
292 downloads
-
MC's Blackjack Mod
By MCtheBoss
~~PLEASE LEAVE FEEDBACK ON MULTIPLAYER FUNCTIONALITY~~
Hello! I'm MC, and I developed this blackjack mod from scratch. The goal was to create an interactive blackjack experience with full UI support. If you decide to give it a go, please make sure to leave some feedback as to whether it works properly or not. Thanks!
Here's a demo of the mod in action:
Features:
When a player creates a table, they will automatically be assigned the HOUSE role for that table. The house player has the following UI options:
- OPEN TABLE: If the table is currently closed, it will open the table. All tables are open by default.
- CLOSE TABLE: The table will close for all players, except for the house player. This is used to prevent players from joining a private game, or a game in progress. It can also be used to temporarily close the table for an extended period of time.
- RESHUFFLE: The tables deck is reshuffled, with all players hands being reset and the house having a new hand dealt. This reuses the same number of decks that was originally equipped with the table.
- DESTROY TABLE: Destroys the table, deleting all resources associated with it. This will close any open UI for all players currently in the table, and the house player.
- LEAVE GAME: This just leaves the table. If the house player leaves the table, the current state of the table is lost.
Clicking on any player name will 'hit' the player. Additionally, clicking on a card on the table will flip the card over.Players will only see the house's hand and their own hand. They only have the option to leave the game.
That's it! Any future adjustments to this mod will be based purely on the feedback received.
Check me out on Twitch if you ever want to catch me occasionally coding RageMP mods live, support future mod development, or if you just want to come say hi: https://www.twitch.tv/mctheboss
281 downloads
-
Scaleform Hud
By Captien
This resource introduces the well known scaleform hud for mission/heists. Makes it easy to create it in-game
Known Issues:
Mission end doesn't display black background due to unknown reason, still addressing it. API:
Client-side API
// Client side // Credits to kemper for his amazing scaleform class... /* * Creates an intro that you see on mission start. * style: int (1-20) Adds background to the intro banner * header: Mission title * subHeader: Mission secondary title */ mp.banners.createIntro(style, header, subHeader).then(done => { }); /* * Creates an objective banner * style: (1-20) Adds background to the intro banner * header: Mission title * objective: Mission secondary title */ mp.banners.createObjective(style, header, objective).then(done => { }); /* * Creates an objective banner * style: int (1-20) Adds background to the intro banner * missionName: Mission title * reason: Reason of pass/fail * passed: boolean */ mp.banners.missionResult(style, missionName, reason, passed).then(done => { }); /* * Creates an mission end banner. * style: int (1-20) Adds background to the intro banner * cashWon: Cash Earned * level: Object * { rpGain: (int), rpStart: (int), rpMin: (int), rpMax: (int), currentRank: (int), nextRank: (int), rankUpText: (string), rankUpExtraText: (string) } */ mp.banners.missionEnd(style, cashWon, level).then(done => { });
Banner Images:
Intro:
Objective
Mission Complete
Mission End
If you have any issues you know what to do....
Thanks for reading this at least....
213 downloads
-
RC-Bandito
By Captien
This resource makes you create/experience the rc-bandito. It can be used to do some spying or even suicide bomb...
// Server-side mp.vehicles.createRC(player); // Adds player to experience the bandito Controls:
INPUT_CONTEXT aka. E (Detonates the bomb) INPUT_ENTER aka. F (Returns to player) Thank to root for signing the Chinese weapon contract, and thank George men for continuous motivation...
You know what to do when you have issues (don't contact me obv.)
Thanks for reading this...
242 downloads
- captienproductions
- rc-bandito
- (and 3 more)
-
Courier
By rootcause
Requirements
You need to download & install these resources first:
NativeUI Efficient Attachment Sync
Currency API (after installing, define a currency named cash)
Installing
Put the files you downloaded in their respective places Set up some businesses and products (read below) All done
Basically
This script adds factories and buyers which sell and buy products, your job is to buy stuff from factories and sell them to buyers for profit.
Commands
/products: Accesses a vehicle's product inventory, you have to be at the back of the vehicle.
/takeproduct: Takes a product from the ground/factory.
/dropproduct: Drops a product from your hands to the ground/buyer.
JSON Files
Most of the changes are done by editing JSON files located in packages/courier/json/.
Remember to validate your changes here: https://jsonlint.com/
config.json
businessWorkInterval: Interval of the business work timer (used for factories to make product and buyers to sell product), default value is 60000.
worldCleanerInterval: Interval of the world cleaner timer (used for removing dropped products), default value is 60000.
droppedProductLife: Milliseconds a dropped product will stay for, default value is 600000.
dropProductOnDeath: If true, dying will cause players to drop the product they're carrying, default value is true.
dropProductOnDisconnect: If true, leaving the server will cause the players to drop the product they're carrying, default value is true.
vehicles.json
This file contains an object that keeps which vehicles are supported by this script in modelName: capacity format. (Vehicles List)
{ "burrito3": 6, // 6 products for burrito3 "rumpo": 6, // 6 products for rumpo "speedo": 4, // 4 products for speedo "youga": 4 // 4 products for youga }
products.json
This file contains the product information in object of objects format. A product has name, model, price, profit, businessTime, attachOffset and attachRotation properties.
name: The product's visible name.
model: Model name of the product, used for dropping and attaching.
price: Price of the product.
profit: Profit rate of the product. Price is multiplied by this value while selling products to a buyer.
businessTime: Milliseconds it takes for a factory to create one of this product/for a buyer to sell one of this product.
attachOffset: Attachment offset of the product model on player.
attachRotation: Attachment rotation of the product model on player.
// Example: Ammunition product "ammo": { "name": "Ammunition", "model": "gr_prop_gr_bulletscrate_01a", "price": 300, "profit": 1.2, "businessTime": 600000, "attachOffset": { "x": 0, "y": -0.18, "z": -0.18 }, "attachRotation": { "x": 0, "y": 0, "z": 0 } }
businesses.json
This file contains business information in array of objects format. A business has type, productType, initialStock, maxStock and position properties.
type: Business type, only factory and buyer are available.
productType: The product this business is interested in, only the values in products.json are available.
initialStock: How much product this business has on server start.
maxStock: Maximum product this business can have.
position: Location of the business.
// Example: Beer Factory & Buyer used in the video [ { "type": "factory", "productType": "beer", "initialStock": 100, "maxStock": 100, "position": { "x": 4.168992519378662, "y": 12.795921325683594, "z": 69.82928466796875 } }, { "type": "buyer", "productType": "beer", "initialStock": 0, "maxStock": 20, "position": { "x": 29.61789321899414, "y": 5.448328018188477, "z": 69.10714721679688 } } ]
businessTypes.json
This file contains business type information in object of objects format. You probably don't need to make any changes to this file, unless you want to add new business types. (which needs some scripting as well)
A business type has label and blipSprite properties.
label: Visible name, used for blip name and label.
blipSprite: Blip sprite of the business type. (Blip Sprite List)
// Example: Default business types { "factory": { "label": "Factory", "blipSprite": 615 }, "buyer": { "label": "Buyer", "blipSprite": 616 } }
Extensions
This script extends mp.Player and mp.Vehicle.
Player Functions
// Returns true if the player is carrying a product. player.isCarryingProduct(); // Returns the type of product the player is carrying, will be null if the player isn't carrying anything. player.getCarryingProduct(); // Makes the player start carrying a product. Type should be a valid product type and the player shouldn't be carrying a product, or it won't work. player.startCarryingProduct(type); // Makes the player stop carrying a product. player.stopCarryingProduct();
Vehicle Functions
IMPORTANT: Vehicles with models that are in vehicles.json automatically get an inventory when entityCreated event is called, so you don't need to use setProductInventory for them. (Unless you want to be 100% sure they have it)
// Sets the product inventory of a vehicle. newInventory must be an array created by the array constructor like "new Array(8)". vehicle.setProductInventory(newInventory); // Returns true if the vehicle has a product inventory. vehicle.hasProductInventory(); // Returns the product inventory of the vehicle, will be null if the vehicle doesn't have one. vehicle.getProductInventory(); // Adds a product to the vehicle product inventory, index must not have an item already and index must be within the bounds of product inventory array. Returns true if successful, false otherwise. vehicle.giveProduct(index, productType); // Returns the product at the specified index of vehicle product inventory, will be null if index doesn't have a product. vehicle.getProduct(index); // Removes the product at the specified index of vehicle product inventory. Returns true if successful, false otherwise. vehicle.removeProduct(index);
Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-courier
1266 downloads
-
[JS] Player Location Display ported over to javascript
A Javascript remake of https://rage.mp/files/file/461-c-player-location-display/ (all credits go to him)
Hey!
This is my first resource that I am publicly releasing.
For you all, I have ported the C# Player Location Display (https://rage.mp/files/file/461-c-player-location-display/) into JS.
Install
Place `/street` into your server's client_packages directory, then add `require("./street/index.js");` to client_packages/index.js
I know the code isn't the best optimized, please feel free to open a pull request on GitHub.
GITHUB: https://github.com/realdiegopoptart/ragemp-pld
806 downloads
-
Weapon Spawner
By rootcause
Requirements
You need to download & install these resources first:
NativeUI Weapon Component Sync Weapon Tint Sync
Installing
Put the files you downloaded in their respective places Add require('weaponspawner') to client_packages/index.js All done
Using
You can use the /weapons command to access the weapon spawner menu.
Issues
Some components might not have a visible name because Rockstar didn't give them one. Equipped component displaying might not be accurate at first but will be fixed after you apply/remove a component.
Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-weapon-spawner
1662 downloads
-
Rage Horse
By Mos
Preview video https://streamable.com/b1b0i
Github repo https://github.com/ItsMos/ragemp-horse
Horse mod for rage multiplayer Notes This replaces the 'deer' model because it is fast-moving. Horses should be synced, this doesnt work well with `online` skins, you can fix that tho, feel free to contribute. You think that you're actually riding the horse? no, think again, the horse is riding you (your ped) Usage // server code let pkg = require('ragemp-horse') let allHorses = pgk.horses, Horse = pkg.Horse // To create a horse let myPony = new Horse(position, dimension) // delete a horse myPony.delete() Press Interact button (default `E`) to mount/dismount a horse Credits Horse model converted by Quechus13224 downloads
-
Vehicle Spawner | Diamond Casino & Resort Update
I updated the "vehicleHashes.js" to the update "Diamond Casino & Resort".
Orginal version and creator of the script:
510 downloads
-
Shortcuts (Animations) on Numpad 1.0.0 Javascirpt
By HankSteiner
About this File
I used this res to create my res: Shortcuts (Animations) on Numpad 1.0.0 Before first Startup: you import db.sql in your Database and change "Yourname" in the record or leave it. I used RPC in this example, install it. My node_modules are in the archive located. Do this on Login/Startup Serverside
gm.mysql.handle.query("SELECT * FROM shortcuts WHERE name = ?", [player.name], function (err10,res10) { if (err10) console.log("Error in loadShortcuts: "+err10); if (res10.length > 0) { res10.forEach(function (shortcutData) { player.data.numpad1A = shortcutData.num1animA; player.data.numpad1B = shortcutData.num1animB; player.data.numpad1C = shortcutData.num1animC; player.data.numpad1D = shortcutData.num1animD; player.data.numpad1Name = shortcutData.num1name; player.data.numpad2A = shortcutData.num2animA; player.data.numpad2B = shortcutData.num2animB; player.data.numpad2C = shortcutData.num2animC; player.data.numpad2D = shortcutData.num2animD; player.data.numpad2Name = shortcutData.num2name; player.data.numpad3A = shortcutData.num3animA; player.data.numpad3B = shortcutData.num3animB; player.data.numpad3C = shortcutData.num3animC; player.data.numpad3D = shortcutData.num3animD; player.data.numpad3Name = shortcutData.num3name; player.data.numpad4A = shortcutData.num4animA; player.data.numpad4B = shortcutData.num4animB; player.data.numpad4C = shortcutData.num4animC; player.data.numpad4D = shortcutData.num4animD; player.data.numpad4Name = shortcutData.num4name; player.data.numpad5A = shortcutData.num5animA; player.data.numpad5B = shortcutData.num5animB; player.data.numpad5C = shortcutData.num5animC; player.data.numpad5D = shortcutData.num5animD; player.data.numpad5Name = shortcutData.num5name; player.data.numpad6A = shortcutData.num6animA; player.data.numpad6B = shortcutData.num6animB; player.data.numpad6C = shortcutData.num6animC; player.data.numpad6D = shortcutData.num6animD; player.data.numpad6Name = shortcutData.num6name; player.data.numpad7A = shortcutData.num7animA; player.data.numpad7B = shortcutData.num7animB; player.data.numpad7C = shortcutData.num7animC; player.data.numpad7D = shortcutData.num7animD; player.data.numpad7Name = shortcutData.num7name; player.data.numpad8A = shortcutData.num8animA; player.data.numpad8B = shortcutData.num8animB; player.data.numpad8C = shortcutData.num8animC; player.data.numpad8D = shortcutData.num8animD; player.data.numpad8Name = shortcutData.num8name; player.data.numpad9A = shortcutData.num9animA; player.data.numpad9B = shortcutData.num9animB; player.data.numpad9C = shortcutData.num9animC; player.data.numpad9D = shortcutData.num9animD; player.data.numpad9Name = shortcutData.num9name; }); }else{ gm.mysql.handle.query("INSERT INTO shortcuts SET name = ?", [player.name], function (insertError) { if (insertError) console.log(`[Shortcuts Init Error] ${err.message}`); if(!insertError){ gm.mysql.handle.query("SELECT * FROM shortcuts WHERE name = ?", [player.name], function (err10,res10) { if (err10) console.log("Error in loadShortcuts: "+err10); if (res10.length > 0) { res10.forEach(function (shortcutData) { player.data.numpad1A = shortcutData.num1animA; player.data.numpad1B = shortcutData.num1animB; player.data.numpad1C = shortcutData.num1animC; player.data.numpad1D = shortcutData.num1animD; player.data.numpad1Name = shortcutData.num1name; player.data.numpad2A = shortcutData.num2animA; player.data.numpad2B = shortcutData.num2animB; player.data.numpad2C = shortcutData.num2animC; player.data.numpad2D = shortcutData.num2animD; player.data.numpad2Name = shortcutData.num2name; player.data.numpad3A = shortcutData.num3animA; player.data.numpad3B = shortcutData.num3animB; player.data.numpad3C = shortcutData.num3animC; player.data.numpad3D = shortcutData.num3animD; player.data.numpad3Name = shortcutData.num3name; player.data.numpad4A = shortcutData.num4animA; player.data.numpad4B = shortcutData.num4animB; player.data.numpad4C = shortcutData.num4animC; player.data.numpad4D = shortcutData.num4animD; player.data.numpad4Name = shortcutData.num4name; player.data.numpad5A = shortcutData.num5animA; player.data.numpad5B = shortcutData.num5animB; player.data.numpad5C = shortcutData.num5animC; player.data.numpad5D = shortcutData.num5animD; player.data.numpad5Name = shortcutData.num5name; player.data.numpad6A = shortcutData.num6animA; player.data.numpad6B = shortcutData.num6animB; player.data.numpad6C = shortcutData.num6animC; player.data.numpad6D = shortcutData.num6animD; player.data.numpad6Name = shortcutData.num6name; player.data.numpad7A = shortcutData.num7animA; player.data.numpad7B = shortcutData.num7animB; player.data.numpad7C = shortcutData.num7animC; player.data.numpad7D = shortcutData.num7animD; player.data.numpad7Name = shortcutData.num7name; player.data.numpad8A = shortcutData.num8animA; player.data.numpad8B = shortcutData.num8animB; player.data.numpad8C = shortcutData.num8animC; player.data.numpad8D = shortcutData.num8animD; player.data.numpad8Name = shortcutData.num8name; player.data.numpad9A = shortcutData.num9animA; player.data.numpad9B = shortcutData.num9animB; player.data.numpad9C = shortcutData.num9animC; player.data.numpad9D = shortcutData.num9animD; player.data.numpad9Name = shortcutData.num9name; }); } }) } }) } }); if you need more contact me
377 downloads
- rpc
- Javascript
- (and 3 more)
-
Bitcoin Exchange
By rootcause
This is a small script that allows players to buy/sell bitcoins.
Requirements
Currency API (define a currency named "cash" after installing) node-fetch (after installing, go to packages/bitcoin folder, launch command prompt/powershell from shift+rightclick and write "npm install", should download it)
Installing
Drag & drop to your server files folder.
Config
The config.json file provides some options:
updateInterval - The time between BTC price updates, in milliseconds. Default value is 300000 aka 5 minutes. markerColor - Color of the markers, [r, g, b, a] format. markerRange - Range of the markers. exchangeCoords - Positions where players can buy/sell bitcoins. Default values add 2 exchange locations: Lester's house and garment factory.
Commands
buybtc [amount] sellbtc [amount] Both commands need you to be inside a Bitcoin Exchange marker.
Notes
This script does not save data (bought bitcoins etc), saving should be handled by your gamemode since Currency API provides functions for that. BTC price is provided by CoinDesk. Currency API does not support floats so players can't buy less than 1 BTC. Bogdanoff is watching384 downloads
-
[3D] Client-side Sound API.
By Captien
Description:
This resources provides the ability to create/control sound in 3D via custom API. Also demonstrates the ability to use custom urls (Radio streams). 3D sound should be synced automatically without the need of extra work.
Notes:
- This resource represents basic functioning of CEF sounds using very basic 3D implementation
- This resource becomes obsolete when RAGEMP releases 1.1 dp2 which introduces 3D sound API.
- This resource doesn't support local mp3 due to some reason with soundManager2. I'll look into it later...
- This resource doesn't support Frontend sound atm, it's really easy to implement it yourself.
API:
// Client-side // FUNCTIONS mp.game.audio.playSound3D(url, pos, volume, range, dimension) /* * url: string (Required) [Links and local package:// protocol are supported] * pos: vector3 (Required) * volume: int (Optional, Default: 1) [Range: 0 to 1] * range: int (Optional, Default: 60) [Max Range: 60] * dimension: (Optional, Default: 0) * Returns Object. * Object Properties: - id (sound's ID) - url (sound's url) - pos (sound's position) - volume (sound's volume) - range (sound's max range) - dimension (sound's dimension) - listeners (players array that are listening to the sound) - paused (If sound is paused) */ mp.game.audio.setSoundVolume(id, volume); /* * id (Sound's ID) * volume (sound's volume) Range (0.1 - 1) */ mp.game.audio.setSoundPosition(id, pos); /* * Useful for portable sound * id (Sound's ID) * pos (sound's new position) */ mp.game.audio.setSoundRange(id, range); /* * id (Sound's ID) * range (Max Range 60) (Increase it by editing the maxRange...) */ // EVENTS: /* * EventName: audioFinish * params: soundID (Sound's ID that is finished Playing) */ /* * EventName: audioError * params: soundID (Sound's ID that had error), errorObject {code: 'error code', error: 'error description'} */ // Example let sound = mp.game.audio.playSound3D('http://rfcmedia.streamguys1.com/MusicPulse.mp3', pos, 60, 1, 0); sound.destroy(); // Destroys the sound sound.pause(); // Pauses the sound sound.resume(); // Resumes the sound If you have any issues or suggestions, you know the usual routine.
Credits:
- Thanks to George for his 3D voice method.
- Thanks to soundManager 2 for bringing music to life in CEF
I wish you'll enjoy some epic music.
1237 downloads
(7 reviews)0 comments
Updated
-
Login / Register html template
By Tenchuu
https://www.dropbox.com/s/3ump4anqb45mm9x/1uJJ7nb7a9.mp4?dl=0
This is just a template for your login / register system.
1265 downloads
(1 review)0 comments
Submitted
-
[C#] Example/Wrapper for fetching world objects.
Just an example/wrapper on how to properly use "GetClosestObjectOfType" and fetch data from an object.
I've been using this in my server for a while now to make it easier to get XYZ and rotation of objects in bulk, instead of having to go through them in codewalker which can be a pain.
Installation
Move client_packages to your client_packages folder Move Serverside C#/GetWorldObjects.cs to your gamemode or script. Move objectLocations.json to your server root directory.
Usage
The JSON file included in the zip contains the pacific bank vault door as an example object. Use the /getworldobjects or /gwo command to run through all the items in the JSON file and fetch the X, Y, Z and XYZ Rotation of the object.
As of right now it'll simply log the object to your server console and continue to the next object in the list, you can extend this functionality by editing the "REMOTE_EVENT_OnWorldObjectFetched" method in GetWorldObjects.cs server-side script.
JSON file object info
public class ObjectLocation { // The model name to look for, you can fetch this from CodeWalker or RAGEMP objectdb for example. public string Model { get; set; } // The model that should replace the model at this location, optional. I personally used this to store in the database and then on server start it'd delete the world object and replace it with the object model specified here. public string ReplacementModel { get; set; } = ""; // A position within X distance of the object you want to get the data of, distance can be specified by the Radius. public Vector3 Position { get; set; } // An optional type you can pass to the method so you can use it later on for data storage purposes(eg keep objects of certain types separated by an ID) public int Type { get; set; } = 0; // The radius to find the object, doesn't have to be too precise altho I generally recommend putting the player's teleport coordinates as close to the object as possible and decreasing range to 5 or 10. public int Radius { get; set; } } [ { "Model": "v_ilev_bk_vaultdoor", "ReplacementModel": "v_ilev_bk_vaultdoor", "Type": 0, "Radius": 25, "Position": { "X": 254.2859, "Y": 225.3845, "Z": 101.8757 } }, { "Model": "another_object_model_name", "ReplacementModel": "another_object_model_name_to_replace", "Type": 0, "Radius": 10, "Position": { "X": 1234.567, "Y": 123.456, "Z": 12.345 } }, ... ] All you have to do is add more items to the JSON file and it'll run thru all of them.
150 downloads
- CS
- GetClosestObjectOfType
- (and 1 more)
(0 reviews)0 comments
Updated
-
Color Chat
By Lokote1998
This simple script gives the player a random color for the chat when he joins.
If you already have a chat, i recommend you removing it & modifying this one to make it look like your old chat or merge them.
1035 downloads
(2 reviews)0 comments
Submitted
-
Combat Helmets
By rootcause
Installing
Put the files you downloaded in their respective places Add require('combathelmets') to client_packages/index.js All done
Using
You can toggle visor/goggles by pressing F10 while on foot.
Adding More Helmets
Even though this is a combat helmet mod, you can add other helmets (such as motorcycle helmets) by editing packages/combathelmets/helmetData.json.
{ // Skin hash (mp_m_freemode_01) "1885233650": { /* Visor/goggles up drawable as key. Visor/goggles down drawable as "closed" property. Animation name as "anim" property. Available names: goggles, visor Optional "type" property for screen FX. Available types: nightvision, thermal Hat/helmet drawables: https://wiki.rage.mp/index.php?title=Male_Hats https://wiki.rage.mp/index.php?title=Female_Hats */ "117": { "closed": 116, "type": "nightvision", "anim": "goggles" }, "119": { "closed": 118, "type": "thermal", "anim": "goggles" }, "124": { "closed": 123, "anim": "visor" }, "126": { "closed": 125, "anim": "visor" } }, // Skin hash (mp_f_freemode_01) "2627665880": { /* Visor/goggles up drawable as key. Visor/goggles down drawable as "closed" property. Animation name as "anim" property. Available names: goggles, visor Optional "type" property for screen FX. Available types: nightvision, thermal Hat/helmet drawables: https://wiki.rage.mp/index.php?title=Male_Hats https://wiki.rage.mp/index.php?title=Female_Hats */ "116": { "closed": 115, "type": "nightvision", "anim": "goggles" }, "118": { "closed": 117, "type": "thermal", "anim": "goggles" }, "123": { "closed": 122, "anim": "visor" }, "125": { "closed": 124, "anim": "visor" } } }
Adding More Vehicles
You can add/remove supported vehicles by editing the vehicle animation dictionary object located in client_packages/combathelmets/index.js line 33. (vehAnimDictName object)
Issues
The animation won't be synced to other players in 0.3.7 but it should in future versions with improved task sync. FIXED IN v2.0 Visor up/down animation is used for both visors and goggles right now, even though this is a small visual thing it might be fixed in the future. FIXED IN v2.0 Players are not able to toggle visor/goggle state in vehicles right now, might change in the future. This would probably be most useful for bikes. Available on GitHub: https://github.com/root-cause/ragemp-combat-helmets216 downloads
(3 reviews)0 comments
Updated
-
DxDraw Message Bars
By Captien
DxBar messages is a light easy to use script to show some notifications for your players. Just calling one event with your custom message and colored text.
Usage:
//Server-side player.call('Createinfo', '<text>', R, G, B, 'top or bot') //Client-side mp.events.call('Createinfo', '<text>', R, G, B, 'top or bot') Images are available at the old topic in forums, due to inability to restore them. (images will be added asap).
166 downloads
(2 reviews)0 comments
Updated
