Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/02/21 in all areas

  1. Version 1.0.0

    1392 downloads

    GitHub Repository: https://github.com/RageMpOpenSource/RAGE-Accounts A MySQL boilerplate to quickly create an account system without all the work. This handles both logging in and registration. This also utilised the delayedInitilisation feature added in RAGE:MP 1.1 to allow time for your database and any other assets on your server to be loaded first before allowing any user connections. By using this feature, this avoids any errors of users connecting before your resources are done loading. Read below for more information. A custom config file has also been used to easily change your database variables (username/database name/database password) and will allow you to easily add more configuration options going forward. Features CEF Login/Registration pages with error handling Idle Kicker (Kicks any player who is sitting on the login/register pages after 60 seconds of no attempts) Promise Based Loading Easy Imported SQL into your MySQL Database Installation Prerequisites NodeJS MySQL Server (Fully setup) Steps Download this resource and place it inside of your server folder Open your command prompt and change your directory of your command prompt to the server folder and then type npm install (You could also Shift + Right click inside your server folder and 'Open PowerShell window here' and type npm install if you don't know how to do this step) Head to packages/<folder>/settings.example.json and rename the file to settings.json (Remove the .example from the file name) Open up the settings.json file and edit the database details to connect to your server, if you're running it locally the default settings may be fine. Using the .sql file inside the server folder, run this inside your database to set it up (I won't be going into how to do this, Google "How to set up a MySQL server" if you don't know how to do this as I won't be offering support). Run your server, if there are no errors and it prints "Database connected successfully" then you're all done. Looking for more information? Look at the GitHub repository here: https://github.com/RageMpOpenSource/RAGE-Accounts
    1 point
  2. Version 18w48a

    16614 downloads

    NativeUI for RageMP! This can only be used Clientside! Documentation: Click Github: Click
    1 point
  3. Version 0.0.1

    10439 downloads

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

    5759 downloads

    A local voice chat example using built-in voice chat API. Look for constants to change max range, auto volume (instead of changing volume on your own) and 3D effect. Press F4 to toggle local player's muted state. As of 24th Oct 2018 you need to use "testing_voice" branch to utilize voice chat API.
    1 point
  5. Maintained by @Captien now - https://github.com/Carbowix/v-clothingflags https://github.com/root-cause/v-clothingflags You can try using this resource to make a better clothing system for your server. (Example: if a mask has SHRINK_HEAD flag, it means you should reset the player's face features and head blend to default before applying the mask or it won't fit) Check the README file on GitHub for more information.
    1 point
  6. const fetch = require('node-fetch'); const url = 'http://api.weatherapi.com/v1/current.json?key=c5aab2441e9248e49ee81903201910&q=bucharest'; setInterval(() => { fetch(url) .then(res => res.json()) .then(json => { let code = json.current.condition.code; switch (code) { case 1000: mp.world.weather = 'EXTRASUNNY' break; case 1003: mp.world.weather = 'CLOUDS' break; case 1006: mp.world.weather = 'CLOUDS' break; case 1066: mp.world.weather = 'SNOW' break; case 1135: mp.world.weather = 'FOGGY' break; case 1183: mp.world.weather = 'RAIN' break; case 1189: mp.world.weather = 'RAIN' break; case 1273: mp.world.weather = 'THUNDER' break; default: mp.world.weather = 'CLEAR' } console.log("[WEATHER-SYNC] Server weather is synced with Bucharest (" + json.current.condition.text + ")"); }) .catch(function(err){ console.log("There was an error running the weather.js script ! ", err) }); }, 600000) Requirements: npm i request npm i request-promise In the API call change the 'q' parameter to the city you want to sync to, and provide your API key from WeatherAPI The script syncs the weather once evry 10 minutes, you can change that by modifying the 'setInterval' loop.
    1 point
  7. take a look on installation guide.. why does everyone always think that something is copied in and can release an roleplay server tomorrow?
    1 point
  8. Seeing how the request and request-promise packages are now deprecated, has anyone attempted using the node-fetch package with this yet? Edit: I was able to make it work with the node-fetch package using your code with slight modifications: const fetch = require('node-fetch'); const url = 'http://api.weatherapi.com/v1/current.json?key=c5aab2441e9248e49ee81903201910&q=bucharest'; setInterval(() => { fetch(url) .then(res => res.json()) .then(json => { let code = json.current.condition.code; switch (code) { case 1000: mp.world.weather = 'EXTRASUNNY' break; case 1003: mp.world.weather = 'CLOUDS' break; case 1006: mp.world.weather = 'CLOUDS' break; case 1066: mp.world.weather = 'SNOW' break; case 1135: mp.world.weather = 'FOGGY' break; case 1183: mp.world.weather = 'RAIN' break; case 1189: mp.world.weather = 'RAIN' break; case 1273: mp.world.weather = 'THUNDER' break; default: mp.world.weather = 'CLEAR' } console.log("[WEATHER-SYNC] Server weather is synced with Bucharest (" + json.current.condition.text + ")"); }) .catch(function(err){ console.log("There was an error running the weather.js script ! ", err) }); }, 600000) (I had to convert it back to your format, as I made modifications for my own usage, so if something is broken, please let me know). Additionally, instead of using the deprecated request and request-promise packages, I used the node-fetch package instead: npm i node-fetch Hopefully this helps! Edit #2: For the new people, please change the key in the URL to your own!
    1 point
  9. To anyone using 1.1 and having a problem with objects spawning but not actually attaching, replace client_packages/static-attachments/index.js with this: https://gist.github.com/root-cause/c68468e47bc8afd4972fb8ab72e7c380
    1 point
×
×
  • Create New...