139 files
-
Weapon Spawner
By rootcause
Requirements
You need to download & install these resources first:
NativeUI Weapon Component Sync Weapon Tint Sync
Installing
Put the files you downloaded in their respective places Add require('weaponspawner') to client_packages/index.js All done
Using
You can use the /weapons command to access the weapon spawner menu.
Issues
Some components might not have a visible name because Rockstar didn't give them one. Equipped component displaying might not be accurate at first but will be fixed after you apply/remove a component.
Source code is available on GitHub in case you don't want to download: https://github.com/root-cause/ragemp-weapon-spawner
259 downloads
-
GTA SA Classic Menu
By adri1
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(); });
10 downloads
(7 reviews)0 comments
Submitted
-
Map Editor 2 [BETA][Fixed Markers]
By notsosmart
MAP EDITOR 2 [BETA v2.0.0] (Free and doesn't have keyboard only controls)
Known Bugs: A million of them, don't tell me about it.
(Server)
Drop the MapEditor2.dll file in your resource resources
(Client)
Drop the MapEditor2.cs and Objects.cs files in your cs_packages folder
Info:
Server Commands:
/loadmap name --Globally loads the map instead of client-sided only
/unloadmap name
Client Controls:
Press M to start/stop the editor
WSAD to move
Q & E move you down and up
Hold right-click to move, while moving you can scroll down/up to increase speed
Hold left control to move slow
Hold shift to move fast
Press Delete to delete the highlighted object
You can drag objects by holding left-click on them
You can duplicate objects by right-clicking and then clicking "Clone Object"
"Exit Here" Button - Drops you at the location your camera is
"Exit Back" Button - Drops you back at the original location you started the editor
"Place Objects On Ground" Button - When you drag, the object will be placed on the ground properly
"Save Map" Button - Hover over the name box to input a name, click save to save the map
"Load Map" Button - Hover over the name box to input a name, click load to load the map (Client-sided load)
"Clear Map" Button - Wipes the current loaded map
Upcoming features;
-Vehicle list (Support exists)
-Checkpoints
-Undo & Redo
-Group select
-Adding objects to favorites (System in place but isn't finished)
853 downloads
-
RAGE MP Clothes Addon For MP Charater
By Soupiest
With this dlcpack, you're able to add up to hundreds of clothing WITHOUT replacing anything from the original vanilla game.
In this pack, you'll be able to add the following as addon content for both MP_Female and MP_Male:
Heads/Faces (Up to 111!) Beards/Masks (Up to 159!) Hairstyles (Up to 185!) Pants (Up to 128!) Feets/Shoes (Up to 127!) Secondary Tops (Up to 106!) Decals/Emblems (Up to 93!) Primary Tops (Up to 127!) How does it work?:
From learning the hex codes in the .ymt files and spending hours figuring out where everything was, I made changes and added things into the .ymt files to make this possible. However, the dlcpack overwrites the initial MP clothing dlcpack (the original clothing from the game, albeit it doesn't REPLACE any clothing) so the limits are added BEFORE any new dlc clothing. DLC clothing comes after the limits as they were pushed further to make way for the newer limits adjusted.
In the future I will possibly adjust it even more if it's necessary.
How do I get addon content to work?
Simple.
Go into streamedpeds_mp.rpf From there, it should be easy sailing. MP_Female stuff goes in mp_f_freemode_01 and MP_Male stuff goes into mp_m_freemode_01. Don't forget to affix (basically dragging a file into the "ArchiveFix" program) "streamedpeds_mp" or "streamedpeds_mp" if you added anything into those archive .rpfs. Replace them inside the .rpf archive after affixing. As for naming them, ONLY name them based off what I have shown here:
Head DrawableIDs: (46 - 157) Models: head_xxx_r Textures: head_diff_000_a_whi (or _chi, _bla, _lat, _pak, _ara at the end) Berd/Mask DrawableIDs: (8 - 167) Models: berd_xxx_u Textures: berd_diff_xxx_a_uni Hair DrawableIDs: (38 - 223) Models: hair_xxx_u Textures: hair_diff_xxx_a_uni Pants DrawableIDs: (16 - 144) Models: lowr_xxx_r Textures: lowr_diff_xxx_a_whi Feet/Shoes DrawableIDs: (16 - 143) Models: feet_xxx_u Textures: feet_diff_xxx_a_whi Accessory/Tops DrawableIDs: (16 - 122) Models: accs_xxx_u Textures: accs_diff_xxx_a_uni Decal/Emblem DrawableIDs: (0 - 93) Models: decl_xxx_u Textures: decl_diff_xxx_a_uni Tops2 DrawableIDs: (16 - 143) Models: jbib_xxx_u Textures: jbib_diff_xxx_a_uni Start from the number from one of the components of which you're adding from the number the limit suggest. (For an example, if you're adding some shoes mod for the first time, then rename the files to "feet_016_u" and feet_diff_016_a_whi)
139 downloads
-
CarShop Simple System
By Protocole
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.
1436 downloads
-
Sudodude's PedPicker
By sudodude
This is a simple module/script for changing the player model synced client/server. The values in the list are the model names that can be found on https://wiki.rage.mp/index.php?title=Peds. Click on a model in the list and you will switch to that model.
*F7* to open PedPicker Menu in game.
You should be able to just drop the files within the client_packages/packages directories and then add the requirements to the respective index.js files within those directories.
All source code is given from within the file download, but you can also find the repo here: AZAMOEBA_RAGE_PEDPICKER. If you are using this I'd appreciate a star or just let me know you found any of this useful. If I forgot a credit please let me know and I will get back to you and fix whatever is necessary. Enjoy!
Message for any comments/questions and I'll try to get back asap.
125 downloads
-
n0minal's Interior Browser (client-side only!)
By n0minal
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!
532 downloads
-
Simple Admin System (JSON)
By -Andreas
(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.1998 downloads
-
Vehicle Spawner | Diamond Casino & Resort Update
I updated the "vehicleHashes.js" to the update "Diamond Casino & Resort".
Orginal version and creator of the script:
112 downloads
-
Easy Blip Creator
By valdirdd
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
952 downloads
-
Car Compare (0-100, 0-200, Vmax)
By MrGenzo
Copy folder to "client_packages" and add
require("./genzocarcompare"); to your "client_packages/index.js";
60 downloads
(0 reviews)0 comments
Submitted
-
Combat Helmets
By rootcause
Installing
Put the files you downloaded in their respective places Add require('combathelmets') to client_packages/index.js All done
Using
You can toggle visor/goggles by pressing F10 while on foot.
Adding More Helmets
Even though this is a combat helmet mod, you can add other helmets (such as motorcycle helmets) by editing packages/combathelmets/helmetData.json.
{ // Skin hash (mp_m_freemode_01) "1885233650": { /* Visor/goggles up drawable as key. Visor/goggles down drawable as "closed" property. Animation name as "anim" property. Available names: goggles, visor Optional "type" property for screen FX. Available types: nightvision, thermal Hat/helmet drawables: https://wiki.rage.mp/index.php?title=Male_Hats https://wiki.rage.mp/index.php?title=Female_Hats */ "117": { "closed": 116, "type": "nightvision", "anim": "goggles" }, "119": { "closed": 118, "type": "thermal", "anim": "goggles" }, "124": { "closed": 123, "anim": "visor" }, "126": { "closed": 125, "anim": "visor" } }, // Skin hash (mp_f_freemode_01) "2627665880": { /* Visor/goggles up drawable as key. Visor/goggles down drawable as "closed" property. Animation name as "anim" property. Available names: goggles, visor Optional "type" property for screen FX. Available types: nightvision, thermal Hat/helmet drawables: https://wiki.rage.mp/index.php?title=Male_Hats https://wiki.rage.mp/index.php?title=Female_Hats */ "116": { "closed": 115, "type": "nightvision", "anim": "goggles" }, "118": { "closed": 117, "type": "thermal", "anim": "goggles" }, "123": { "closed": 122, "anim": "visor" }, "125": { "closed": 124, "anim": "visor" } } }
Adding More Vehicles
You can add/remove supported vehicles by editing the vehicle animation dictionary object located in client_packages/combathelmets/index.js line 33. (vehAnimDictName object)
Issues
The animation won't be synced to other players in 0.3.7 but it should in future versions with improved task sync. FIXED IN v2.0 Visor up/down animation is used for both visors and goggles right now, even though this is a small visual thing it might be fixed in the future. FIXED IN v2.0 Players are not able to toggle visor/goggle state in vehicles right now, might change in the future. This would probably be most useful for bikes. Available on GitHub: https://github.com/root-cause/ragemp-combat-helmets25 downloads
(3 reviews)0 comments
Updated
-
Bitcoin Exchange
By rootcause
This is a small script that allows players to buy/sell bitcoins.
Requirements
Currency API (define a currency named "cash" after installing) node-fetch (after installing, go to packages/bitcoin folder, launch command prompt/powershell from shift+rightclick and write "npm install", should download it)
Installing
Drag & drop to your server files folder.
Config
The config.json file provides some options:
updateInterval - The time between BTC price updates, in milliseconds. Default value is 300000 aka 5 minutes. markerColor - Color of the markers, [r, g, b, a] format. markerRange - Range of the markers. exchangeCoords - Positions where players can buy/sell bitcoins. Default values add 2 exchange locations: Lester's house and garment factory.
Commands
buybtc [amount] sellbtc [amount] Both commands need you to be inside a Bitcoin Exchange marker.
Notes
This script does not save data (bought bitcoins etc), saving should be handled by your gamemode since Currency API provides functions for that. BTC price is provided by CoinDesk. Currency API does not support floats so players can't buy less than 1 BTC. Bogdanoff is watching73 downloads
-
[C#] Example/Wrapper for fetching world objects.
Just an example/wrapper on how to properly use "GetClosestObjectOfType" and fetch data from an object.
I've been using this in my server for a while now to make it easier to get XYZ and rotation of objects in bulk, instead of having to go through them in codewalker which can be a pain.
Installation
Move client_packages to your client_packages folder Move Serverside C#/GetWorldObjects.cs to your gamemode or script. Move objectLocations.json to your server root directory.
Usage
The JSON file included in the zip contains the pacific bank vault door as an example object. Use the /getworldobjects or /gwo command to run through all the items in the JSON file and fetch the X, Y, Z and XYZ Rotation of the object.
As of right now it'll simply log the object to your server console and continue to the next object in the list, you can extend this functionality by editing the "REMOTE_EVENT_OnWorldObjectFetched" method in GetWorldObjects.cs server-side script.
JSON file object info
public class ObjectLocation { // The model name to look for, you can fetch this from CodeWalker or RAGEMP objectdb for example. public string Model { get; set; } // The model that should replace the model at this location, optional. I personally used this to store in the database and then on server start it'd delete the world object and replace it with the object model specified here. public string ReplacementModel { get; set; } = ""; // A position within X distance of the object you want to get the data of, distance can be specified by the Radius. public Vector3 Position { get; set; } // An optional type you can pass to the method so you can use it later on for data storage purposes(eg keep objects of certain types separated by an ID) public int Type { get; set; } = 0; // The radius to find the object, doesn't have to be too precise altho I generally recommend putting the player's teleport coordinates as close to the object as possible and decreasing range to 5 or 10. public int Radius { get; set; } } [ { "Model": "v_ilev_bk_vaultdoor", "ReplacementModel": "v_ilev_bk_vaultdoor", "Type": 0, "Radius": 25, "Position": { "X": 254.2859, "Y": 225.3845, "Z": 101.8757 } }, { "Model": "another_object_model_name", "ReplacementModel": "another_object_model_name_to_replace", "Type": 0, "Radius": 10, "Position": { "X": 1234.567, "Y": 123.456, "Z": 12.345 } }, ... ] All you have to do is add more items to the JSON file and it'll run thru all of them.
24 downloads
- CS
- GetClosestObjectOfType
- (and 1 more)
(0 reviews)0 comments
Updated
-
Login / Register html template
By Tenchuu
https://www.dropbox.com/s/3ump4anqb45mm9x/1uJJ7nb7a9.mp4?dl=0
This is just a template for your login / register system.
78 downloads
(0 reviews)0 comments
Submitted
-
[3D] Client-side Sound API.
By Captien
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, local mp3 files). 3D sound should be synced automatically without the need of extra work. If you're looking for Frontend sounds then it should be easy to implement. If many demanded 2D sounds for this resource, i'll add it later.
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.
128 downloads
(3 reviews)0 comments
Submitted
-
Synced parachute
By draobrehtom
🎈 Motivation
Currenly I develop battle royal gamemode and it was anoying to see how are players falling without any animation. Imagine how is hard to see where your opponents without any parachute object.
🛠️ Installation:
Just extract parachute.zip into your server root.
(it will replace your client_resources/index.js)
📸 Falling animation and Parachute object fix:
💡 Featues:
Parachute object is destroying when player is near the ground after 3 seconds Synced falling animation without parachute Synced parachute attaching Working only near streamed players More features from you 😉
112 downloads
(4 reviews)0 comments
Updated
-
No reticle for all weapons.
By Soupiest
Every weapon has no reticle when aiming. (Working with snipers too.)
Installation:
1) Unpack the zip.
2) If you haven't already, create a "dlcpacks" folder inside your "client_packages" folder.
3) Drop the "nosight" folder inside "dlcpacks"
68 downloads
(0 reviews)0 comments
Updated
-
[Perfect for RP Servers]
By Wdoyle
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.
213 downloads
(6 reviews)0 comments
Updated
-
Character Creator
By rootcause
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
3988 downloads
-
RageMP new hairstyles!
By Soupiest
- Up to 20 NEW hairstyles for males!
- Up to 19 NEW hairstyles for females!
- Root's character creator adaption supported!
Installation:
1) Unpack the rar.
2) If you haven't already, create a "dlcpacks" folder inside your "client_packages" folder.
3) Drop the "gtahairs" folder inside "dlcpacks"
168 downloads
(3 reviews)0 comments
Updated
-
MoneyAPI
By rootcause
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)1654 downloads
-
Vice City Minimap
By adri1
Video: https://streamable.com/2cg3g
This is a cef minimap for vice city in js.
Helth and armour progress bars don't work you can make it work easily
94 downloads
(5 reviews)0 comments
Updated
-
Better Instructional Buttons
By Kar
NB: This include does not entirely work like the original.
NB: The class is now called instructionalButtons instead of hudManager.
NB: This include also includes a more advanced version of the BasicScaleform class by kemperr, just called ScaleForm now.
v2.0.0
- Added instructionalButton.hasControl(control).
- Added instructionalButton.getButtonCount().
- Removed the padding of 10.
- Added RGB support (instead of just RGBA... alpha defaults to 180 for RGB).
- Revamped the structure used to store buttons (it was dumb before, wasting variables and not making use of Javascript features).
v1.0.2
- You can now alter any instructional button without it being redrawn/shown to you (Basically you can edit them, without them popping up on your screen, forcefully).
- Added instructionalButton.changeButtonControl(title, new_control).
v1.0.1
- Fixed the an issue where when using multiple instructional buttons multi script wide, if one button count was more than others, the buttons would show up across different instructional buttons.
- Removed support for hex colours with a #. Now to use a colour, just use 'FF00FF'. Using # here is a waste of time.
v1.0.0
- Fixed instructional buttons rendering last button created on the client only.
- Instructional buttons background now default to black, if no colour was used.
- A padding of 10 is now set on horizontal instructional buttons.
- Support for custom button names.
- Added instructionalButton.changeButtonTitle(control, new_title).
- Added instructionalButton.isActive().
- Example:
const instructions = require('/better_instructions'); const horizontalInstructionList = new instructions(-1); horizontalInstructionList.addButton('Create Roadblock', 'M'); horizontalInstructionList.addButton('Right', 175); horizontalInstructionList.addButton('Left', 174); if(!horizontalInstructionList.isActive()) { horizontalInstructionList.toggleHud(true); } setTimeout( () => { if(horizontalInstructionList.isActive()) { horizontalInstructionList.toggleHud(false); } }, 10000); /* Vertical Instructions */ const verticalInstructionList = new instructions(1, 'ff000'); modShopInstructions.addButton('Toggle RAGE Menu', 'F2'); if(!verticalInstructionList.isActive()) { verticalInstructionList.toggleHud(true); } setTimeout( () => { if(verticalInstructionList.isActive()) { verticalInstructionList.toggleHud(false); } }, 10000);
Original Include
- Credits go to Captien for the original release.
93 downloads
