Jump to content
RAGE Multiplayer Community

154 files

  1. Playerlist (C#)

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

    68 downloads

       (3 reviews)

    0 comments

    Updated

  2. Player List

    Requires RAGE Multiplayer 1.1.0 and above.
    This resource adds a GTA Online like player list to your server.
     
    Installing
    Put playerlist into your server's client_packages directory, then add require('playerlist'); to client_packages/index.js.
     
    Controls
    Z = Toggle player list visibility.
    PageUp = Move to the next page.
    PageDown = Move to the previous page.
     
    Customization
    You have the ability to customize how a player is displayed in the list. Here's a list of shared variable keys used for customization:
    PlayerListColor = This shared variable is used to specify which background color the player will have in the list. Uses an integer (HUD color ID), so go check the wiki.
    PlayerListTag = This shared variable is used to give players a crew/clan tag next to their name in the list. Setting this value to more than 5 characters isn't recommended since the scaleform displays up to 5 characters.
     
    Credits
    TomGrobbe - mp_mm_card_freemode scaleform research
    @rgnbgnhnd @Jer - Testing
     
    Notes
    This script uses mp.gui.chat.show function to toggle chat visibility when a player opens/closes the player list. Meaning if you have a custom chat, this resource might fail to toggle chat visibility.  
    Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-playerlist

    103 downloads

       (4 reviews)

    0 comments

    Updated

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

    70 downloads

       (1 review)

    0 comments

    Submitted

  4. Pet System

    This is my first resource to RAGEMP community, a pet system based on peds using JS.
    NOTE: Code and comments on english, return messages on spanish
    Video (spanish explanation):
    Installation:
    Put the files you downloaded in their respective places
    How to use it:
    Key C - Call/save your pet
    Key K - Sit/get up your pet
    Key Z - Sleep/wake up your pet
    Key F - Follow/unfollow your pet
    Key B - Your pet go out to find a ball (you have to throw it first)
    GitHub: https://github.com/brifemu/petCampCode
    License: MIT License

    87 downloads

       (2 reviews)

    4 comments

    Updated

  5. Better G Seats

    Hello yes very nice. I have a nice resource for you.
    You press G. It finds the nearest vehicle, and the nearest seat in such vehicle, and makes you get in it. Supports vehicles without doors, the bus with like 12 seats or whatever it has. Should support all newly added vehicles too, DLC vehicles etc.
    For vehicles with grab holds, G will make you enter the vehicle (like granger), SHIFT + G will force you to grab onto the sides, even if no one is inside the vehicle.
    Locking:
    To stop people getting in as passenger, like a locked vehicle use this code somewhere in your server:
    vehicle.setVariable('locked', true) To install:
    - Place the folder from inside client_packages into your client_packages folder.
    - Add
    require('./BetterGSeats/seats.js'); to your client index.js
    - Very nice)

    62 downloads

       (0 reviews)

    2 comments

    Updated

  6. Timer Bars

    Released a better version here:
     
     
     
     
    Adds timer bars from GTA V/Online.
    Installing
    Drop the timerbars folder to your server's client_packages folder, then you can use const barlibrary = require('timerbars'); to add timer bars. (don't forget to check examples)
    TimerBar Properties
    A timer bar has these properties:
    title | Title (left text) of the timer bar. (string) useProgressBar | Progress bar of the timer bar. If set to true, a progress bar will be drawn instead of right text. (bool) text | Text (right text) of the timer bar, useless if useProgressBar is true. (string) progress | Progress of the timer bar, useless if useProgressBar is false. (float between 0.0 - 1.0) textColor | Text color of the timer bar. (rgba array or HUD color ID) pbarBgColor | Progress bar's background color. (rgba array or HUD color ID) pbarFgColor | Progress bar's foreground color. (rgba array or HUD color ID) visible | Visibility of the timer bar. (bool) usePlayerStyle | If set to true, timer bar title will be displayed like a GTA Online player name. (bool) You can check this wiki page for HUD color IDs.
    Examples
    const timerBarLib = require("timerbars"); // lets create some progress bars let timeBar = new timerBarLib.TimerBar("TIME LEFT"); timeBar.text = "33:27"; let teamBar = new timerBarLib.TimerBar("TEAM MEMBERS LEFT"); teamBar.text = "4"; let healthBar = new timerBarLib.TimerBar("BOSS HEALTH", true); healthBar.progress = 0.8; healthBar.pbarFgColor = [224, 50, 50, 255]; healthBar.pbarBgColor = [112, 25, 25, 255]; let rewardBar = new timerBarLib.TimerBar("REWARD"); rewardBar.text = "$500000"; rewardBar.textColor = [114, 204, 114, 255]; // f7 to toggle visibility of bars mp.keys.bind(0x76, false, () => { timeBar.visible = !timeBar.visible; teamBar.visible = !teamBar.visible; healthBar.visible = !healthBar.visible; rewardBar.visible = !rewardBar.visible; }); // f8 will change health bar's value to something random mp.keys.bind(0x77, false, () => { healthBar.progress = Math.random(); });  
    const timerBarLib = require("timerbars"); let eventTime = new timerBarLib.TimerBar("EVENT TIME LEFT", false); eventTime.text = "01:40"; let thirdPlace = new timerBarLib.TimerBar("3rd: PlayerName3", false); thirdPlace.text = "9 kills"; thirdPlace.textColor = 107; // HUD_COLOUR_BRONZE thirdPlace.usePlayerStyle = true; let secondPlace = new timerBarLib.TimerBar("2nd: PlayerName2", false); secondPlace.text = "12 kills"; secondPlace.textColor = 108; // HUD_COLOUR_SILVER secondPlace.usePlayerStyle = true; let firstPlace = new timerBarLib.TimerBar("1st: AimbotNub", false); firstPlace.text = "30 kills"; firstPlace.textColor = 109; // HUD_COLOUR_GOLD firstPlace.usePlayerStyle = true;  

    594 downloads

       (3 reviews)

    1 comment

    Updated

  7. DialogUI

    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.

    252 downloads

       (0 reviews)

    1 comment

    Updated

  8. [SCALEFORM] Chat

    This resource introduces the known chat scaleform from GTA:O. This chat supports (TEAM, LOCAL, GLOBAL) chats.
    CONTROLS:
    T (GLOBAL chat) Y (TEAM chat) U (LOCAL chat) alt + shift (Changes language from English to the secondary mapped language) PAGE_UP (Scroll history up) works only when input is opened PAGE_DOWN (Scroll history down)  works only when input is opened Known Issues:
    Message colors aren't supported due to scaleform Chat supports extra language besides English, but the language should be mapped Language Mapping:
    For more information about how to language map, please click here
    API:
    Client-side API
    // Client side // Property getter/setter Boolean (Disables/Enables chat input) mp.gui.chat.disabledInput = true; mp.gui.chat.disabledInput // Property getter Boolean (Check if chat is open) mp.gui.chat.enabled; // Function to clear localPlayer's chat feed mp.gui.chat.clear(); // Trigger chat's visibility (visible: Boolean); mp.gui.chat.visible(visible); /* * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.gui.chat.sendMessage(msg, scope, author, authorColor); /* * Registers command locally for client. * name: string (command name) * arg1: command's arguement */ mp.gui.chat.addCommand(name, function (arg1, arg2) { // do whatever... }); /* * Removes command locally for client. * name: string (command name) */ mp.gui.chat.removeCommand(name); Server-side API
    /* * Sends message to all players in server * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.players.announce(msg, scope, author, authorColor); /* * Sends messaage to all players in specified dimension * dimension: int * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.players.announceInDimension(dimension, msg, scope, author, authorColor); /* * Sends messaage to all players in specified dimension * position: Vector3 * range: int * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ mp.players.announceInRange(position, range, msg, scope, author, authorColor); /* * Registers commands in chat * name: string (command name) * player: command executer * arg1: Arguement after command */ mp.events.addChatCommand(name, function (player, arg1, arg2) { // Do what you want... }); /* * Removes command from server * name: string (command name) */ mp.events.removeChatCommand(name); /* * Sends message to all players in server * msg: string * scope: string (message's scope (Author [scope] msg)) * author: string (Default: [SERVER]) * authorColor: int hudColorID (https://wiki.rage.mp/index.php?title=Fonts_and_Colors) (Default: white) */ player.sendChatMessage(msg, scope, author, authorColor); // Clears player's chat player.clearChat(); Teams resource is supported.
    If you have any issues don't hesitate to contact me on Discord/Forums DM. 
    You're not allowed to redistribute this resource without my permission.
     

    589 downloads

       (8 reviews)

    0 comments

    Updated

  9. Client-side AntiCheat

    So this is a simple Script, that detects suspicious actions from client-side:
    - No Reload
    - Unallowed Weapons
    - Rapid Fire
    - Flyhacks
    - Speedhacks
    - Vehicle Fly and Speedhacks
    - Static Godmodes and Healkeys
     
    Showcase: https://streamable.com/iklquo
     
    When you teleport, heal or respawn the player,  use the 'client:respawning' event.
    If you want to use something like Medkits or Respawns you need to trigger the 'client:respawning' event, which disables the AntiCheat for some seconds, otherwise the player gets flagged.
    Do your own thing for Vehicle Flyhack flagging, because on my server, you don't do those big Car Stuntjumps, where you fly like 30m high. Maybe remove that flagging.
     
    NOTE: There are many reasons that can cause false flags, for example high-ping or low fps. 
    Dont ever autoban people with this!

    369 downloads

       (1 review)

    0 comments

    Updated

  10. Agreement / Contract API (NodeJS)

    Hi guys!
    A function works when the contract is accepted by everyone.
    I tried to write similar to root's inventory-api.
    Contact me! If you want to change something 
    Please Download from Github.
    https://github.com/QueennN/AgreementAPI
      !!!VERY IMPORTANT NOTICE!!! Using player.id is not a reliable way while the agreement is active(not signed), the player can leave the game and player.id can be changed. For this reason, you should use a unique id. For example, database id.My database is player.charid.You have to change player.charid .!!!!   You can change 'playerLogin' event too. Its my auth event.   EXAMPLE:
    addAgreement("key","name","desc",acceptFunction()=
    aS.addAgreement('spawn',"Spawn ","perfect desc",(data,chars)=>{           for(let cid in chars){                 let players=mp.players.toArray().filter(p=>p.charid==cid)                 for(let i in players){                       players[i].position=data                     }           } }) player.createAgreement("key" , [player-uniqid list] , time , data)
     player.createAgreement("spawn",[player.charid],55,{x:56,y:98,z:100}) player.signAgreement(activeAgreemnts Index,decision) 
    player.signAgreement(index,true)

    19 downloads

       (1 review)

    2 comments

    Updated

  11. [JS] ParticleFX Server-side API

    Features
    Sync Streamer Events Easy to use
    API
    + Added mp.particleFx.addLoopedAtCoord (Synced!) + Added mp.particleFx.addLoopedOnEntity (Synced!) + Added mp.particleFx.destroy (Synced!) + Added player.startParticleFxLoopedAtCoord (Not synced!) + Added player.startParticleFxLoopedOnEntity (Not synced!) + Added player.stopParticleFx (Not synced!)
    Examples
    mp.events.add({ 'onPlayerParticleFxStreamIn' : (player, particleId) => { console.log(`[onPlayerParticleFxStreamIn] => ${player.name} - ${particleId}`); }, 'onPlayerParticleFxStreamOut' : (player, particleId) => { console.log(`[onPlayerParticleFxStreamOut] => ${player.name} - ${particleId}`); }, 'onParticleFxEntityDisconnect' : (player, particleId) => { console.log(`[onParticleFxEntityDisconnect] => ${player.name} - ${particleId}`); } }); mp.events.addCommand({ 'fx_carwash2_stop' : (player) => player.stopParticleFx('car.wash2'), 'fx_carwash2' : (player) => { const id = 'car.wash2', fxName = 'scr_carwash', effectName = 'ent_amb_car_wash_jet', position = { x: player.position.x, y: player.position.y, z: player.position.z + 3.0 }, rotation = { x: 0, y: 0, z: 0 }, scale = 15.0, xAxis = true, yAxis = true, zAxis = true ; player.startParticleFxLoopedAtCoord(id, fxName, effectName, position, rotation, scale, xAxis, yAxis, zAxis); } }) mp.events.addCommand({ 'fx_carwash_stop' : () => mp.particleFx.destroy('car.wash'), 'fx_carwash' : (player) => { const id = 'car.wash', fxName = 'scr_carwash', effectName = 'ent_amb_car_wash_jet', position = { x: player.position.x, y: player.position.y, z: player.position.z + 3.0 }, rotation = { x: 0, y: 0, z: 0 }, scale = 15.0, xAxis = true, yAxis = true, zAxis = true ; mp.particleFx.addLoopedAtCoord(id, fxName, effectName, position, rotation, scale, xAxis, yAxis, zAxis); } }); mp.events.addCommand({ 'fx_moneyrain' : (player) => { const id = 'moneyrain', fxName = 'scr_xs_celebration', effectName = 'scr_xs_money_rain_celeb', offset = { x: 0.0, y: 0.0, z: 1.25 }, rotation = { x: 0, y: 0, z: 0 }, scale = 1.25, xAxis = true, yAxis = true, zAxis = true ; const fx = mp.particleFx.addLoopedOnEntity(id, player, fxName, effectName, offset, rotation, scale, xAxis, yAxis, zAxis); setTimeout(() => fx.destroy(), 9000); } }); mp.events.addCommand({ 'fx_barber' : (player) => { const id = 'barber', fxName = 'scr_barbershop', effectName = 'scr_barbers_haircut', offset = { x: 0.0, y: 0.0, z: 0.75 }, rotation = { x: 0, y: 0, z: 0 }, scale = 1.0, xAxis = true, yAxis = true, zAxis = true ; const fx = mp.particleFx.addLoopedOnEntity(id, player, fxName, effectName, offset, rotation, scale, xAxis, yAxis, zAxis); setTimeout(() => { fx.destroy(); player.setClothes(2, Math.floor(Math.random() * 74), 0, 2); }, 900); } });
    Introduction
     

    121 downloads

       (4 reviews)

    2 comments

    Submitted

  12. [3D] Client-side Sound API.

    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.

    531 downloads

       (5 reviews)

    0 comments

    Updated

  13. Cash Registers

    Requirements
    RAGE Multiplayer 1.1 and above Currency API (define a currency named "cash" after installing)  
    Installing
    Put the files you downloaded in their respective places Add require('cashregisters') to client_packages/index.js All done  
    Config
    The config.json file can be found inside packages/cashregisters/json/.
    minShotReward, maxShotReward: Minimum and maximum amount of cash a cash register will drop when shot, default values are 20 (min) and 60 (max).
    minEmptyReward, maxEmptyReward: Minimum and maximum amount of cash a player will get from emptying a cash register by pressing interaction key in front of it, default values are 70 (min) and 120 (max).
    cashLife: Milliseconds a cash drop from a cash register will stay for, default value is 30000. (30 seconds)
    cashRegisterCooldown: Milliseconds that need to pass before a cash register is available for robbery again, default value is 300000. (5 minutes)
    createBlips: Whether cash registers will have a blip/icon on the map, default value is true.
     
    Notes
    Emptied cash registers won't open like in the video, it was removed due to the issues it caused. You'll see a red "Robbed" label instead. Shooting at the cash registers without aiming in first person mode can be inaccurate at times. Since this resource hides the game's cash registers, if you play on a server that uses this resource then connect to a server that doesn't use this resource without restarting GTAV, cash registers will most likely be invisible. Credits to GTA Wiki for the preview image. Available on GitHub: https://github.com/root-cause/ragemp-cash-registers

    212 downloads

       (6 reviews)

    3 comments

    Updated

  14. Simple MoneyHUD

    What is this?
    This is a simple money HUD for rage It is easy to add and use in your existing application or a new one! It is very similiar to SAMP's money HUD It contains nice animations on money adding/removing (Check the included GIF) How to install?
    Extract the MoneyHUD.js file in your client_packages and include it in your index.js require('./MoneyHUD.js'); Note
    This was created in version 0.3.7 How to use?
    Call event moneyhud:set on player initialization/connect to initialize player's starting money - Example: client.TriggerEvent("moneyhud:set", 5000); Call event moneyhud:add to add money to the HUD - Example: client.TriggerEvent("moneyhud:add", 1500); Call event moneyhud:remove to remove money from the HUD - Example: client.TriggerEvent("moneyhud:remove", 1500); Extra settings
    You can change the MINIMUM_LENGTH constant to determine how long should the money HUD be by minimum

    492 downloads

       (1 review)

    0 comments

    Updated

  15. CustomChatPlus

    What is this?
    This is a @MrPancakers's custom chat with scroll bar with a simple addition - it adds option to use arrow up, down key to move thru your chat history. Just like in SAMP! How to install?
    Extract everything into client_packages folder and add the chat script into your index.js. require("/chat/index.js"); Note
    This may include some bugs and I do not provide "tech support" for it This was created in version 0.3.7 Credits
    @MrPancakers (https://rage.mp/profile/5511-mrpancakers/)

    405 downloads

       (1 review)

    1 comment

    Updated

  16. Vending Machine Script (C#)

    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.
     

    168 downloads

       (1 review)

    0 comments

    Updated

  17. Rappelling

    Requires RAGE Multiplayer 1.1.0 and above.
     
    Installing
    Put rappel into your server's client_packages directory, then add require('rappel'); to client_packages/index.js.
    RAGE Multiplayer's 1.1 will sync the rappelling action so there isn't any need for server-side files.
     
    Using
    Get in a helicopter with FLAG_ALLOWS_RAPPEL (Maverick, Police Maverick and Annihilator) flag as passenger and do /rappel.
     
    * Credits to Trevor Productions on YouTube for the preview image.

    393 downloads

       (5 reviews)

    0 comments

    Submitted

  18. Better Notifications

    Now with 200% more color.
    Clientside Functions:
    mp.game.ui.notifications.show(message, flashing = false, textColor = -1, bgColor = -1, flashColor = [77, 77, 77, 200]) mp.game.ui.notifications.showWithPicture(title, sender, message, notifPic, icon = 0, flashing = false, textColor = -1, bgColor = -1, flashColor = [77, 77, 77, 200]) Serverside Functions:
    player.notify(message, flashing = false, textColor = -1, bgColor = -1, flashColor = [77, 77, 77, 200]) player.notifyWithPicture(title, sender, message, notifPic, icon = 0, flashing = false, textColor = -1, bgColor = -1, flashColor = [77, 77, 77, 200]) As Events:
    BN_Show(message, flashing = false, textColor = -1, bgColor = -1, flashColor = [77, 77, 77, 200]) BN_ShowWithPicture(title, sender, message, notifPic, icon = 0, flashing = false, textColor = -1, bgColor = -1, flashColor = [77, 77, 77, 200]) Example:
    // Clientside mp.game.ui.notifications.show("Normal message with custom text and background color.", false, 15, 20); mp.game.ui.notifications.showWithPicture("New Message", "Facebook", "You got some more of that data?", "CHAR_FACEBOOK", 1, false, 0, 139); // Serverside player.notify("This message is red which means you're doing something wrong.", false, 6); player.notifyWithPicture("Title", "Ammu-Nation", "Ammunation has all the equipment you need to protect your family from the evils of a liberal society! Fixed, mounted, and shoulder-held submachine guns. Mortars! Surface-to-air and all manner of heat-seeking missiles!", "CHAR_AMMUNATION"); Icons:
    You can specify an icon ID for picture notifications, here's a list of them:
    0, 4, 5, 6 = No Icon 1 = Speech Bubble 2 = Message 3 = Friend Request 7 = Arrow 8 = RP 9 = Money Notes:
    textColor and bgColor parameters want a HUD color ID which you can find here. (it is a bit outdated now though) You can find notification pictures here. If you can't see picture notifications, you must enable Phone Alerts from Settings > Notifications > Phone Alerts. This script changes player.notify on serverside.

    1599 downloads

       (8 reviews)

    3 comments

    Updated

  19. Vehicle Spawner

    Installing
    Put the files you downloaded in their respective places Download & install NativeUI if you haven't yet, this script needs it Add require('vspawner') to client_packages/index.js All done Controls
    F4 Key - show/hide menu
    Left Arrow - previous page
    Right Arrow - next page
    ESC - close menu
    Credits
    https://github.com/n-n1ks/rage.mp-freeroam - Vehicle spawn/model change stuff

    4875 downloads

       (8 reviews)

    3 comments

    Updated

  20. Metal Detectors

    This resource lets you add metal detectors that go off when a player with a not allowed weapon goes through them.
     
    Installing
    Put the files you downloaded in their respective places Add require('metaldetectors') to client_packages/index.js Set up some metal detectors (read below) All done  
    JSON Files
    Most of the changes are done by editing JSON files located in packages/metaldetectors/json/.
    Remember to validate your changes here: https://jsonlint.com/
     
    config.json
    colshapeSize: Size of the metal detector colshape, I think the default value is pretty much perfect and doesn't need any editing.
    soundRange: Maximum range/distance of the players who should hear metal detector alarms, default value is 15.0.
    cooldownMs: Milliseconds that need to pass before a metal detector goes off again, default value is 2000.
    allowedWeapons: Array of weapons that are ignored by metal detectors. This list is pretty much empty and you probably should fill it, WEAPON_UNARMED and WEAPON_CERAMICPISTOL are ignored by default.
    smallWeaponGroups: Array of weapon groups that are considered small. Weapons of this group will play the small weapon alarm sound and everything else will play the big weapon alarm sound. GROUP_MELEE, GROUP_PISTOL, GROUP_SMG, GROUP_STUNGUN and GROUP_THROWN are considered small by default.
     
    detectors.json
    This file contains the metal detectors in array of objects format. A metal detector has x, y, z, heading, dimension and createProp properties.
    x, y, z: Coordinates of the metal detector.
    heading: Rotation (yaw) of the metal detector.
    dimension: Dimension of the metal detector.
    Default value: 0
    createProp: Whether this metal detector should create a prop when it is loaded or not, useful if you want to use existing metal detectors. (like in the IAA facility interior)
    Default value: true
    // Example: Metal detector used in the making of video above { "x": 2059.037109375, "y": 2980.64208984375, "z": -62.90178298950195, "heading": 325.0, "dimension": 0 }  
     
    weaponData.json
    Used for weapon groups, just make sure it is updated after every DLC.
     
    For Developers
    This resource triggers an event named playerTriggerMetalDetector with args player, position, isSmallWeapon when players trigger a metal detector.
    player: The player who triggered a metal detector.
    position: Coordinates of the metal detector.
    isSmallWeapon: Whether the player's weapon was a small weapon or not.
    (another arg that contains weapon hash might be added in the future)
     
    Example
    mp.events.add("playerTriggerMetalDetector", (player, position, isSmallWeapon) => { player.outputChatBox(`You triggered a metal detector with a ${isSmallWeapon ? "small" : "big"} weapon!`); });  
    Notes
    Right now, this resource checks only the current weapon of a player due to issues with player.weapons. If player.weapons get fixed, I'll update the resource to check for all weapons of a player.  
    Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-metal-detectors

    243 downloads

       (5 reviews)

    0 comments

    Updated

  21. Simple Tablet

    RAGEMP-SimpleTablet
    This is a really basic tablet for your resource. You can open it, and it show your embedded link. Press O to open it.
    Installation
    Just add the files in client_packages to your resource & add the following code to your index.js
    require("tablet/tablet.js"); How to change the embedded object
    Go in the "tablet" folder and open "tablet.html" with your editor. Change the URL on line 14 & 15.
    How to change the key to open it:
    Go in the "tablet" folder and open "tablet.js" with your editor. Change the "0x4F" on line 3 to your key of choice.
    Here you can find all key values:
    https://docs.microsoft.com/de-de/windows/win32/inputdev/virtual-key-codes?redirectedfrom=MSDN
     
    GITHUB: https://github.com/XCRON-DEV/RAGEMP-SimpleTablet
    For questions or help DM me here.

    836 downloads

       (2 reviews)

    0 comments

    Updated

  22. Easy Whitelist

    RAGEMP-EasyWhitelist
    This is a basic whitelist system for your server. Just place it in the packages folder & it works!
    Installation
    Just place the folder "easy-whitelist" in the packages folder.
    How to add users to the whitelist
    Go in the packages folder > then "easy-whitelist" > and edit the file account.json
    There you have to add the SocialClub ID. Restart Server & its done.
     
    Github: https://github.com/XCRON-DEV/RAGEMP-EasyWhitelist
    For questions or help DM me here.

    471 downloads

       (1 review)

    3 comments

    Updated

  23. Synced Player Component Variations

    This should save you some time writing your own syncing when it comes to using player.setClothes() for values over 255 until 1.0 gets released. The download has example scenarios/commands you can use.
    Serverside Functions:
    player.changeClothes(Number componentId, Number drawable, Number texture, Bool save, Bool sync) player.resetClothes() Save parameter:
    By setting this to true the script will remember these values and re-apply these when using player.resetClothes()
    Sync parameter:
    If you set this parameter to false the clothes will only be applied on the target client.
    Set this to true and everyone will see the clothes!
     
    Demonstration:
    This GIF has both save and sync parameter set to false to preview the selected item before actually purchasing it. Once purchased, both save and sync are set to true to remember the purchased item and to sync it to all other clients
    https://imgur.com/a/gsySyPc
     
    And this GIF shows the same interaction but from the other client
    https://imgur.com/a/0IankaB

    402 downloads

       (3 reviews)

    0 comments

    Updated

  24. GTA SA Classic Menu

    This is a CreateMenu for the illegal gta v emulator.
    Usage example:
    List<string[]> menuItems = new List<string[]>(); menuItems.Add(new string[] { "Item 1 Column 1", "Item 1 Column 2" }); menuItems.Add(new string[] { "Item 2 Column 1", "Item 2 Column 2" }); Menu menu = new Menu("Title", new string[] { "Header 1", "Header 2" }, menuItems).show(); menu.setOnMenuResponseListener((Menu.OnMenuResponseListener onMenuResponseListener) => { RAGE.Chat.Output("Response: " + onMenuResponseListener.response + " item: " + onMenuResponseListener.item); menu.destroy(); });  

    88 downloads

       (7 reviews)

    0 comments

    Submitted

  25. Car Compare (0-100, 0-200, Vmax)

    Copy folder to "client_packages" and add
    require("./genzocarcompare"); to your "client_packages/index.js";

    212 downloads

       (0 reviews)

    0 comments

    Submitted


×
×
  • Create New...