Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/01/20 in Files

  1. Version 0.0.1

    267 downloads

    RageMP-ZoneManager A very useful client-side system which let you create four squares or hexagons in any shape like colshapes which support Z axis GIT REPO Why i needed something like this I was creating a traffic system which needed me to be able to check if a guy entered any crossroads and colshapes wasn't the thing i wanted + i wanted to sell farms by their shape and some of them wasn't shaped exaclty foursquare and i needed a little more, so i craeted this script to be able to make those things possible easily. Features You can create 4 types of zone which are defined az mp.zones.types in the script. You can loop through your zones and remove them. You can register zones by desired name. You may delete any zone any time. Server-side events also included. It supports Z axis which is still not very clever since it's not a big deal, all i needed was to prevent people to trigger some events from above the ground Have 4 testing functions which let you draw your zone on the map to see how it fits You can now register zones by any vector pointes above 2 Functions (Client-Side) /* Check if a zone is registered by it's name and it's dimension */ mp.zones.isZoneRegistered(zoneName, dimension) /* Unregister a zone by it's name and dimension */ mp.zones.unRegisterZone(zoneName, dimension) /* Register a zone by a list of vectors, height , zoneName, type, dimension Vectors: an arrayList of vectors depending on the type of the zone you are choosing to create for example if you are creating a 2PointZone all you need is 2 Vectors inside an array which are the starting point and the ending point and you have to pass height as -1 since it's not used in that type of zone if you are creating a 4PointZone you need to have an arrayList of vectors with 4 Vectors inside and height is used this time, same as 4PointZone in 6PointZone you need to pass 6 vectors and the height. Returns ZoneObject (contains name, type, positions, and zone.data [which never used it my self]) */ mp.zones.registerZone(Vectors, height, zoneName, type, dimension) /* Get ZoneObject by it's name and dimension */ mp.zones.getZoneByName(zoneName, dimension) /* Draw a 2PointZone for testing Requires 2 vectors */ mp.zones.drawZoneBy2(startPosition, endPosition) /* Draw a 4PointZone for testing Requires 4 vectors and height */ mp.zones.drawZoneBy4(Vectors, height) /* Draw a 6PointZone for testing Requires 6 vectors and height */ mp.zones.drawZoneBy6(Vectors, height) /* Draw a NPointZone for testing Requires array of vectors and height Unlimited number of points supported by this code */ mp.zones.drawZoneByN(Vectors, height) /* Check whether a point on the map is inside the zone or not */ mp.zones.isPointInZone(point, zoneName, dimension) /* This is a list of registered zone names used for looping through zones */ mp.zones.registered Events (Server-Side/Client-Side) On client side the player parameter is mostly the local player it self. /* mp.events.add('ZoneManager_PlayerEnterZone', (player, zoneName) => { //Your Code }) mp.events.add('ZoneManager_PlayerExitZone', (player, zoneName) => { //Your Code }) */ Changelog 4/1/2020 - v0.0.1 - Added support for dimension - Addes support for NPointZone type which let you create zones by any number of points - Changed some functions to support dimensions, if you already used the script you may need to change them - getZoneByName now returns undefined if the zone on the dimension does not exists (this thing existed before but i forgot to mention it before)
    2 points
  2. 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
  3. Version 1.0.0

    1346 downloads

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