139 files

  1. BanAPI

    Ban system that supports temporarily/permanently banning names, social club names, IP addresses and HWIDs.
     
    Installing
    Put banapi into your server's packages directory Open banapi/database.js and put your MySQL config All done  
    API
    /* getUnixTimestamp() Returns the current Unix timestamp. */ mp.bans.getUnixTimestamp() /* formatUnixTimestamp(unixTimestamp) Converts a Unix timestamp to "day/month/year hour:minute:second" format. Returns a string. */ mp.bans.formatUnixTimestamp(unixTimestamp) /* add(value, banType, reason, endUnixTimestamp) Adds a ban to the bans table, the ban will be permanent if endUnixTimestamp is -1. You need to provide the value like a player's serial, IP or name. endUnixTimestamp must be seconds, NOT milliseconds. Just use the provided getUnixTimestamp() This won't terminate the banned player's connection. Can be used for offline banning. Returns a promise. */ mp.bans.add(value, banType, reason, endUnixTimestamp) /* banPlayer(playerID, banType, reason, endUnixTimestamp) Bans the specified player, the ban will be permanent if endUnixTimestamp is -1. The script will get the value, you just need to provide a player ID and ban type. endUnixTimestamp must be seconds, NOT milliseconds. Just use the provided getUnixTimestamp() This will terminate the banned player's connection. Returns a promise. */ mp.bans.banPlayer(playerID, banType, reason, endUnixTimestamp) /* getInfo(banID) Gets information about the specified ban ID. Returns a promise. */ mp.bans.getInfo(banID) /* remove(banID) Removes the specified ban ID from the bans table. Returns a promise. */ mp.bans.remove(banID)  
    Ban Types
    0 = Name ban, player's current name will be banned. (player.name property) 1 = Social Club name ban, player's current social club name will be banned. (player.socialClub property) 2 = IP ban, player's current IP address will be banned. (player.ip property) 3 = HWID ban, player's current HWID will be banned. (player.serial property)  
    Example Commands
    /* Usage: /ban 5 0 60 Take a break Will nameban the player ID 5 (if there is a player with ID 5) for 60 minutes with the reason "Take a break". */ mp.events.addCommand("ban", (player, _, target, type, minutes, ...reason) => { target = Number(target); type = Number(type); minutes = Number(minutes); let fullReason = reason.join(' '); let targetPlayer = mp.players.at(target); if (targetPlayer) { mp.bans.banPlayer(targetPlayer.id, type, fullReason, mp.bans.getUnixTimestamp() + (minutes * 60)).then((banID) => { player.outputChatBox(`Banned ${targetPlayer.name} with the reason '${fullReason}' for ${minutes} minutes.`); console.log(`${player.name} banned ${targetPlayer.name} for ${minutes} minutes. (${fullReason}) BanID: ${banID}`); }).catch((err) => { player.outputChatBox(`Error occurred while banning ${targetPlayer.name}.`); player.outputChatBox(`Error: ${err.message}`); }); } else { player.outputChatBox(`No player with the ID ${target} found.`); } }); /* Usage: /baninfo 3 Will show information about ban ID 3 (if it exists) */ mp.events.addCommand("baninfo", (player, banID) => { banID = Number(banID); mp.bans.getInfo(banID).then((banInfo) => { if (banInfo) { player.outputChatBox(`Ban Information (BanID ${banInfo.ID})`); player.outputChatBox(`Type: ${banInfo.Type}`); player.outputChatBox(`Value: ${banInfo.Value}`); player.outputChatBox(`Reason: ${banInfo.Reason}`); player.outputChatBox(`Is Permanent: ${banInfo.LiftTimestamp == -1}`); if (banInfo.LiftTimestamp > -1) player.outputChatBox(`Ends: ${mp.bans.formatUnixTimestamp(banInfo.LiftTimestamp)}`); } else { player.outputChatBox(`BanID ${banID} expired or doesn't exist.`); } }).catch((err) => { player.outputChatBox(`Error occurred while getting BanID ${banID}.`); player.outputChatBox(`Error: ${err.message}`); }); }); /* Usage: /removeban 5 Will remove the ban with specified ID (if it exists) */ mp.events.addCommand("removeban", (player, banID) => { banID = Number(banID); mp.bans.remove(banID).then((success) => { if (success) { player.outputChatBox(`BanID ${banID} is now history...`); } else { player.outputChatBox(`Couldn't remove BanID ${banID}, probably expired or doesn't exist.`); } }).catch((err) => { player.outputChatBox(`Error occurred while removing BanID ${banID}.`); player.outputChatBox(`Error: ${err.message}`); }); });  
    Notes
    This script will handle banned players when they join. (kick if they're still banned, remove ban if their ban expired) Don't use JS timestamps as they are milliseconds, use the provided mp.bans.getUnixTimestamp()

    329 downloads

       (1 review)

    0 comments

    Submitted

  2. Wasted Screen

    Installing
    Put the files you downloaded in their respective places Download & install Scaleform Messages if you haven't yet, this script needs it Add require('wasted') to client_packages/index.js All done Notes
    This script will make the players wait 8 seconds before spawning at the closest hospital. This script was not tested on a gamemode with custom death behavior, you might want to do some changes. Video Preview
     

    688 downloads

       (3 reviews)

    1 comment

    Updated

  3. 2D Text Edtior

    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...

    247 downloads

       (3 reviews)

    2 comments

    Updated

  4. Synced Vehicle Indicators

    Installing
    Put the files you downloaded in their respective places Add require('indicators') to client_packages/index.js All done Controls
    Numpad 4 - Toggle left indicator Numpad 6 - Toggle right indicator

    650 downloads

       (3 reviews)

    0 comments

    Updated

  5. [C#] Custom Timer - Server & Client

    With this script you can easily create custom timer.
    The file is fully commented and should be easy to understand.
    The file in Shared is required - and then use either the file in Server or in Client depending on where you are using it.
    You have to use the constructor to create the timer.

    Examples:
    Examples: // Yes, the method can be private // private void testTimerFunc(Client player, string text) { NAPI.Chat.SendChatMessageToPlayer(player, "[TIMER] " + text); } void testTimerFunc() { NAPI.Chat.SendChatMessageToAll("[TIMER2] Hello"); } [Command("ttimer")] public void timerTesting(Client player) { // Lamda for parameter // new Timer(() => testTimerFunc(player, "hi"), 1000, 1); // Normal without parameters // new Timer(testTimerFunc, 1000, 1); // Without existing method // var timer = new Timer(() => { NAPI.Chat.SendChatMessageToPlayer(player, "[TIMER3] Bonus is da best"); }, 1000, 0); // Kill the timer // timer.Kill(); }  

    325 downloads

       (3 reviews)

    0 comments

    Updated

  6. Sky Camera

    This script allows you to move the game camera in the air and back like in GTA:ONLINE
     
    Installation:
    Download file. Unzip folder into your client_packages. Add require('MoveSkyCamera/index.js'); to client_packages/index.js. Usage:
    Calling on serverside
    player.call('moveSkyCamera', [player, moveTo, switchType, showGUI]); Calling on clientside
    mp.events.call('moveSkyCamera', player, moveTo, switchType, showGUI); Reference:
    player = Ped; player handle moveTo = String; 'up' or 'down' switchType = Int; 0, 1, 2 or 3 0: 1 step towards ped 1: 3 steps out from ped (Recommended) 2: 1 step out from ped 3: 1 step towards ped showGUI = Boolean; Show chat and minimap during camera movement? Note: When using param moveTo as 'down', it's not necessary to add switchType and showGUI.
    Examples:
    mp.events.addCommand('movecam', (player) => { // Make camera to go up in to the sky player.call('moveSkyCamera', [player, 'up', 1, false]); // After 5 seconds, camera start to go back to player. setTimeout(() => { player.position = new mp.Vector3(0,0,10); // Set your position if you want player.call('moveSkyCamera', [player, 'down']); }, 5000); });  

    561 downloads

       (2 reviews)

    0 comments

    Updated

  7. FireDepartment

    I made this script for beginners in c# so they can hopefully learn someting for it.
    I'm not a pro in programming but i hope i can help someone with it.
    I did not test this with other players but it should work.


    Commands:
    /teleport  "to get to the fire department" /start1 "on the white colshape to start a fire" /stopfireid "to stop the fire or just extinguish it."
    When you are on a mission you can heal your self on the green colshape.
    When you start a fire it random selected one of the 6 main spawn points from that point it random create new spawn points and check if its reachable for the player.

     

     

    406 downloads

       (0 reviews)

    0 comments

    Updated

  8. Global Voice Chat

    The most trivial example usage of the recently introduced built-in voice chat API: global chat. It connects you to all players when you join the server and vice-versa.

    Press F4 to toggle local player's muted state.
     
    As of 24th Oct 2018 you need to use "testing_voice" branch to utilize voice chat API.

    539 downloads

       (5 reviews)

    0 comments

    Updated

  9. Bigmap

    Hello  👋 ragers 😡 😡 😡 have a good 👍 👍 day ☀️ ☀️ ☀️ ☀️
    I would like to present C# & JS resource that lets allows you to switch between 3 map options. Like in GTA Online.
    Default map. Zoomed out. Big map.
    Installing & Using
    Put the files you downloaded in their respective places Press Z (Default) (Settings — Key Bindings — General — Radar Zoom / Multiplayer information)

    187 downloads

       (2 reviews)

    0 comments

    Updated

  10. [JS] Basic Clothes Menu

    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

    535 downloads

       (2 reviews)

    0 comments

    Submitted

  11. Shortcuts (Animations) on Numpad

    Load this Variables on Login:
    gm.mysql.handle.query("SELECT * FROM shortcuts WHERE charId = ?", [player.data.charId], 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; }); } });  
    Contact:
    You can Contact me on Discord for Questions.  https://discord.gg/epD7fsv
     
    I can make Scripts for you write me on Discord please German my english is so Bad : SnillocTV

    323 downloads

       (3 reviews)

    2 comments

    Updated

  12. Weapons on Body

    This resource attaches your weapons to your character to make them visible to everyone. All you have to do is put away your gun/switch weapons.
     
    Installing
    Download & install the latest Efficient Attachment Sync. Put the files you downloaded in their respective places Add require('weapondisplay') to client_packages/index.js All done  
    Notes
    Didn't do a lot of testing, feel free to report issues (would be nice if you include how to reproduce the issue) weaponData.json file will be updated with future GTA V versions, always check weaponData.json Gist to prevent issues. 

    443 downloads

       (4 reviews)

    1 comment

    Updated

  13. [JS] Vehicleseat Menu

    This is a Vehicleseat Menu in JavaScript for Rage:MP
     
    Install:
     
    Unzip vehicleseatJS.zip in your root server folder.
     
    Use:
     
    Press "F" or "G" when a Vehicle nearby you.
     
    Contact:
     
    You can Contact me on Discord for Questions.
     
    {Brace}#0571
     
    Have fun!

    561 downloads

       (0 reviews)

    2 comments

    Updated

  14. Simple Teams

    Prevents players of the same team shooting eachother.
     
    Installing
    Put teams into your server's client_packages directory, then add require('teams'); to client_packages/index.js.
     
    Using
    It's pretty simple, just set currentTeam shared variable of a player like this:
    // both strings and numbers should work playerEntity.data.currentTeam = whatever; playerEntity.setVariable("currentTeam", whatever); And set currentTeam to null if you want to reset someone's team.
     
    Note
    This resource doesn't prevent all kinds of friendly fire, for example projectile weapons like RPG can hurt teammates, you can still run teammates over with a vehicle etc. You can check if both killer and victim is on the same team and punish the killer, though.

    223 downloads

       (4 reviews)

    0 comments

    Updated

  15. [v0.3.5] Implementing Custom NameTags

    Hi everyone!
    In need of a custom script for a Custom NameTag, I found the @hartority script, however, it was an outdated project and it had been made for version 0.2 of RageMP, with some references already removed, well, I bring you today the corrected code.
    Requirements:
    RageMP server files. Nothing more! Just have fun.   Introduction: This script is a reliable edition of the one produced by @hartority with only a few references to the RageMP library, so all code is credit @hartority.   Let's start:   1. Go to "client_packages" folder in "RAGEMP/server-files" directory, usually:   2. Create a JavaScript archive (.js) named "customtag.js", example:

      3. Inside the "customtag.js" paste this code:
      4. Save "customtag.js" file, and open "index.js" in "C:\RAGEMP\server-files\client_packages" directory and put this:
    End! Just test it and tell me if something goes wrong
    Usage example:

     
    The original code topic of @hartority:
    Thanks for all feedbacks,
    mad
    thanks @hartority for your commitment
    if you do not authorize this topic, please let me know

    297 downloads

       (1 review)

    1 comment

    Updated

  16. [Perfect for RP Servers]

    What is this amazing script?
    You are also able to control the steering (unable to set straight afterwards due to setSteeringAngle not being implemented yet) so you can move the vehicle to the side of the road.
    If you are an RP server then this is perfect for you!
    With some wizard maths, the text and position is at the correct end of each car and is based on distance (This has taken over 6 hours to get right). 
     
    Configuration
    I have already built in configuration to set whether you can allow it on locked vehicles, low health vehicles, whether the engine is off and certain vehicle classes.
    These can all be configured in the config section of the file:
    this.config = {            AllowVehicleClass: [0, 1, 2, 3, 4, 5, 6, 9, 18], // These are the normal vehicles in the game classes - to disable it, set it to false            MaxVehicleCubedSize: 25, // This is the vehicle length * width - as an idea an ambulance is 21            LockHandbrakeProtection: false, // If set - you can't push a locked vehicle (Theft prevention or ditching cars)            EngineProtection: false, // If set - you can only push if the enginer is turned off            VehicleHealthProtection: false, // Must be less than 1000 or false which de-activates checking vehicle health            PushEventName: false, // Set this to send an event to your server with the relevant Vehicle and Player attached (ie 'pushing_car')            LabelsDisplayed: true, // Show labels near the pushing positions when close enough            DebugPositions: false, // View pushing positions as markers so they are more visible            AllowVehicleSteering: true, // Allows the player to turn the wheels of the vehicle using A and D keys }  
    In Action
    To see how it looks working just checkout:
    https://streamable.com/ab2v5
     
    Questions
    Lastly if you have any questions feel free to give me a shout on discord (wdoyle2) or respond in the comment section.
    This is currently not on github but more than happy to post it for any future pull requests. 

     

    215 downloads

       (6 reviews)

    0 comments

    Updated

  17. Free Cam

    With this script you can get coordinates of the camera and coordinates of where camera is pointing.
    F5 - enable/disable. F5+Space - disable without warping to ground. W/A/S/D/Space/LCtrl - move. /savecam [name] - save Camera position. Example of save:
    Position: -64.17094421386719, -824.6749877929688, 373.018310546875 | pointAtCoord: -76.13325500488281, -807.392822265625, 320.28961181640625 | entity: 139321 - First Pos  
    Author: @ragempdev
    I just added possibility to save camera pos and pointAtCoord

    560 downloads

       (5 reviews)

    0 comments

    Updated

  18. Console commands

    Simple command handler for the Rage:MP console...
    ... Just add more commands, for example to save the player
     
    INFO: Stopping bridge resources seems to be broken by Rage.
    Original resource by Vektor42O
     

    312 downloads

       (0 reviews)

    0 comments

    Updated

  19. Color Chat

    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.

    533 downloads

       (1 review)

    0 comments

    Submitted

  20. [C#] Keys Bind for C#

    This function helps you to add keys binding if you use C # client side ...
    Example of use :
    Tick Event
    KeyManager.KeyBind(0xA2, () => { Chat.Output("Key Bind Work"); }); KeyManager.KeyBind(KeyManager.KeyMouse, () => { Cursor.Visible = !Cursor.Visible; });  
     

    394 downloads

       (1 review)

    2 comments

    Updated

  21. MapEditor

    Working version of the MapEditor by PrototypeX!
    Developed for the project SMOTRArage
     
    Old resource: 
     

    403 downloads

       (3 reviews)

    0 comments

    Updated

  22. Blackout

    This resource lets you control the blackout feature of GTA V.
     
    Installing
    Put the files you downloaded in their respective places Add require('blackout') to client_packages/index.js All done  
    API
    // Serverside (synced to every player) mp.world.blackout.enabled // get mp.world.blackout.enabled = true/false // set // Clientside (only for a client) mp.game.blackout.enabled // get mp.game.blackout.enabled = true/false // set You can also trigger SetBlackoutState event with the first argument being the new state of blackout.
     
    Example
    // Toggle blackout mode with /toggleblackout (Serverside) mp.events.addCommand("toggleblackout", (player) => { mp.world.blackout.enabled = !mp.world.blackout.enabled; player.outputChatBox(`Blackout ${mp.world.blackout.enabled ? `enabled` : `disabled`}.`); }); // Toggle blackout mode with F8 key (Clientside) mp.keys.bind(0x77, false, () => { mp.game.blackout.enabled = !mp.game.blackout.enabled; mp.gui.chat.push(`Blackout ${mp.game.blackout.enabled ? `enabled` : `disabled`}.`); });  


    335 downloads

       (1 review)

    0 comments

    Updated

  23. Manage Weather Time

    Basic script to sync time of the game in custom cicles
    That script just change the time of the game based on the configuration cicle time and real life.
    every 0 hour and 12 hours the weather is changed in random mod to another weather.
    The cicle of Timeout will adjust to read the script every hour in the game.
     
    How to use:
    Just place de script in your server-side (Package) and change the "const cicleTime" to your 
    size of a day cicle. Use real life minutes for that. Exemple: "30" will be 15 minutes in real life day
    and 15 minutes night.
     
    Notes:
    If you place some value in cicle time that a hour in the game last less then one minute in real life,
    dont will work (if you know how to fix comment  please  ).
     
    Future Updates:
    Smoth transition, show time and date on UI
     
     

    538 downloads

       (1 review)

    0 comments

    Updated

  24. Instructional buttons

    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.

    178 downloads

       (4 reviews)

    0 comments

    Updated

  25. Manual transmission

    Hello everyone,
    It's been a while i didn't do some resources, and I've seen root taking the throne for a while. So i thought i would contribute again with some average resource for the developers to know more about rage's environment. Basically this resource introduces manual transmission to cars to ensure more control on your vehicle and to enjoy the experience of the manual transmission (Could be useful for some drag racing maybe..).
    Anyways manual is toggled by the command: /manual 
    Controls:
    NUMPAD_ADD increases the gear. NUMPAD_SUBTRACT lowers the gear Simple manual HUD was introduced beside the mini-map to know everything about your vehicle.
    Gears: 1-5, N, R.
    Shifting to fast disables vehicle engine. You have wait the shiftNow sign to appear, so you can shift to the next gear.
    Any questions/bugs please notify me in the comments section.
    Drive safely,
    Keptin

    251 downloads

       (4 reviews)

    0 comments

    Updated