Jump to content

Search the Community

Showing results for tags 'JavaScript'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
  • Scripting
    • Scripting
    • Resources
  • Community
    • Support
    • Servers
    • Media Gallery
  • Non-English
    • Русский - Russian
    • Français - French
    • Deutsch - German
    • Espanol - Spanish
    • Română - Romanian
    • Portuguesa - Portuguese
    • Polski - Polish


  • Scripts
  • Gamemodes
  • Libraries
  • Plugins
  • Maps
  • Tools

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



About Me






  1. Version 1.0.0


    A Javascript remake of https://rage.mp/files/file/461-c-player-location-display/ (all credits go to him) Hey! This is my first resource that I am publicly releasing. For you all, I have ported the C# Player Location Display (https://rage.mp/files/file/461-c-player-location-display/) into JS. Install Place `/street` into your server's client_packages directory, then add `require("./street/index.js");` to client_packages/index.js I know the code isn't the best optimized, please feel free to open a pull request on GitHub. GITHUB: https://github.com/realdiegopoptart/ragemp-pld
  2. Version 1.0.0


    Simple cloth menu, you can open it by pressing F2. This script requires NativeUI library, download it from the resources tab. It's my first resource, do not expect too much. https://github.com/Snakewiz/ClothesMenu
  3. Salut baieti, sper ca va atras titlu aici. Am experienta in full stack de peste 2 ani la companii romanesti, am lucrat si remote, in prezent lucrez la propria firma si se intampla sa imi placa foarte mult domeniu de fivem si rage, desi mie personal mi se pare o bataie mult prea mare de cap cu manageriatul la un asemenea proiect, sunt aici sa-ti ofer sprijin, consultanta si development. Deja de cateva saptamani lucrez la ragemp si ma joc cu APIul, integrarea la react cu typescript si chestiile mai avansate, si am spus de ce nu sa creeaz aceasta postare poate cineva are nevoie de asemenea ajutor. Aici este canalul meu de youtube pe care il foloseam sa postez resurse create pentru fivem LINK YOUTUBE Dupa cum se vede dupa numarul de vizualizari si calitatea videoclipurile stiu ce inseamna aia sa lucrezi in acest domeniu, nu lasa experienta mea limitata in rage sa te pacaleasca Astept mesajele voastre aici sau pe discord: krane#2890 sa ne auzim sa vedem ce si cum Asteptarile mele sunt: sa te ajut full remote si sa fiu platit pe ceea ce lucrez. Dar daca te simti mai linistit sa ma platesti pe ora sau saptamanal se poate si asa. Putem realiza un contract de colaborare pentru asa ceva, il voi face eu daca tu nu ai firma. Succes la baietii jmecheri
  4. Version 1.0.0


    Server-sided script, that getting a real weather hourly and sets it in the gta 5 world. HowTo: I. Install getJSON: npm install get-json --save II. Go to https://developer.accuweather.com/ and register as the Developer. III. To get your new API key, create your WeatherAPP here, https://developer.accuweather.com/user/me/apps On the question: "What programming language is your APP written in?" Answer will be: JavaScript. IV. Go to https://www.accuweather.com/ and find your preferred location on the map or by the search field, for example: Moscow, Russia. To set more accurate location to your preferred, click on the nearest point on the map, for me it is Yakimanka, then click on 'Hourly". V. The URL will look like this: https://www.accuweather.com/en/ru/yakimanka/2515350/hourly-weather-forecast/2515350 Well, 2515350 is the Location Key that we will use further. VI. Let's assemble your AccuWeather URL: http://dataservice.accuweather.com/forecasts/v1/hourly/1hour/YOUR_LOCATION_KEY?apikey=YOUR_API_KEY VII. Paste new AccuWeather URL into the script and save it. Warning! The Trial Version of AccuWeather is limited for 50 requests per day. GitHub
  5. Server side. If i use vehicle.spawn(position, heading) and then get vehicle.heading - values not match some months before there was no problem.
  6. I've been trying to remove the turbulence with that: mp.players.local.vehicle.setHandling("fTurublencePitchTorqueMulti", 0) mp.players.local.vehicle.setHandling("fTurublenceMagnitudeMax", 0) mp.players.local.vehicle.setHandling("fTurublenceForceMulti", 0) mp.players.local.vehicle.setHandling("fTurublenceRollTorqueMulti", 0) but the turbulence does not go away, Can someone help me remove turbulence from aircraft? (JavaScript)
  7. Hello there :), i need your help. i have a Problem with the compiling from typescript to Javascript. This is the Error: https://prnt.sc/21akv8o This is my folder structure. I want to compile my ts code to js with the structure which is defined in my developing folder 📦RPServer ┣ 📂developing ┃ ┣ 📂client ┃ ┃ ┣ 📂package ┃ ┃ ┃ ┣ 📂gui ┃ ┃ ┃ ┃ ┣ 📂connection ┃ ┃ ┃ ┃ ┃ ┣ 📜index.ts ┃ ┃ ┃ ┃ ┃ ┗ 📜playerConnected.ts ┃ ┃ ┃ ┃ ┗📜index.ts ┃ ┃ ┃ ┗📜index.ts ┃ ┃ ┗📜tsconfig.json ┃ ┣ 📂server ┣ 📂server-files ┃ ┣ 📂client_packages ┃ ┃ ┣ 📂gui ┃ ┃ ┃ ┣ 📂connection ┃ ┃ ┃ ┃ ┣ 📜index.js ┃ ┃ ┃ ┃ ┗ 📜playerConnected.js ┃ ┃ ┃ ┗📜index.js ┃ ┃ ┗📜index.js ┣ 📜package.json ┗ 📜package-lock.json this is my tsconfig.json { "compilerOptions": { "strict": true, "baseUrl": "./", "target": "es2015", "module": "commonjs", "allowJs": true, "resolveJsonModule": true, "esModuleInterop": true, "removeComments": true, "noUnusedLocals": true, "noUnusedParameters": true, "types" : ["node", "ragemp-c"], "outDir": "../../server-files/client_packages/", }, "include": [ "**/*" ] } developing/client/package/gui/connection/playerConnected.ts mp.events.add('playerReady', () => { mp.gui.chat.push('Player connected!'); }); developing/client/package/gui/connection/index.ts import './playerConnected'; developing/client/package/gui/index.ts import'./connection/index'; developing/client/package/index.ts /** * Loaded on client initialization */ import './gui/index'; This is compiling to following code: server-files/client_packages/gui/connection/playerConnected.js "use strict"; mp.events.add('playerReady', () => { mp.gui.chat.push('Player connected!'); }); server-files/client_packages/gui/connection/index.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("./playerConnected"); server-files/client_packages/gui/index.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("./connection/index"); server-files/client_packages/index.js "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); require("./gui/index"); i really don't know what the Problem is.. i tried sereval things.. changed imports etc. but nothing works. If someone here knows whats the Problem please let me know Thanks alot!!
  8. Version 1.0.1


    Internet radio over colshapes using CEF. Scope of application: custom clubs, interiors. Default location is the Galileo Observatory (behind the monument). Default radio station - Wacken Radio (DE). Installation: I. Put server files to: server-files\packages\yourGameMode II. Add require('./rStreamColshapes'); to your server's index.js III. Put client files to: client_packages then edit your client's index.js and add require('./rStream'); To change radio stream url, edit index.html here: client_packages\cef\rStream\index.html GitHub
  9. Version 1.0.0


    Only tested on 1.1 When the player is ready it invokes the natives and sets the pause menu title text. To change the colour or text please read the comments in hud.js It replaces the weapon wheel colour and pause menu accent colour Example These examples used { r: 255, g: 0, b: 0 } Github repo: https://github.com/Dankyss/RageMP-Custom-Hud-Colour-and-Title
  10. Hey guys. I'm searching now for several days to solve this problem.... Currently i'm working on my own roleplay server with own resources etc.. Now iam at the point to code my vehicle manager. The point is that players should not save their car/plane/boat in a garage or whatever and spawn them completely repaired. I worked previously on FiveM and there are some functions to get vehicle damage. What are the correct functions/events or whatever to GET vehicle damage and the correct functions to SET vehicle damage. And if it is possible.. Can i apply cosmetic damage to a vehicle? If you have some examples please provide them in JS. On C# im not very good Your help would be really great. Greetings Bimbam2103
  11. Einen wunderschönen Guten Tag, wir vom Rage MP Projekt Ruhrpott-V, suchen derzeit dringend Verstärkung im Bereich des Developments für unseren GTA Rage MP Server. Wir haben bereits ein Grundgestell für den Server, benötigen jedoch Personen die am Feintuning und der weiterführenden Entwicklung des Projekts mitwirken. Der Code basiert auf Javascript, wodurch Erfahrung im Bereich dieses Environments vorausgesetzt ist. Vorab möchten wir Anmerken das wir über keine finanziellen Mittel verfügen und weder noch die nach deutschem Recht vorausgesetzten Umstände erfüllen um die Beteiligung an der Entwicklung dieses Projekts in Form einer Zahlung von Gehalt, Gage oder ähnliches durchzuführen. Bei Interesse meldet euch gern bei mir. Mit freundlichen Grüßen Ruhrpott-V Projektleitung Michael Corleone Anderweitig erreichbar auf folgender Plattform: Teamspeak 3: ruhrpott-v.de Discord: https://discord.gg/4J8tDX9a3k
  12. Can someone help me with the function for mileage?
  13. I setup my local windows server. The server side code works great but client side seems like it's not applied and functional. I get in console info about the weight that Client-side packages but when I enter ingame nothing is shown from client side. Am I missing something? My file structure and everything seems okay and I followed the instructions.
  14. Version 1.0.1


    This is a Vehicleseat Menu in JavaScript for Rage:MP Install: Unzip vehicleseatJS.zip in your root server folder. Use: Press "F" or "G" when a Vehicle nearby you. Contact: You can Contact me on Discord for Questions. {Brace}#0571 Have fun!
  15. Hey there, folks! I recently asked myself, how I can retrieve the current FPS of a client, because there is no inbuild function at all. Here's a small snippet for retrieving the current FPS in TypeScript (if you want to use it in JS just compile it with a TS transcompiler or adapt it 😐). /* Copyright 2019 Vincent Heins/TheMysteriousVincent Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ class FPSCalculator { private fps = 0; constructor() { let lastFrameCount = this.getFrameCount(); setInterval(() => { this.fps = this.getFrameCount() - lastFrameCount; lastFrameCount = this.getFrameCount(); }, 1000); } public get(): number { return this.fps; } private getFrameCount(): number { return mp.game.invoke('0xFC8202EFC642E6F2') as number; // '0xFC8202EFC642E6F2' is a method of GTA5 which returns the frame count since the game was started (see http://www.dev-c.com/nativedb/func/info/fc8202efc642e6f2 for ref.) } } export const FPS = new FPSCalculator(); Or, if you prefer a Gist: https://gist.github.com/TheMysteriousVincent/42a4b00b4c34b6dd27423e48bd5c6c52 Or additionally, if you prefer the download section of RageMP: Sincerely, ~Vincent
  16. Version 1.0.1


    Hey all! Included in the package are the following files: 1) packages/mugshot.js - include this from within your packages/index.js file such as require("mugshot"); 2) client_packages/mugshot.js - include this in your client_packages/index.js such as require("./mugshot.js"); 3) client_packages/mugshot (Folder) - upload this directly to your client_packages folder To take a screen simply call the event: prepareScreenshot Server side: player.call("prepareScreenshot"); Client side: mp.events.call("prepareScreenshot"); The process of taking a screenshot: Request the player headshot Wait 2 seconds for it to load (best result thanks to GTA Forums reference) Get the Pedheadshot TXD String for Sprite and set Variable to true to display sprite in Render event Sprite is shown on screen for 1 frame! On the next call of Render - it will take a screenshot, which takes a screenshot of the previous frame. It will then stop processing the render event, unregister the pedheadshot and notify that a Headshot has been taken Client side will now trigger a HTML window to open ready to accept an event The event will trigger when the domReady is recieved and this event will contain the URL of the screenshot taken and the resolution of the game The HTML will then take the image, crop out only the mugshot and then convert it to base64 - roughly 50kb per mugshot The CEF will then notify Client Side to upload the data to the Server The server will recieve the Mugshot as a Base64 Image string (which can be decoded manually for testing at: https://base64.guru/converter/decode/image) It will then upload the Image currently to imgur with anonymous setting and provide you back the URL uploaded in console. To use IMGUR Go to https://api.imgur.com/oauth2/addclient - Log into your Imgur account and create an Application Set the type to Anonymous Set the callback URL to: https://www.getpostman.com/oauth2/callback Give it a name, email and description Click submit and you will get your Client ID - add this to packages/mugshot.js NOTICE: You will see the mugshot appear on screen for a brief 1-2 frames however this is unavoidable no matter what I have tried as this is how the Screenshot tool takes the screenshot in the first place.
  17. Hello, We are currently looking for a developer who can do some tasks. Please DM for further discussion. 🙃
  18. 🖤 Guten Tag liebe RAGEMP Community, 🖤 Das Team rund um den Server Revive-Life sucht einen kompetenten Entwickler / Developer mit Erfahrung im Bereich C# Javascript html css. Wir sind ein noch nicht releaster RP Server und haben klare Vorstellungen sind aber trotz dessen offen für neue Vorschläge. Dinge die du entwickeln würdest wären z.b. Handys, ein Funkgerät, ein Gefängnis System, Frakwar System usw. Also, um es kurz zu fassen wenn du Erfahrung im bereich C# Javascript html css hast würde wir uns freuen wenn du dich bereit erklärts uns zu Helfen vllt auch mit Bezahltung Kontaktmöglichkeiten: Discord: Ronnyb#4819 Discord Server: https://discord.gg/FXAKMB3 Teamspeak 3 Server: revive-life ("Entwickler ● Bewerbung Warteraum") Mit freundlichen Grüßen, 🖤 Revive-Life Team 🖤
  19. Version 1.2


    DavWebCreator DavWebCreator is a C# class 'library' which provides you the possibility to generate HTML structures with according styles and logic behind each element. There are already plenty of examples online here: https://DavWebCreator.com But anyway I will provide you here at least one example 🙂 Compatible with If you want to report a bug or just want some help join my discord: https://discord.gg/JYNDrSh Preview Code behind: [Command("yesno")] public void YesNoDialogExample(Client player) { // Generate the Browser Browser browser = new Browser("YesNoDialog", BrowserType.Custom, BrowserContentAlign.Center, "520px", "100%"); // Create the dialog. (Most of the elements will get a default value) var yesNoDialog = browser.GetYesNoDialog("YES_NO_EXAMPLE", "Character Deletion", "WARNING", "Do you really want to delete your character?", "Yes", "No"); // Customize for example the font size and the margin. yesNoDialog.Card.ContentTitle.FontSize = "30px"; yesNoDialog.Card.Margin = "33% 0 0 0"; // Add to the browser browser.AddYesNoDialog(yesNoDialog); // Finally open the browser for the desire player. browser.OpenBrowser(player); } //This event will be called when a button was clicked. [RemoteEvent("YES_NO_EXAMPLE")] public void YesNoExample(Client player, params object[] args) { if (args == null) return; // This is just a list of reponses. (You can bind for example 3 textboxes to a button and when someone click on that button, all 3 binded textboxes will be in the response, with their hidden values. List<BrowserEventResponse> responses = JsonConvert.DeserializeObject<List<BrowserEventResponse>>(args[0].ToString()); // For some reason we know that a YesNoDialog only gives you one response, because only the clicked button will be returned. BrowserEventResponse buttonResponse = responses[0]; player.SendChatMessage(buttonResponse.Value + " Clicked"); player.SendChatMessage(buttonResponse.HiddenValue + " This is our secret hidden value. e.g. some id"); // Close the browser player.TriggerEvent("CLOSE_BROWSER"); // Do stuff } Installation Download the .rar Open the "DavWebCreator_Installation.rar" and open the directory called "DavWebCreator_GetStarted". Open the directory "Server Resources" and Copy and paste the directory "DavWebCreator" in to your"Visual Studio" server project. Go back to the directory called "DavWebCreator_GetStarted". Now open the directory "Client Resources" and Copy and paste the directory "DavWebCreator" in to your "Visual Studio" client project. Your solution should now look like this. 6. Go back to the directory called"DavWebCreator_GetStarted". 7. Now open the directory "Client Frontend" and copy and paste the directory "DavWebCreator" in to your RageMp "client_packages" directory. This is how it should look now: Done. Lets start with some examples… The project stays under the MIT license, feel free to contribute: https://github.com/davidowiz/DavWebBrowser 🙂 Maybe the installation procedure will be improved. But as you all now, time is limited. Best regards, Davidowiz
  20. The command&events decorators (@command, @commandable, @event, @eventable) Information Installation Disadvantages Examples Sources Event decorator 1. Information: There is a snippet which helps to registry any commands/events to Rage API with the simple interface by using decorators. Library: rage-decorators [github] [npm-package] If you're using typescript, make sure there two options (experimentalDecorators, emitDecoratorMetadata) are true in your tsconfig.json: { "compilerOptions": { "experimentalDecorators": true, "emitDecoratorMetadata": true }, } 2. Installation: Via npm: $ npm i --save rage-decorators Via yarn: $ yarn add rage-decorators 3. Disadvantages: Disadvantage 1: the snippet requires rage-decorators package 4. Examples: Simple example: My example of command list: 5. Source: Sources is now allowed on github repository and as npm package: https://github.com/READYTOMASSACRE/rage-decorators the source of decorators.ts (server-side only, for supporting events, client-side usage npm package) the source of decorators.js (server-side only, for supporting events, client-side usage npm package) 6. Event decorator: Event decorator is now avaliable in npm package, here an usaging example: import { eventable, event } from 'rage-decorators' @eventable() class Foo { @event("playerJoin") playerJoin(player: PlayerMp): void { console.log(`Player[${player.id}]${player.name} has joined to the server`) } }
  21. The print.ts snippet Information Problem Disadvantages Examples Sources 1. Information: Since 1.0 we have an object mp.console which helps us to send any information to the console (F11) There it's an interface interface ConsoleMp { logInfo(message: string, save?: boolean, saveAsync?: boolean): void; logWarning(message: string, save?: boolean, saveAsync?: boolean): void; logError(message: string, save?: boolean, saveAsync?: boolean): void; logFatal(message: string, save?: boolean, saveAsync?: boolean): void; clear(): void; reset(): void; verbosity: RageEnums.ConsoleVerbosity | string; } 2. Problem: We couldn't pass two or more params into the log functions and the first argument is waiting the string type. Snippet is extending usage of that interface by passing params like the function console.log. 3. Disadvantages: Disadvantage 1: this snippet is skipping two params: [save, saveAsync] which allows you to save logdata to ragemp folder. Disadvantage 2: snippet requires npm package: [util] $ npm i --save util // or $ yarn add util 4. Examples: Lets look to usage of the snippet print.ts index.ts import { print } from './print' // print helps you to send message for log information in way like this // and also you can pass any type to this function instead of logInfo which is waiting string argument print.info(mp.players.local, "any", "parameter", "you", ...["want", "just", "simple", { foo: 'Bar' }]) // instead of usaging the mp.console mp.console.logInfo(JSON.stringify(mp.players.local)) mp.console.logInfo("any") mp.console.logInfo("parameter") mp.console.logInfo("you") mp.console.logInfo(["want", "just", "simple"].join("\n")) 5. Sources: Snippet print.ts (typescript) Snippet print.js (javascript) In-game screenshot:
  22. Ich habe gesehen, dass es bisher nur wenige deutsche Tutorials zu RageMP und vor allem zur Beta gibt und dachte ich mach mal eine Reihe für die Community. In der Reihe werden wir C# Serverseitig und Js Clientseitig verwenden. Die Reihe richtet sich an Leute die bereits programmieren können und zumindest die Grundlagen einer objektorientierten Sprache kennen. Ich hoffe ich kann mit den Videos einigen helfen. Fragen, Wünsche für zukünftige Videos & Kritik ist natürlich gerne gesehen. Geplant ist bisher: (nicht unbedingt in der Reihenfolge) - einfache Befehle - GetData/SetData - Arbeiten mit .json-Dateien - Einfache Datenbank (Mysql) - Login-System (Arbeiten mit CEF) - Erklärung von Clientside/Serverside Beta installieren, Server-Files einrichten, Projekt aufsetzen: Arbeiten mit Server Events:
  23. Install: npm npm i @ragemp-tools/online@beta const { peak, online, servers } = require('@ragemp-tools/online') peak().then(console.log) // output: peak online online().then(console.log) // output: online now servers().then(console.log) // output: servers // Definition; async Function(): Promise<any>
  24. Hallo, ich bin gerade dabei einen GTA server zu machen habe schon vieles fertig wollte mich aber mal ran machen menüs zu erstellen. Da ich NativeUI eine ganz nette sache finde, habe ich es in erwegung gezogen dies zu verwenden. Habe es hinbekommen listItems, slider zu machen aber ich kriege es nicht hin ein CheckboxItem zu machen also ich kriege es schon hin das das im menu angezeigt wird aber wenn ich darauf klicke passiert nichts weil ich nicht weis wie ich das checkbox item mit code Versehe. ps. Ich nutze Javascript
  25. Wir von ProjectNine Suchen: - Clientside Entwickler mit Erfahrung in Javascript, HTML, CSS - Server Side Entwickler mit Erfahrung in C# - Serverseitig arbeiten wir mit MongoDB Zu unseren Project: Wir sind eine MultiGaming Community die anfänglich mit einen Arma 3 Project ein guten Erfolg verzeichnen konnten, wir hatten eine eigene Map und ganz eigene Modifikationen. Jetzt haben wir uns dazu beschlossen das wir zu GTA RageMP wechseln möchten. Aktuell haben wir schon ein gutes Grundgerüst, wo wir jetzt noch ein paar Feinschliffe bis zur Open Alpha brauchen, derzeit befindet sich unserer Server in der Closed Alpha. Was können wir bieten? - Ein gut funktionierendes & strukturiertes Bitbucket - Eine ganz nette Community mit einen familiären Miteinander - Ein gut funktionierendes & organisiertes Deploy-System ( Jenkins ) - Eine klar organisierte Projektleitung - Viele eigene Systeme wie zb. Leitstellensystem, Banksystem, Jobsystem, uvm. - Eine gute Infrastruktur ( Test- & Live-Umgebung ) Was erwarten wir von dir? - C# oder Javascript Grundkenntnisse - Datenbank Erfahrung (MongoDB) ( Von Vorteil ) - Ein funktionierendes Mikrofon und Teamspeak 3 Mindestalter von 18+ - Freundlichkeit, Teamfähigkeit & Vertrauenswürdigkeit - Vorteilhaft wären ein paar Grundkenntnisse mit GTA5 Voice Plugin ( Lizenz vorhanden ) Haben wir dein Interesse geweckt, wenn ja melde dich im Forum bei einen Head of V-Game Entwicklung oder im Teamspeak. Forum: https://forum.projectnine.de/ Teamspeak: projectnine.de Mit freundlichen Grüßen SPA_Schlaefer (Head of V-Game Entwicklung)
  • Create New...