137 files

  1. GTAO Suicide

    This script adds the suicide feature of GTA Online.
    You can commit suicide by using /suicide command. Your character will shoot itself if you're holding a pistol and take pills otherwise.
     
    Installing
    Put the files you downloaded in their respective places Add require('suicide') to client_packages/index.js All done

    214 downloads

       (2 reviews)

    0 comments

    Submitted

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

    287 downloads

       (1 review)

    1 comment

    Updated

  3. Basic Vehicle System

    First Credits for @valdirdd for the Speedometer that i Edited....
    And a big thank for @CommanderDonkey
     
    for that fancy design of the speedometer.
    FEATURES : 
    Fuel System,
    Distance Calculation

    And a Notice to all that would use it... its a german version so... u must be change it if u want another type.

    INSTALL :
    Put the files in the served folders...
    add clientside in ur index.js
    require('basicVehSystem');


    to change to MPH use the following Tutorial...

    I Hope u enjoy the files... Bugs please send me...

    NOTICE:
    to change the gas mileage edit line 30 in ur index.js in packages/basicVehSystem/index.js
     
    let rest = (Veh_data*10); change the Multicator '10' to another value.... it calculate ur driven distance at the moment... with this multiplicator
     


     

    835 downloads

       (1 review)

    4 comments

    Updated

  4. n0minal's Interior Browser (client-side only!)

    n0minal's Interior Browser 
    Hello Dear Ragers,
    Today I bring you guys a simple - but useful - browser for interiors to preview.
    I spent something like ~2 hours to make it, so it might contain bugs, if you find a bug please post it in here or contact me by PM and I'll fix it as soon as possible.
    Commands ⌨️
    There are two commands (and binds for it): 
    /interior (or shortened: /i): Loads the Interior Browser menu, in which you can interact and select an interior to preview. /leave (or shortened: /l): Leaves the current interior and gets teleported back to your first position when you called the browser for the first time. The Script 📰
    Download the .zip file and extract it inside your client-packages folder, after that, create (or edit) a index.js file in your client_packages root folder with the following content:
    //requires interior-browser package require("interior-browser"); and you're ready to go!
    Github Link:  https://github.com/n0minal/interior-browser That's all,
    See you on the next release!

    516 downloads

       (2 reviews)

    0 comments

    Updated

  5. Character Previewer

    This resource will help work with player clothes. I hope, someone will add all clothes screens to wiki  😀
     

    357 downloads

       (1 review)

    0 comments

    Updated

  6. CarShop Simple System

    HI all, here is a simple CarShop system, pretty optimized in client side, but not this much server-side.
     
    This CarShop adapt himself to what you give it, from the config file, let me explain:
    You define some parameters in the config file, for your carShop (Vehicles classses, marker position...), and the client side system with do the stuff.
    Here is a example of a carShop:
    "Boat": { // Shop Name "Position": { // vehicle position for the showcase, camera is auto defined from this "x": -729, "y": -1361, "z": 0.05, "rz": 136 }, "Marker": { // Marker for the player when entering shop "x": -815.93, "y": -1346.3, "z": 5.15 }, "Park": { // When you buy your vehicle, here is where you put vehicle location, it is random ! :D ANd a waypoint is created in client side to show where it is "0":{"x":-725.33,"y":-1325.299,"z":0.11,"rz":228.29}, "1":{"x":-727.42,"y":-1329.044,"z":0.11,"rz":230.54}, "2":{"x":-729.79,"y":-1333.469,"z":0.11,"rz":230.29}, "3":{"x":-731.4,"y":-1332.34,"z":0.11,"rz":228.29}, "4":{"x":-734.63,"y":-1334.34,"z":0.11,"rz":228.29}, "5":{"x":-738.73,"y":-1342.34,"z":0.11,"rz":228.29} }, "Blip": 427, // Blip for the map "Class": [ 14 ], // vehicle classes, see below for list "Name": "Boat Shop" // Displayed Name } So, aswell, when connect this will create a Marker / Blip on the marker position of the config file.
    And that's all for creating a car shop !
    Now, you can define prices easily aswell:
    In the vehicle_Shop.json file, you have the list of every vehicle which are available for selling. You have the hash, displayName, name, manufacturer & the price, define dby 15000 by default, but you can define a new price for every vehicle by yourself.
    That's all you have to do, now do /carShop [YouCarShopName], and see the magic happening.
     
    Here is the vehicles class name:
    Sedans SUVs Coupe Muscle Sport Classic Sport Super Moto Off-Road Industrial Utility Vans Cycles Boats Helicopters Planes Service Emergency Military Commercial Trains I think i gave you all the stuff to make it works, i hope you like it!
    By default you have 3 carshops, boat / low budget car/ helicopters.

    1364 downloads

       (1 review)

    9 comments

    Updated

  7. Simple Vehicle Performance Tuner

    Hello, I've decided to upload one of my first creations on Rage, it being the CEF-based vehicle performance tuning menu. 
    You are free to use this to your liking and edit it as long as you leave the credits in.
    Download:
    https://github.com/Roziiii/ragecarmenu
    !!!IMPORTANT!!! The download on here will only be updated when bigger changes occur, but if you want the latest updates you should always download from the github.
    CURRENT VERSION ON HERE: 1.0.4
    CURRENT GITHUB VERSION: 1.0.4

    596 downloads

       (2 reviews)

    9 comments

    Updated

  8. Headshots

    Small script that adds instantly killing headshots.
     
    Installing
    Put headshots into your server's client_packages directory, then add require('headshots'); to client_packages/index.js.

    476 downloads

       (6 reviews)

    0 comments

    Submitted

  9. AwardAPI

    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)); });  

    132 downloads

       (2 reviews)

    0 comments

    Updated

  10. Hunting

    I converted this system from a previous GTA Multiplayer Client. I never had time to update it or add new features so it comes as is.
    It adds animals that are fully synced to each client with different states such as:
    Fleeing Grazing Wandering There are two animals to start:
    Deer Boar + More can be easily added. It also includes a command that allows you to pickup an animal that is dead. (Mainly for RP servers)
     
    MAY REQUIRE SMALL TWEAKS TO WORK

    603 downloads

       (2 reviews)

    4 comments

    Updated

  11. G button for Passenger

    Improved version of already existing passenger script posted by George.
    * Upon pressing G button this script searches for the first closest and free seat in the vehicle. If it finds one it makes player to enter into the seat.

    658 downloads

       (0 reviews)

    3 comments

    Updated

  12. Levels

    Installing
    Put the files you downloaded in their respective places Add require('levels') to client_packages/index.js Open packages/levels/database.js and put your MySQL config All done  
    API
    /* Player level and XP is accessed through currentLevel and currentXP shared data keys. You should not change the value of these shared data keys, just use them to get data and use the API to set data. */ player.data.currentLevel OR player.getVariable("currentLevel") // returns level of the player player.data.currentXP OR player.getVariable("currentXP") // returns XP of the player /* setLevel(newLevel) Sets the player's level to newLevel. (will also change player's XP to level XP) */ player.setLevel(newLevel) /* setXP(newXP) Sets the player's experience to newXP. (will update player's level) */ player.setXP(newXP) /* changeXP(xpAmount) Changes the player's experience by xpAmount. (will update player's level) */ player.changeXP(xpAmount) /* hasReachedMaxLevel() Returns whether the player has reached max level or not. */ player.hasReachedMaxLevel() /* saveLevelAndXP() Saves the player's level and XP data. Automatically called a player disconnects. */ player.saveLevelAndXP()  
    Events
    These events are called on serverside when a player's level or XP changes.
    /* playerXPChange This event is called when a player's XP changes. */ mp.events.add("playerXPChange", (player, oldXP, newXP, difference) => { // code }); /* playerLevelChange This event is called when a player's level changes. */ mp.events.add("playerLevelChange", (player, oldLevel, newLevel) => { // code });  
    Example Script
    Here's a script that lets you change your level/XP and writes it to console:
    mp.events.addCommand("setlevel", (player, newLevel) => { newLevel = Number(newLevel); if (!isNaN(newLevel)) { player.setLevel(newLevel); } else { player.outputChatBox("SYNTAX: /setlevel [new level]"); } }); mp.events.addCommand("changexp", (player, amount) => { amount = Number(amount); if (!isNaN(amount)) { player.changeXP(amount); } else { player.outputChatBox("SYNTAX: /changexp [amount]"); } }); mp.events.addCommand("setxp", (player, amount) => { amount = Number(amount); if (!isNaN(amount)) { player.setXP(amount); } else { player.outputChatBox("SYNTAX: /setxp [new xp amount]"); } }); mp.events.add("playerXPChange", (player, oldXP, newXP, difference) => { console.log(`${player.name} ${difference < 0 ? "lost" : "gained"} some XP. Old: ${oldXP} - New: ${newXP} - Difference: ${difference}`); }); mp.events.add("playerLevelChange", (player, oldLevel, newLevel) => { console.log(`${player.name} had a level change. Old: ${oldLevel} - New: ${newLevel}`); });  
    Credits
    Unknown Modder - RP List IllusiveTea - Rank bar scaleform  
    Notes
    This script will load and save level and XP data of players on its own but a function to save player data yourself is provided. Like said before, don't change the values of currentLevel and currentXP shared data keys. Maximum reachable level is 7999 but a player can earn XP until his rank bar is full, kinda reaching 8000. Use player.hasReachedMaxLevel() to detect if a player is level 7999 and his rank bar is full.  

    456 downloads

       (5 reviews)

    0 comments

    Submitted

  13. Vehicle F/G keys entering

    A ~20 lines client-side script to enable vehicle entering using F/G keys. Radius, max vehicle speed to enter and keys are customizable. This script doesn't search the nearest passenger seat, but the first empty (since it's just an example of how to do that at all and show that it really was customizable).

    1348 downloads

       (5 reviews)

    4 comments

    Updated

  14. Easy Blip Creator

    Easy way to create blips:  create, teleport to blip and delete. The blips are loaded on script load.
    Install:
    Copy files to your server-files and don't forget to edit index.js in client_packages if you have more resources.

    Commands: 
    /blipc or /blipcreator  - Enable and disable creator mod /blipd or /blipdelete - Open menu with blips to teleport or delete Keys:
    '  (single quotation marks) - Open and close creator menu. (Only works if creator mod is enabled) 1 (number one) - Create blip in your position with the config pre-binded (Only works if you bind) 2 (number two) - Create blip in your position with the config pre-binded (Only works if you bind)  
    The blips are saved in json file. if you want change the directory go to (packages/BlipCreator/index.js) and change const SAVE_FILE = './blips.json';
    Anyone can create and delete blips, if you have permission system or whatever, put your verifications in the commands: function blipCreator(player) and function delBlips(player) and also in events mp.events.add("delBlip", (player, id) => and mp.events.add("blipCreate", (player, data) => in file (packages/BlipCreator/index.js)
     
    Did you see a grammar error please coment  thks

    917 downloads

       (2 reviews)

    3 comments

    Submitted

  15. 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", ["Row number 1", "Row number 2","Row 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.

    175 downloads

       (0 reviews)

    1 comment

    Submitted

  16. Speedometer KM/h, RPM and Fuel

    Design by @CommanderDonkey, link here.

    For install just copy files to your server.
    Don't forget edit index.js into client_packages if you have more resources.

    1708 downloads

       (2 reviews)

    0 comments

    Submitted

  17. 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()

    317 downloads

       (1 review)

    0 comments

    Submitted

  18. Simple Admin System (JSON)

    (Converted from GT-MP 31 MAY - Originally created 7 APR)
    I decided to convert my old resource to provide examples for others as well as learn the new API of RageMP.
     
    A simple approach to an admin system that makes use of JSON instead of a common SQL Database.
    Keep in mind this is nothing but a simple admin system to inspire someone else or continue to work on. There's plenty of commands missing if you intend to fit it to your own gamemode. I will mention that the ban system could use more work. At the moment it's easy to bypass seeing it's only based on the socialClubName of a player. Anyway, it's just an attempt at messing around a bit with JSON. If you're going to create a larger system I'd advice doing it differently. To alter your admin level, first register ingame and open up your JSON file. In the file you'll see your admin level that can range from 1-5. 1 being Junior & 5 being defined as Mangement.
    Command Description /login [password] Used to login to your admin account and gain access to the commands. /register [adminName] [password] Used to register an admin account. Currently there's no restrictions to prevent everyone from doing so. /ahelp Will display all commands avaliable to admins. /mute [target] Mutes the player and makes him unable to use the chat. /unmute [target] Unmutes the player and allows him to use the chat again. /spawnwep [wepName] [ammo] Creates a weapon and gives it to yourself with 9999 ammo unless specified otherwise. /spawncar [vehicleName] [color1] [color2] Create a vehicle and places you in the driversseat. Uses default color 1 unless specified otherwise. /setkevlar [target] [amount] Gives the target the desired amount of armor. /sethealth [target] [amount] Gives the target the desired amount of health, unless the target is dead. /goto [target] Teleports you to the target's position. /gethere [target] Teleports the target to your position. /kick [target] [reason] Simply kicks the player from server and display a message for everyone to see. /ban [target] [reason] Kicks the player and creates a ban file with the specified reason.

    1900 downloads

       (0 reviews)

    1 comment

    Submitted

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

    103 downloads

       (0 reviews)

    0 comments

    Updated

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

     

     

    392 downloads

       (0 reviews)

    0 comments

    Updated

  21. Basic Menu (Discontinued)

    This project is discontinued, consider using NativeUI instead.
     
    Bare-bones menu script.
    Installing:
    Put basicmenu into your server's client_packages directory, then you can add const whatever = require("basicmenu"); to the clientside scripts that you want to add a menu. Example code explains this better.
    Properties & Functions:
    BasicMenu
    title | Get & Set | Title of the menu. (string) x | Get & Set | X position of the menu. (float) y | Get & Set | Y position of the menu. (float) items | Get & Set | An array containing all items of the menu. (MenuItem array) hoverItem | Get & Set | Index of the item you're hovering on with your cursor, -1 if not hovering on anything. (int) visible | Get & Set | Visibility of the menu. (bool) disableESC | Get & Set | Allow/disallow menu from being closed by pressing ESC key. (bool) titleFont | Get & Set | Font ID of the title. (int) titleColor | Get & Set | Text color of the title. (array containing rgba) itemsPerPage | Get & Set | How many items are visible on a page of the menu. (int) currentPage | Get & Set | Current page of the menu. (int) setBanner(lib, banner) | Sets the menu's banner to another texture, setBanner("shopui_title_carmod", "shopui_title_carmod") will set the menu banner to be Los Santos Customs one for example. MenuItem
    title | Get & Set | Title of the item. (string) disabled | Get & Set | Whether the item is able to be selected or not. (bool) textColor | Get & Set | Color of the item's title. (array containing rgba) bgColor | Get & Set | Color of the item's background. (array containing rgba) icon | Get & Set | ID of the item's icon. (int) font | Get & Set | Font ID of the title. (int) outline | Get & Set | Outline of the item. (bool) shadow | Get & Set | Shadow of the item. (bool) rightText | Get & Set | Right text of the item. (string) Icon IDs:
    You can put icons to menu items (even though there are only 3 options) if you want to. Just do myMenuItem.icon = desired icon ID.
    MenuItemIcons.None (0) = No icon
    MenuItemIcons.Lock (1) = Lock icon
    MenuItemIcons.Tick (2) = Tick/checkmark icon 
    Events:
    There are three events, see example for how to use them.
    OnMenuItemSelected(menu, selectedMenuItem, selectedMenuItemIndex) /* Will be called when a menu item is clicked on/selected. menu - The menu that contained the selected item. (BasicMenu) selectedMenuItem - The menu item that was selected. (MenuItem) selectedMenuItemIndex - Index of the menu item on the selected menu. (int) */ OnMenuPageChanged(menu, oldPage, newPage) /* Will be called when a menu's page is changed. menu - The menu that had a page change. (BasicMenu) oldPage - Old page. (int) newPage - New page. (int) */ OnMenuClosed(menu) /* Will be called when a menu is closed. menu - The menu that was closed. (BasicMenu) */ Controls:
    Hovering on an item and left clicking - select item
    ESC - close menu (if disableESC isn't set to true)
    Left Arrow - previous page
    Right Arrow - next page
    Example Script:
    const menuLib = require("basicmenu"); // Creating a menu // you can just do: let exampleMenu = new menuLib.BasicMenu("Test Menu", 0.5, 0.4); let exampleMenu = new menuLib.BasicMenu("Test Menu", 0.5, 0.4, "commonmenu", "interaction_bgd", { itemSelected: function(item, itemIndex) { mp.gui.chat.push(`MenuEvent(${this.title}) - itemSelected: ${item.title} - ${itemIndex}`); }, pageChanged: function(oldPage, newPage) { mp.gui.chat.push(`MenuEvent(${this.title}) - pageChanged: ${oldPage} to ${newPage}`); }, closed: function() { mp.gui.chat.push(`MenuEvent(${this.title}) - close`); } }); exampleMenu.itemsPerPage = 5; // make the menu show 5 items per page, this is default by 10 let normalItem = new menuLib.MenuItem("Normal Item"); normalItem.rightText = "Free"; exampleMenu.items.push(normalItem); let redBackground = new menuLib.MenuItem("Red Background Item", [255, 255, 255, 255], [255, 0, 0, 200]); redBackground.rightText = "~g~$500"; exampleMenu.items.push(redBackground); let greenText = new menuLib.MenuItem("Green Text Item", [0, 255, 0, 255]); exampleMenu.items.push(greenText); // You won't be able to click on disabled items. let disabledItem = new menuLib.MenuItem("Disabled Item"); disabledItem.disabled = true; exampleMenu.items.push(disabledItem); let itemWithIcon = new menuLib.MenuItem("Item with Icon", [255, 255, 255, 255], [0, 0, 0, 200], function() { mp.gui.chat.push("You selected the item with icon, why?"); }); itemWithIcon.icon = menuLib.MenuItemIcons.Tick; itemWithIcon.rightText = "Pretty cool"; exampleMenu.items.push(itemWithIcon); let disabledWithIcon = new menuLib.MenuItem("Top Secret"); disabledWithIcon.disabled = true; disabledWithIcon.icon = menuLib.MenuItemIcons.Lock; exampleMenu.items.push(disabledWithIcon); // You can disable ESC menu closing by using disableESC property. exampleMenu.disableESC = true; // This is important as menus are not visible by default. exampleMenu.visible = true; // Events // OnMenuItemSelected, will be called when a menu item is clicked on. mp.events.add("OnMenuItemSelected", (menu, selectedItem, selectedItemIndex) => { mp.gui.chat.push(`Item selected on menu (${menu.title}) - ${selectedItem.title} (Index: ${selectedItemIndex})`); }); // OnMenuPageChanged, will be called when a menu's current page changes. mp.events.add("OnMenuPageChanged", (menu, oldPage, newPage) => { mp.gui.chat.push(`Menu page changed (${menu.title}) - ${oldPage} to ${newPage}`); }); // OnMenuClosed, will be called when a menu item is closed. mp.events.add("OnMenuClosed", (menu) => { mp.gui.chat.push(`Menu closed (${menu.title})`); }); // F6 key will toggle the visibility of exampleMenu mp.keys.bind(0x75, false, () => { exampleMenu.visible = !exampleMenu.visible; });  

    836 downloads

       (5 reviews)

    0 comments

    Updated

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

    521 downloads

       (1 review)

    0 comments

    Updated

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

    301 downloads

       (0 reviews)

    0 comments

    Updated

  24. Character Creator

    Custom character creator resource, use /creator to access it.
    Installing
    Put the files you downloaded in their respective places Download & install NativeUI if you haven't yet, this script needs it Add require('charcreator') to client_packages/index.js All done Notes
    There might be bugs here and there especially on clientside The code is pretty messy right now, will be improved in the future  
     

    3837 downloads

       (10 reviews)

    6 comments

    Updated

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

    663 downloads

       (3 reviews)

    1 comment

    Updated