Scripts
207 files
-
Vending Machine Script (C#)
By JAYT
Source code : https://github.com/J4YT/RAGE-Multiplayer-Vending-Machine-Script
Only works in combination with the Attachment Sync resource. (see below)
Requires Rage 1.1 to work.
424 downloads
(1 review)0 comments
Updated
-
Inactive Car Despawner after Timer
This is written in NodeJS, and is only Server Side!
With this Script, all Vehicles, which are not moved are despawned after X minutes.
NOTE: Code and comments on english
Video (english explenation):
Installation:
Put the folder in your packages directory
424 downloads
(2 reviews)0 comments
Submitted
-
DialogUI
By davidsl6
Need some dialog menus with 2 buttons, for example to show user your server's rules and 2 buttons, "accept" and "not accept"?
DialogUI can help you with that!
Example of using:
const dialogUILib = require('dialogui'); // Load the library var dialog = new dialogUILib.DialogUI("My Title", ["Line number 1", "Line number 2","Line number 3"], "Left Button", "Right Button"); // Make a new instance of dialogUI. dialog.show(); // Show the dialog Your players use enter and escape keys? DialogUI support them.
You can know which button is pressed by using the OnDialogResponse client-side event, which have 1 parameter of type Boolean, which indicate if the left button pressed.
402 downloads
-
Car Compare (0-100, 0-200, Vmax)
By MrGenzo
Copy folder to "client_packages" and add
require("./genzocarcompare"); to your "client_packages/index.js";
392 downloads
(1 review)0 comments
Submitted
-
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
-
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)
-
Bounding Box
By Zekiloni
Simple script to get dimensions of any entity (object, vehicle, ped), center of entity and corners.
Also you can draw bounding box.
373 downloads
- Clientside
- Entity
- (and 2 more)
-
Better Keybinding
By araynimax
This module saves you some time on bindings keys.
Read more here:
366 downloads
-
Better Instructional Buttons
By Kar
NB: This include does not entirely work like the original.
NB: The class is now called instructionalButtons instead of hudManager.
NB: This include also includes a more advanced version of the BasicScaleform class by kemperr, just called ScaleForm now.
v2.0.0
- Added instructionalButton.hasControl(control).
- Added instructionalButton.getButtonCount().
- Removed the padding of 10.
- Added RGB support (instead of just RGBA... alpha defaults to 180 for RGB).
- Revamped the structure used to store buttons (it was dumb before, wasting variables and not making use of Javascript features).
v1.0.2
- You can now alter any instructional button without it being redrawn/shown to you (Basically you can edit them, without them popping up on your screen, forcefully).
- Added instructionalButton.changeButtonControl(title, new_control).
v1.0.1
- Fixed the an issue where when using multiple instructional buttons multi script wide, if one button count was more than others, the buttons would show up across different instructional buttons.
- Removed support for hex colours with a #. Now to use a colour, just use 'FF00FF'. Using # here is a waste of time.
v1.0.0
- Fixed instructional buttons rendering last button created on the client only.
- Instructional buttons background now default to black, if no colour was used.
- A padding of 10 is now set on horizontal instructional buttons.
- Support for custom button names.
- Added instructionalButton.changeButtonTitle(control, new_title).
- Added instructionalButton.isActive().
- Example:
const instructions = require('/better_instructions'); const horizontalInstructionList = new instructions(-1); horizontalInstructionList.addButton('Create Roadblock', 'M'); horizontalInstructionList.addButton('Right', 175); horizontalInstructionList.addButton('Left', 174); if(!horizontalInstructionList.isActive()) { horizontalInstructionList.toggleHud(true); } setTimeout( () => { if(horizontalInstructionList.isActive()) { horizontalInstructionList.toggleHud(false); } }, 10000); /* Vertical Instructions */ const verticalInstructionList = new instructions(1, 'ff000'); modShopInstructions.addButton('Toggle RAGE Menu', 'F2'); if(!verticalInstructionList.isActive()) { verticalInstructionList.toggleHud(true); } setTimeout( () => { if(verticalInstructionList.isActive()) { verticalInstructionList.toggleHud(false); } }, 10000);
Original Include
- Credits go to Captien for the original release.
362 downloads
-
2D Text Edtior
By ynhhoJ
This script will allow you to quickly and easily work with 2D text in the game.
Contributions:
rootcause
Captien
micaww
In 1.0.5 update Scale-X and Outline of 2D text doesn't work and idk where's problem, because i can't fix it...
360 downloads
-
Soundviewer
By Flashrex
Just a simple js-script that let you play every sound in the following list and gives you info about the current sound on the bottom of the screen:
https://wiki.rage.mp/index.php?title=Sounds
Install:
Simply drop the files in your client-packages folder and merge the index.js with your index.js.
How to use:
Type /s or /sound to activate/deactivate it.
Use Left-Arrow, Right-Arrow to navigate trough the sounds.
Credits:
Thanks to n0minal and his interior Resource with which i learned how to create commands in js.
355 downloads
(3 reviews)0 comments
Updated
-
Cef Safe Zone
By ufteers
Hello ragers.
This script allows you to use the GTA safe zone in the browser. An example is seen in the video.
340 downloads
(2 reviews)0 comments
Updated
-
Simple Camera - Typescript
By DevGrab
Here is my written Camera Class for RAGEMP. You can easy implement this file into your client-sided Scripts and use it pretty powerful.
//Create Camera CameraEditor.createCamera("Login", new mp.Vector3(-1549.810546875, 1679.3438720703125, 106.20653533935547)); CameraEditor.setCameraActive("Login"); //Interpolate Camera CameraEditor.setCameraInterpolate("Login", new mp.Vector3(-1561.000732421875, 1685.904296875, 102.0960693359375), new mp.Vector3(-1563.254150390625, 1683.891845703125, 102.28447723388672), 30000); //Destroy Camera CameraEditor.destroyCamera("Login");
greeting DevGrab
340 downloads
(1 review)0 comments
Submitted
-
Client-Side Packet encryption
By kemperrr
About This File
This package contains a full implementation of client-side packet encryption for RAGE 0.3.7 which obviously doesn't have build-in encryption for packages.
Includes packer like webpack (with watch mode), import/export from ES6 (thanks https://github.com/alangpierce/sucrase) and picking packages from node_modules
To use the script, you'll need to have hands and installed node js.
Idea behind?
The idea behind was to make it hard as possible to block leakers/leechers copy client-side scripts. And it works!
Security issues?
Make sure that you send your encryption key from server to client with encrytion enabled, so people cannot sniff your key to decrypt your files. Even tho, it should be possible to dump the script-files from memory, but this progress will still not make sense, since noone puts such effort into it.
How start work?
Steps:
unpack zip archive to root server folder (path like a 'game-server/src_client') Open terminal in src_client directory Enter npm install or yarn in terminal Enter npm run watch or yarn watch to start watching 'src_client/sourcecode' directory Complete, now u can edit files in 'src_client/sourcecode' directory
Enjoy!
334 downloads
-
Disabling props(hats/glasses) knock off
By H5tred
Basically this file disables props being knocked off the player by any possible damage. I remember that when i tried by script it didn't work, i haven't checked the one by script in a while, but I m assuming it still doesn't work.
If the one by script works just delete this resource.
How to use , just paste the content of the zip in your server files in client_packages\game_resources !
If you have other questions/suggestion regarding what can be edited from the files from the games, feel free to contact me on discord Cricket#1276 !
325 downloads
(3 reviews)0 comments
Submitted
-
Debug Script v1.0
By OvO
Hello community,
this is an very simple but powerful and useful script for finding out Positons around the GTA-5 map for easier for example Placing Bilps.
Changelog: - 02/03/2019: Release Current functions: - Show your position Ingame. - Show your Position in the Console Log. How to use: - Press F2 to see your Position Ingame. - Type as command /pos to see your Position in the console.
I will release soon an update with more functions for the debug section.
visit my Github for more projects! GitHub Profile
311 downloads
(1 review)0 comments
Submitted
-
Playerlist (C#)
By rgnbgnhnd
This is a C# port of the Player List script by rootcause.
-small.gif
All credits go to root for the actual resource and the description, which i just yoinked and slightly altered.
Source code will be available on github oneday...
310 downloads
-
Simple Chat Advert
By MorHo
Simple Chat Advert
basically it'll prints out whatever you want into to chat.
Please do not change the code edit just config.json
308 downloads
(0 reviews)0 comments
Updated
-
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
-
Shooting Range
By GL1TCH1337
This script provides working(not perfect) shooting range. You can try it with /poligon command but if you want to add it to your server. You should edit it a bit.
Features
Random target spawn points.
Changing interval between targets.
20 - 45 targets left: 3000 ms 10 - 20 targets left: 2500 ms 0 - 10 targets left: 2000 ms Points based on hit area (not working perfect)
Script testing video
281 downloads
(6 reviews)0 comments
Updated
-
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
-
AwardAPI
By rootcause
This script lets you create awards/achievements and give them to players.
Installing
Put the files you downloaded in their respective places Add require('awards') to client_packages/index.js Open packages/awards/database.js and put your MySQL config All done
API - Exported
You need to load awards/api.js in your script with using require() for these.
/* awardDefinitions object contains all defined awards. Keys of this object are valid award IDs. */ awardDefinitions /* Defines an award. Awards can be single or multi tier depending on what you send to requiredProgress. If you send an array of numbers, it will be a multi tier award. (then tierColor must be an array of numbers too, tierColors length being the same as equiredProgress length) If you send a single number, it will be a single tier award. (then tierColor must be a single number too) Check out https://wiki.rage.mp/index.php?title=Fonts_and_Colors#HUD_Colors for tierColors values. (107, 108, 109, 110 are great) You can search for mpawards in OpenIV/CodeWalker Explorer for txdLib and txdName, or send an empty string to txdLib and txdName if you don't want to use an icon. This function returns true if award is created, false otherwise. */ defineAward(ID, name, description, txdLib, txdName, requiredProgress, tierColor) /* Returns the specified award's tier for the specified progress. You must increase the return value by 1 if you want to display it to players. Returns: -2 if award ID is invalid -1 if progress isn't enough for any tier 0 and above if progress is enough for any tier */ calculateAwardTier(awardID, progress) /* Returns the specified award's icon color for the specified tier. Return value will be -1 if award ID is invalid. */ getAwardTierColor(awardID, tier)
API - Player
/* This property contains the award data and should be used for getting values. Keys of this object are the award IDs that player has any progress on. player.awardData[validAwardID] properties: - Progress (number) - Tier (number) - IsComplete (boolean) - CompletionDate (date, null if award isn't complete) */ player.awardData /* Sets the specified award's progress to the specified amount. Returns false if awardID is invalid, true otherwise. */ player.setAwardProgress(awardID, progress) /* Changes the specified award's progress by the specified amount. Returns false if awardID is invalid, true otherwise. */ player.changeAwardProgress(awardID, progress) /* Resets the specified award's progress. Returns false if awardID is invalid or player doesn't have any data about the specified awardID, true otherwise. */ player.resetAwardProgress(awardID) /* Resets all award progress. Doesn't return anything. */ player.resetAllAwardProgress() /* Saves award data. You don't need to add this to your script's playerQuit event because AwardAPI will save data when a player disconnects. */ player.saveAwards()
Serverside Events
/* playerAwardTierChange This event is called when a player's award's tier changes. */ mp.events.add("playerAwardTierChange", (player, awardID, oldTier, newTier) => { // code }); /* playerCompleteAward This event is called when a player completes an award. */ mp.events.add("playerCompleteAward", (player, awardID) => { // code });
Example
This script creates 2 awards (one single tier and one multi tier), progresses them when certain events happen, sends a message to players when one of their awards has a tier change or completion and provides some commands.
const awardAPI = require("../awards/api"); /* Multi tier award, will be complete when a player dies 1000 times. 1 deaths - tier 1 (bronze) 10 deaths - tier 2 (silver) 100 deaths - tier 3 (gold) 1000 deaths - tier 4 (platinum) */ awardAPI.defineAward("award_unlucky", "Unlucky", "You keep dying, be careful!", "mpawards5", "killmeleeweapons", [1, 10, 100, 1000], [107, 108, 109, 110]); /* Single tier award, will be complete when a player writes something to the chat. */ awardAPI.defineAward("award_chat", "Baby's First Words", "You used the chat.", "", "", 1, 110); // Events mp.events.add({ // Increase player's "award_unlucky" progress by 1 when a player dies. "playerDeath": (player) => { player.changeAwardProgress("award_unlucky", 1); }, // Set player's "award_chat" progress to 1 (since its max. progress is 1) when a player writes something to chat. "playerChat": (player) => { player.setAwardProgress("award_chat", 1); } }); // Commands mp.events.addCommand("howunlucky", (player) => { // example: check if player has any progress for award_unlucky, display a message based on completion if (player.awardData["award_unlucky"]) { if (player.awardData["award_unlucky"].IsComplete) { player.outputChatBox("You're extremely unlucky."); } else { player.outputChatBox(`Not too unlucky, just ${player.awardData["award_unlucky"].Progress} deaths...`); } } else { player.outputChatBox("You're pretty lucky for now."); } }); mp.events.addCommand("setawardprogress", (player, _, awardID, progress) => { // example: "/setawardprogress award_unlucky 1000" will complete "unlucky" achievement player.setAwardProgress(awardID, Number(progress)); }); mp.events.addCommand("changeawardprogress", (player, _, awardID, progress) => { // example: "/changeawardprogress award_unlucky 5" will add 5 progress to "unlucky" achievement player.changeAwardProgress(awardID, Number(progress)); });
277 downloads
(2 reviews)0 comments
Updated
-
Attachments editor
By PepeCortez
V2
Menu to show and select between all bones avaliable (https://wiki.rage.mp/index.php?title=Bones) Camera focus on the bone you select. Added more keys to edit the object. Menu to edit or remove objects that were already placed. Object information save on *attachments.txt* on serverside. Keys
/attach [object_name] · Command to start editing the object. TAB · Key to open the menu to edit objects placed. Enter · Key to finish the editing the current object. Cancel · Key to cancel the editing the current object. Space · Key to reset the pos and rot the current object. R · Key to change mode between pos and rot. L · Key to change the camera's fov. UP | DOWN · Edit pos/rot X the current object. LEFT | RIGHT · Edit pos/rot Y the current object PageUp | PageDown · Edit pos/rot Z the current object. Shift · Increase speed the editing. AltLeft + X · Reset pos/rot X the current object. AltLeft + Y · Reset pos/rot Y the current object. AltLeft + Z · Reset pos/rot Z the current object. Notes
Also on GitHub: https://github.com/1PepeCortez/Attachments-editor
274 downloads
(2 reviews)0 comments
Updated
-
Attached Bike Sync
By Gibzon
Attach a player to bmx, cruiser or scorcher bike
optional downloads:
https://de.gta5-mods.com/vehicles/lowrider-bike-add-on-replace
https://de.gta5-mods.com/vehicles/forever-28-inches-bike-add-on-extras
Installing
extract attachedBike folders to packages/attachedBike and client_packages/attachedBike if you allready have a index.js in your client_packages: add "require('attachedBike')"
Usage
Press "G" - Attach/Unattach player to/from bike Spawn a Cruiser: /bike Spawn a Bmx: /bike bmx Spawn a Scorcher: /bike scorcher optional mod bikes:
/bike yj28 /bike lowriderb
Notes
GitHub: https://github.com/Yoegibby/ragemp-attachedBike
272 downloads
(3 reviews)0 comments
Updated
-
BlockVPN
BlockVPN NodeJS Resource
Purpose
Block players from joining if they are on a VPN or proxy. About
This resource uses GetIPIntel which is a free service that calls their API with the IP address and returns the likelihood of it being a VPN or proxy. The recommended threshold to block is 0.99 and above; any lower and you may get false positives. Requirements
request (NodeJS Module) GitHub
The resource GitHub can be found here.266 downloads
(0 reviews)0 comments
Updated
