Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/25/21 in Files

  1. Version 1.0.0

    932 downloads

    Car broke down on you? np. Github Repo & Readme Tested on 1.1 Usage: X - Ramp up/down LSHIFT - Pull Car/ Detach Car (align the ramp with the car then press to pull)
    1 point
  2. Version 1.0.0

    522 downloads

    I recently needed a polygons library like this for my gamemode to define some companies, houses, gangzones and other kind of establishments boundaries, so I decided to create this resource previously based on abmn's zone manager, but the code was terrible and I decided to rewrite my own from scratch and improving the functionality. Basically you'll be able to create any kind of colshape you want, without worring about combining colshapes to fit your needs, you can just define the points and the height of the shape and it'll be created easily! You can set boundaries for houses to move furnitures, for companies to accomplish the job, for mountains in hunting animals scripts and anything else your creativity takes you, just use it! Demos https://streamable.com/w7l4h6 https://youtu.be/OxSPcVQrWrY Advantages The main advantages of using this resource instead of abmn's are: These polygons are dynamic, you can modify, move, rotate, basically do anything to the polygon vertices array in real time and it'll work instantaneously, updating the collisions with players. This script is way more optimized and lightweight than the other version. You can choose the color for the lines of the polygon and set them visible or not by just modifying the polygon `visible` property. This script supports different kind of heights for detecting collision (eg.: slopes), it's accurate (may not work as you think it should depending on the slope degree and the polygon height), and supports even colshapes for mountains. You can add more vertex at any time you want to existing polygons, by just pushing a new vector3 position to `polygon.vertices` array. API Functions /* Creates a new polygon and return it's instance */ mp.polygons.add(vertices: Vector3Mp[], height: number, options = { visible: false, lineColorRGBA: [255,255,255,255], dimension: 0 }): Polygon /* Removes a polygon */ mp.polygons.remove(polygon: Polygon): void /* Check if a polygon exists */ mp.polygons.exists(polygon: Polygon): boolean /* Check if a position is contained within a given polygon */ mp.polygons.isPositionWithinPolygon(position: Vector3Mp, polygon: Polygon): boolean /* Examples */ // Creating a new polygon const polygon = mp.polygons.add([new mp.Vector3(10, 10, 5), new mp.Vector3(15, 15, 5), new mp.vector3(5, 5, 5)], 10, { visible: false, lineColorRGBA: [255,255,255,255], dimension: 0 }); // Set the polygon lines visible polygon.visible = true; // Modifying a polygon height polygon.height = 100; // Modifying a polygon color (RGBA) polygon.lineColorRGBA = [255, 155, 0, 255]; // Modifying a polygon dimension polygon.dimension = 30; /* Events*/ // Event called when player enter a polygon (clientside) mp.events.add('playerEnterPolygon', (polygon) => mp.gui.chat.push(`You entered the polygon ${polygon.id}!`)); // Event called when the local player leaves a polygon (clientside) mp.events.add('playerLeavePolygon', (polygon) => mp.gui.chat.push(`You left the polygon ${polygon.id}.`)); How to install Download the zip folder Extract it on your clientside folder Require the index file from the polygons folder. Enjoy it! See you on the next release! - n0minal
    1 point
  3. Version 1.0.0

    932 downloads

    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.
    1 point
  4. Version 1.1.0

    574 downloads

    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
    1 point
×
×
  • Create New...