132 files

  1. Smooth Throttle Script

    This resource will stop your vehicle from constantly skidding when acceleration. It will also stop you from reversing when you're braking. You will come to a complete stop and then you have to press reverse again to actually reverse. Automatic brake lights are included.
    Note that you can hold your handbrake (space bar) down and accelerate and this will temporarily remove the throttle limiter.

    446 downloads

       (3 reviews)

    2 comments

    Updated

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

    506 downloads

       (1 review)

    0 comments

    Submitted

  3. DxDraw Message Bars

    DxBar messages is a light easy to use script to show some notifications for your players. Just calling one event with your custom message and colored text.
    Usage:
    //Server-side player.call('Createinfo', '<text>', R, G, B, 'top or bot') //Client-side mp.events.call('Createinfo', '<text>', R, G, B, 'top or bot') Images are available at the old topic in forums, due to inability to restore them. (images will be added asap).

    94 downloads

       (2 reviews)

    0 comments

    Updated

  4. [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(); }  

    298 downloads

       (3 reviews)

    0 comments

    Updated

  5. Vehicle Manager

    Vehicle Manager is a easy to use device to manage your vehicle easily. Control your doors, lights, Auto-seat belts, engine, and much more with one click.
    Usage:
    Press B to open/close the Manager. Click any button you want to control the vehicle.  

    1125 downloads

       (2 reviews)

    2 comments

    Submitted

  6. Interactive Phone for CEF

    I created this phone for a previous GTA MP Mod. I never properly finished it but it has useful features such as:
    Lockscreen push notifications Home button Custom phone style support Apps that open divs. Phones are stored in phones/phones/[phone-name]/
    There is a JSON file that contains the needed info for the phone as well as an image for the phone.
    This is unfinished

    1891 downloads

       (7 reviews)

    4 comments

    Submitted

  7. Scaleform Messages

    This resource lets you display GTA V/Online styled shard messages.
    Installing:
    Put scaleform_messages into your server's client_packages directory, then add require('scaleform_messages/index.js'); to index.js.
    Available events:
    ShowMidsizedMessage // title, message, time = 5000 ShowMidsizedShardMessage // title, message, bgColor, useDarkerShard, condensed, time = 5000 ShowWeaponPurchasedMessage // title, weaponName, weaponHash, time = 5000 ShowPlaneMessage // title, planeName, planeHash, time = 5000 ShowShardMessage // title, message, titleColor, bgColor, time = 5000 Clientside example (will show different messages when you press numpad0 - numpad6):
    mp.keys.bind(0x60, false, () => { mp.events.call("ShowMidsizedMessage", "Title", "ShowMidsizedMessage example"); // or: mp.game.ui.messages.showMidsized("Title", "ShowMidsizedMessage example"); }); mp.keys.bind(0x61, false, () => { mp.events.call("ShowMidsizedShardMessage", "Title", "ShowMidsizedShardMessage example", 21, false, false); // or: mp.game.ui.messages.showMidsizedShard("Title", "ShowMidsizedShardMessage example", 21, false, false); }); mp.keys.bind(0x62, false, () => { mp.events.call("ShowMidsizedShardMessage", "Title", "ShowMidsizedShardMessage example 2 (condensed = true)", 21, false, true); // or: mp.game.ui.messages.showMidsizedShard("Title", "ShowMidsizedShardMessage example 2 (condensed = true)", 21, false, true); }); mp.keys.bind(0x63, false, () => { mp.events.call("ShowWeaponPurchasedMessage", "Title", "ShowWeaponPurchasedMessage example", -2084633992); // or: mp.game.ui.messages.showWeaponPurchased("Title", "ShowWeaponPurchasedMessage example", -2084633992); }); mp.keys.bind(0x64, false, () => { mp.events.call("ShowPlaneMessage", "Title", "ShowPlaneMessage example", 788747387); // or: mp.game.ui.messages.showPlane("Title", "ShowPlaneMessage example", 788747387); }); mp.keys.bind(0x65, false, () => { mp.events.call("ShowShardMessage", "Title", "ShowShardMessage example"); // or: mp.game.ui.messages.showShard("Title", "ShowShardMessage example"); }); mp.keys.bind(0x66, false, () => { mp.events.call("ShowShardMessage", "Title", "ShowShardMessage example (colored)", 0, 11); // or: mp.game.ui.messages.showShard("Title", "ShowShardMessage example (colored)", 0, 11); }); Serverside example (will show a wasted message when you die):
    mp.events.add('playerDeath', (player) => { player.call("ShowShardMessage", ["~r~Wasted", "You died."]); });  

    793 downloads

       (8 reviews)

    0 comments

    Updated

  8. Mugshot Board

    This resource adds a way to make the local player hold a mugshot board with custom text on it, the custom text and animation won't be synced to others.
    You can also use this resource to understand how rendertarget system works which lets you display scaleform on certain game objects.
    Installing:
    Put policetext into your server's client_packages directory, then add require('policetext/index.js'); to index.js.
    Available functions/events:
    mp.players.local.mugshotboard.show -> mp.events.call("ShowMugshotBoard") -> Params: title, topText, midText, bottomText, rank = -1 mp.players.local.mugshotboard.hide -> mp.events.call("HideMugshotBoard") -> Params: - And you can access if the local player has a mugshot board or not by using the hasMugshotBoard global variable. Clientside example (pressing F10 will give your character a mugshot board, pressing it again will remove it):
    mp.keys.bind(0x79, false, () => { if (!hasMugshotBoard) { mp.players.local.mugshotboard.show(mp.players.local.name, "Top Text", "Mid Text", "Bottom Text", 15); } else { mp.players.local.mugshotboard.hide(); } });  

    219 downloads

       (2 reviews)

    1 comment

    Submitted

  9. MoneyAPI

    This resource probably won't get future updates, check out Currency API instead.
    Easy to use money system for your server. It handles saving&loading and provides you a custom data key to get/set a player's money.
    Installing
    Put the files you downloaded in their respective places Add require('moneyapi') to client_packages/index.js Open packages/moneyapi/constants.js and put your MySQL info (maybe edit the settings too while you're at it...) Congrats, you're all done Settings (packages/moneyapi/constants.js):
    startingMoney use this setting to change how much money players start with. Default: 0 autoSaveInterval use this setting to change how frequent auto saving happens (in minutes), you can set it to 0 if you want to disable auto saving. Default: 5 Example
    You can access a player's money from customMoney property using either .data.customMoney or .getVariable("customMoney").
    mp.events.addCommand("smoney", (player, _, money) => { // set the player's money to the specified amount money = parseInt(money); if (!isNaN(money)) { player.data.customMoney = money; } else { player.outputChatBox("Invalid amount specified."); } }); mp.events.addCommand("cmoney", (player, _, amount) => { // change the player's money by the specified amount amount = parseInt(amount); if (!isNaN(amount)) { player.data.customMoney += amount; } else { player.outputChatBox("Invalid amount specified."); } }); mp.events.addCommand("buyhp", (player) => { // refill a player's health for $100 if (player.data.customMoney >= 100) { player.health = 100; player.data.customMoney -= 100; player.outputChatBox("Refilled health for $100."); } else { player.outputChatBox("You don't have $100."); } }); Notes
    First of all, thanks to @Donboo for their MySQL example which you can find here. This script won't save while the server is shutting down but will save player money when they disconnect or when autosave happens. This script uses an int(11) field to store a player's money. If you think $2147483647 isn't enough, you might want to change it. For some reason, MoneyAPI HUD elements will be off position in 1914x1080 windowed resolution. This script won't update the money display on the ESC/pause menu. (This note is obsolete if you're using the GameHUD version)

    1537 downloads

       (8 reviews)

    2 comments

    Updated

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

    821 downloads

       (5 reviews)

    0 comments

    Updated

  11. Walking Styles

    This resource lets players choose their walking style. Selected walking style is synced to other players.
    Installing
    Put the files you downloaded in their respective places Download & install BasicMenu or NativeUI if you haven't yet, this script needs it Add require('walkingstyles') to client_packages/index.js All done Controls
    F5 Key - Show/hide walking style menu.
    Adding/Removing Walking Styles
    You can add/remove walking styles by changing walkingStyles array inside packages/walkingstyles/index.js, make sure your AnimSet is valid!

    790 downloads

       (4 reviews)

    2 comments

    Updated

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

    857 downloads

       (5 reviews)

    3 comments

    Updated

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

    645 downloads

       (3 reviews)

    1 comment

    Updated

  14. Timer Bars

    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;  

    391 downloads

       (3 reviews)

    1 comment

    Updated

  15. Timecycle Modifiers

    This resource lets you preview many of the available timecycle modifiers in GTA V.
    Installing
    Download & install the latest BasicMenu or NativeUI if you haven't already, this script needs it Drop the timecycpreview folder to your server's client_packages Add require('timecycpreview') to client_packages/index.js All done Controls
    Page Up - Increase timecycle modifier strength Page Down - Decrease timecycle modifier strength F9 - Show/hide the menu  
     

    95 downloads

       (2 reviews)

    0 comments

    Updated

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

    619 downloads

       (3 reviews)

    0 comments

    Updated

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

    244 downloads

       (3 reviews)

    2 comments

    Updated

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

    504 downloads

       (1 review)

    0 comments

    Updated

  19. GTAO Outfits

    This script reads outfits from scriptmetadata.meta and lets you use them in game. There are currently 1382 outfits for both male and female freemode characters.
    Using: /outfit [id]
    Updating scriptmetadata.meta
    scriptmetadata.meta gets more outfits with every update, here's how you can update it:
    OpenIV:
    Go to update\update.rpf\common\data Right click on scriptmetadata.meta Select save content/export Take the extracted file and replace it with the one your server is using CodeWalker RPF Explorer:
    Go to update\update.rpf\common\data Right click on scriptmetadata.meta Select extract raw Take the extracted file and replace it with the one your server is using Notes
    Some outfit IDs might do nothing, ask Rockstar In RAGE version 0.3, drawable IDs above 255 aren't supported so you might have some weird looking outfits. From what I heard this is not a problem in upcoming 0.4. Credits to OpenIV and CodeWalker devs, this script wouldn't be possible without their efforts.

    611 downloads

       (5 reviews)

    0 comments

    Updated

  20. 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`}.`); });  


    296 downloads

       (1 review)

    0 comments

    Updated

  21. Basic Player Blips

    This resource adds GTAO style player blip/icon to streamed in players. Their icon will be removed when they stream out.
    You can change the color of player blips by setting blipColor using Entity::data or Entity::setVariable on serverside. For a list of blip colors, visit the wiki page about blips.
     
    Installing
    Put playerblips into your server's client_packages directory, then add require('playerblips'); to index.js.
     

    770 downloads

       (5 reviews)

    0 comments

    Updated

  22. Firing Modes

    This script was originally made by EnforcerZhukov for singleplayer. (you can find it here) All credit goes to him.
    I added extra stuff such as remembering firing mode (until you disconnect) per weapon, safety mode, HUD item and sound effects.
     
    Installing & Using
    Put guncontrol into your server's client_packages directory, then add require('guncontrol'); to index.js. Press F6 key to switch between firing modes.  
    Firing Modes
    Auto: Default GTA shooting. Burst: Shoot 3 bullets every time you fire. (not supported on all weapons) Single: Shoot 1 bullet every time you fire. (not supported on all weapons) Safe: Disables shooting.  
     

    145 downloads

       (1 review)

    0 comments

    Updated

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

    305 downloads

       (1 review)

    0 comments

    Submitted

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

    1318 downloads

       (5 reviews)

    4 comments

    Updated

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

    444 downloads

       (5 reviews)

    0 comments

    Submitted