Search the Community

Showing results for tags 'JS'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • RAGE Multiplayer
    • Announcements
    • Discussion
    • Suggestions
    • RDR2 Multiplayer
  • 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

Categories

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

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


About Me


Facebook


Youtube


Skype


Web


VK

Found 32 results

  1. Einfache Befehle mit Javascript Veröffentliche meine selbstgemachten Befehle. (Basic Befehle & Befehle mit Paramtern) Die Befehle /car <Fahrzeugname> /skin <Skinname> /heal <ID> /armor <ID> /kill <ID> /time <00 00 00> /weather <sunny rain xmas halloween snow fog thunder.... /raw <ID> /fix /waffe <Waffenname> <Munition> /tp <X> <Y> <Z> /kick <ID> /ban <ID> /tune neon /plate <Text> /pos /a <Text> /me <Text> /o <Text> /n <Text> /*#########################################################################################################*/ /*#########################################################################################################*/ /*######################################################################################################### REGISTER >> ADMINBEFEHLE >> ALLGEMEINE BEFEHLE >> CHAT BEFEHLE >> SONSTIGE BEFEHLE /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* ADMINBEFEHLE */ //FAHRZEUG SPAWNEN############################## mp.events.addCommand("car",(player,vehName)=>{ let pos = player.position; pos.x +=2; if (vehName && vehName.trim().length > 0) { mp.vehicles.new(mp.joaat(vehName),pos,{ color: [[0, 100, 0],[0, 100, 0]], engine: true }); } else player.outputChatBox("Benutze /car <Fahrzeugname>"); }); //SKIN ÄNDERN################################## mp.events.addCommand('skin', (player,skinName) => { if (skinName && skinName.trim().length > 0) player.model = mp.joaat(skinName); else player.outputChatBox(`Benutze /skin <Skinname>`); }); //HEILEN######################################## mp.events.addCommand("heal",(player,target)=>{ let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /heal <ID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.outputChatBox(`[ADMIN] ${player.name} hat dich geheilt.`); newTarget.armour = 100; player.notify('~g~Erfolgreich'); return; }); //PANZERUNG###################################### mp.events.addCommand("armor",(player,target)=>{ let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /armor <ID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.outputChatBox(`[ADMIN] ${player.name} hat dir Panzerung gegeben.`); newTarget.armour = 100; player.notify('~g~Erfolgreich'); return; }); //KILL########################################### mp.events.addCommand("kill",(player,target)=>{ let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /kill <ID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.health = 0; newTarget.outputChatBox(`[ADMIN] ${player.name} hat dich getötet.`); player.notify('~g~Erfolgreich'); return; }); //ZEIT SETZEN##################################### mp.events.addCommand("time",(player,fullText,hour,minute,second)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /time <00 00 00>"); if(hour >= 25 || minute >= 61 || second >= 61)return player.outputChatBox("Stunde: 1-24 | Minute: 1-60 Sekunde: 1-60"); mp.world.time.set(hour,minute,second); }); //WETTER SETZEN################################## mp.events.addCommand("weather",(player,cmd)=>{ let arr = cmd.split(' '); if(arr[0] == 'sunny')return mp.world.weather = 'EXTRASUNNY'; if(arr[0] == 'clear')return mp.world.weather = 'CLEAR'; if(arr[0] == 'clouds')return mp.world.weather = 'CLOUDS'; if(arr[0] == 'smog')return mp.world.weather = 'SMOG'; if(arr[0] == 'rain')return mp.world.weather = 'RAIN'; if(arr[0] == 'thunder')return mp.world.weather = 'THUNDER'; if(arr[0] == 'snow')return mp.world.weather = 'SNOW'; if(arr[0] == 'xmas')return mp.world.weather = 'XMAS'; if(arr[0] == 'halloween')return mp.world.weather = 'HALLOWEEN'; else player.outputChatBox("Benutze /weather <Wettername>"); }); //WAFFEN ENTFERNEN############################### mp.events.addCommand('raw', (player,target) => { let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /raw <id>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler]"); newTarget.outputChatBox(`[ADMIN] ${player.name} Hat dich geheilt`); newTarget.removeAllWeapons(); player.notify('~g~Erfolgreich'); newTarget.outputChatBox(`[ADMIN] ${player.name} hat deine Waffen entfernt!`); }); //FAHRZEUG REPARIEREN############################ mp.events.addCommand('fix', (player) => { if (player.vehicle) player.vehicle.repair(); else player.outputChatBox("Du befindest dich in keinem Fahrzeug!"); }); //WAFFEN########################################### mp.events.addCommand("waffe",(player,fullText,weapon,ammo)=>{ if(fullText == undefined){ player.outputChatBox("Benutze /waffe <Waffen_Hash> <Munition> || 10000"); player.outputChatBox("Beispiel : /waffe weapon_smg 100"); return; } let weaponHash = mp.joaat(weapon); player.giveWeapon(weaponHash,parseInt(ammo)||10000); return; }); //TELEPORT XYZ##################################### mp.events.addCommand('tp', (player, _, x, y ,z) => { if (!isNaN(parseFloat(x)) && !isNaN(parseFloat(y)) && !isNaN(parseFloat(z))) player.position = new mp.Vector3(parseFloat(x),parseFloat(y),parseFloat(z)); else player.outputChatBox(`Benutze /tp <X> <Y> <Z>`); }); //KICK############################################# mp.events.addCommand('kick', (player, target) => { let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /kick <SpielerID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler"); newTarget.kick(); newTarget.outputChatBox("Du wurdest gekickt"); player.notify('~g~Erfolgreich'); }); //BAN############################################## mp.events.addCommand('ban', (player, target) => { let newTarget = mp.players.at(target); if(!target || isNaN(target)) return player.outputChatBox("Benutze /ban <SpielerID>"); if(newTarget === null) return player.outputChatBox("Unbekannter Spieler.") newTarget.ban('Du wurdest gebannt.'); player.notify('~g~Erfolgreich'); }); //NUMMERNSCHILD SETZEN############################# mp.events.addCommand('plate', (player, _, plate) => { if(player.vehicle) { player.vehicle.numberPlate = plate; } else player.outputChatBox("Du befindest dich in keinem Fahrzeug!"); }); //TUNE############################################# mp.events.addCommand('tune', (player, cmd) => { let arr = cmd.split(' '); if (!player.vehicle)return player.outputChatBox("Du befindest dich in keinem Fahrzeug!"); if (arr[0] == 'neon' && player.vehicle) { player.vehicle.setNeonColor(255, 255, 0); } }); /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* ALLGEMEINE BEFEHLE */ //Position############################################### mp.events.addCommand("pos",(player) => { player.outputChatBox(`${player.position}`); return; }); /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* CHAT BEFEHLE */ //Adminchat############################################# mp.events.addCommand("a",(player,fullText)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /a <Text>"); mp.players.broadcast(`[ADMIN] ${player.name} >> !{#00d5ff}${fullText}`); }); //Me################################################### mp.events.addCommand("me",(player,fullText)=>{ if(fullText == undefined){ player.outputChatBox("/me <Text>") return; } mp.players.broadcastInRange(player.position,20,`!{#C6A6E0}${player.name} ${fullText}`); }); //OOC-CHAT############################################ mp.events.addCommand("o",(player,fullText)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /o <Text>"); mp.players.broadcast(`[OOC-CHAT] ${player.name} >> ${fullText}`); }); //LIFEINVADER CHAT (LIVE)############################# mp.events.addCommand("n",(player,fullText)=>{ if(fullText == undefined)return player.outputChatBox("Benutze /n <Text>"); mp.players.broadcast(`[LIVE] ${player.name} >> ${fullText}`); }); /*#########################################################################################################*/ /*#########################################################################################################*/ /*#########################################################################################################*/ /* SONSTIGE BEFEHLE */ //Warp (Ka was das dastellen soll Wahscheinlich fesseln) mp.events.addCommand('warp', (player, _, playerID) => { if (playerID && playerID.trim().length > 0) { let sourcePlayer = mp.players.at(parseInt(playerID)); if (sourcePlayer) { let playerPos = sourcePlayer.position; playerPos.x += 1; player.position = playerPos; } else { player.outputChatBox(`<b>Warp:</b> player with such ID not found!`); } } else player.outputChatBox(`<b>Command syntax:</b> /warp [player_id]`); });
  2. XCRON

    Simple Tablet

    Version 1.0.0

    439 downloads

    RAGEMP-SimpleTablet This is a really basic tablet for your resource. You can open it, and it show your embedded link. Press O to open it. Installation Just add the files in client_packages to your resource & add the following code to your index.js require("tablet/tablet.js"); How to change the embedded object Go in the "tablet" folder and open "tablet.html" with your editor. Change the URL on line 14 & 15. How to change the key to open it: Go in the "tablet" folder and open "tablet.js" with your editor. Change the "0x4F" on line 3 to your key of choice. Here you can find all key values: https://docs.microsoft.com/de-de/windows/win32/inputdev/virtual-key-codes?redirectedfrom=MSDN GITHUB: https://github.com/XCRON-DEV/RAGEMP-SimpleTablet For questions or help DM me here.
  3. XCRON

    Easy Whitelist

    Version 1.0.0

    120 downloads

    RAGEMP-EasyWhitelist This is a basic whitelist system for your server. Just place it in the packages folder & it works! Installation Just place the folder "easy-whitelist" in the packages folder. How to add users to the whitelist Go in the packages folder > then "easy-whitelist" > and edit the file account.json There you have to add the SocialClub ID. Restart Server & its done. Github: https://github.com/XCRON-DEV/RAGEMP-EasyWhitelist For questions or help DM me here.
  4. Hey Guys, Ive started to code with Rage:MP for some days ago. Ive already a basic Server structure, but I need some information about Clientside coding with JS. So lets get started: How could I structure/organize my clientside code? Like how could the folder structure be and so on.. How can I create NativeUI with JS on Clientside ? For example if I created a colshape and marker somewhere, and only in this area should trigger the NativeUI in case i press E.
  5. Hello everyone, I was wondering if it is possible to compile/secure node javascript source code? I know there are node packages like nexe for compiling node code to .exe, but i am not sure if that is compatible with ragemp.
  6. Version 1.0.1

    789 downloads

    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!
  7. ynhhoJ

    Compass

    Version 1.0.0

    109 downloads

    Just simple compass what you can use. You need to add compass.js path, to index.js on client_packages.
  8. There is an opportunity to catch an event - creating Waypointon the client side or on the Server when the player received a mark on the map https://wiki.rage.mp/index.php?title=PlayerCreateWaypoint Text = DOES NOT SEEM TO WORK IN CURRENT 0.3.7 VERSION I need to get the Waypoint coordinate that the player set. In any way through the creation event or just get the value of an already set label. Is there such a possibility?
  9. Hi. I call a function in main.js from login.js. But it gives me such an error. I call the function like this mp.events.add('RegResultFalse', () => { mp.events.call('executeFunction', ['emailStatus']); }) the function in login.js is described as: function emailStatus() { $("#emailStatus").removeClass("hide"); } Tell me what am I doing wrong? Thank you in advance. In parallel with this, I read the wiki, if I find the answer, I will write
  10. CXXY

    remote event error

    Client side: class KeyManager { constructor() { mp.keys.bind(0x11, true, function() { if(mp.players.local.vehicle && mp.players.local.vehicle.getPedInSeat(-1) === mp.players.local.handle) { mp.events.callRemote('BANG_onVehicleShotPrimary', mp.players.local.vehicle.getForwardVector()); } }); } } export default new KeyManager(); Server side: [RemoteEvent ("BANG_onVehicleShotPrimary")] public void BANG_onVehicleShotPrimary (Client player, object[] arguments) { player.SendChatMessage("HALLILUAH"); } Console: at object RuntimeMethodHandle.InvokeMethod(object target, object[] arguments, Signature sig, bool constructor) at object System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(object obj, object[] parameters, object[] arguments) at void GTANetworkInternals.RemoteEventParser.Parse(Client sender, ulong eventNameHash, object[] args) in C:\Users\Adam\Documents\Git\comp-layer2\BootstrapperNC\Handlers\ResourceInfo.cs:line 62 at void GTANetworkInternals.RemoteEventHandler.Parse(Client sender, ulong eventNameHash, object[] arguments) in C:\Users\Adam\Documents\Git\comp-layer2\BootstrapperNC\Handlers\ResourceInfo.cs:line 67 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —-> System.NullReferenceException: Object reference not set to an instance of an object. at void GC_FunGame.Main.BANG_onVehicleShotPrimary(Client player, object[] arguments)
  11. Hello, how can i get amount of player playing on my server and send this data to CEF.
  12. 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)
  13. somebody know how to send variable from server events to client?
  14. Hi everyone, when writing a script, I had a problem with the server logic When a user logs on to the server, he enters the username and password, the server checks the data from the Database and sends him a response, after a while the user calls the server again to save, for example, his Vector3 position on the server in the Database, how does the server know what it is addresses, it is the user of this account who recently logged into the server. For example, if he writes the command / giveWeapon to the chat, the server will receive the players object and be able to give it a weapon, but how can the server find out which player this database is from
  15. Is it possible to write fully on C# client & server side without loss of functionality ? Or need to write on JS?
  16. When working with the client side, I encountered errors and do not know how to fix this. When connecting to my server, the following errors occur: JS # 10 startup error, data storage error # 4. Left only one line on the client: mp.gui.chat.push('Hello World')
  17. 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
  18. Version 1.0.4

    103 downloads

    This module saves you some time on bindings keys. Read more here:
  19. Hi, i am developing a user interface for my server and faced the following question. Can I replace the health and stamina bar? How can this be done?
  20. Доброго времени суток! Требуются дополнительные разработчики для запуска крупного проекта в GTA V (Rage MP). Требуемые специалисты : - Программист. Основные требования: Опыт работы с Rage MP, знание нативного JS для написания качественного мода, а также Typescript, Vue.js, SQL, Git, Jira. Знание RP и его основных механик, усидчивость, ответственность, умение находить и фиксить баги, умение работать с ТЗ. Приветствуется знание html, css; ВАЖНО: Если вы уже работаете в крупном проекте и вам не нравятся условия работы - также пишите! Возможно именно у нас для вас будут созданы самые благоприятные условия Требуются разработчики с хорошим запасом знаний, должным количеством времени, стрессоустойчивость, энтузиазмом и умением работать в команде! Планируется долгосрочное сотрудничество! Условия: - З/П (по факту/оклад); - Адекватное техническое задание; - При необходимости составление договора; Если вы хотите работать с нами, напишите!https://vk.com/timich_t
  21. Hey developers, I've created a small node-module, to make it easier to create key-binds (also multiple keys). For example, you are able to do this: keyBinder.bind('ctrl+n', () => { mp.gui.chat.push("Ctrl+N"); }); The last key in the chain (a+b+c+d) can be any key and all the other keys have to be 'modifiers'. By default ctrl, alt, and shift are modifiers. So you can create combinations like: 'shift+ctrl+k'. For more information please take a look into the repositorie's readme: https://github.com/araynimax/ragemp-better-binding As mentioned I've published this module to npm so you can easily import it into your projects with `npm install ragemp-better-bindings` or `yarn add ragemp-better-bindings`. If you don't use npm right now, just download it from the download section: If you find bugs or if you have improvement suggestions feel free to message me, or just comment in this post.
  22. Hi, guys! I have one question. I would like to enable a language Typescript for my client-side. How I can do it? Wiki page don't help me: https://wiki.rage.mp/index.php?title=Using_Typescript (because there is an instruction for setting up vscode, but I want to use this language in my developed) Thanks for the answer!
  23. Hi guys! Please tell me how to know. Can I start server-side development in C#? And in parallel to develop the client-side in JavaScript language? I want to use 2 languages simultaneously for development. Each side has its own. How can I implement this?
  24. Всем привет! Пожалуйста, подскажите кто знает. Могу ли я начать разработку на стороне сервера на языке C#? И параллельно разрабатывать клиент на языке JavaScript? Я хочу использовать одновременно 2 языка для разработки. На каждой стороне свой. Как я могу это реализовать?
  25. Hey guys! Originally wrote the code on the client in C#. Unfortunately it does not support some of the features that I need. Therefore, I decided to transfer the client's side to the language of JS. But the problem arose at the very beginning of the journey. I opened the tutorial (https://wiki.rage.mp/index.php?title=Getting_Started_with_Client-side) and did everything as written there. Then I started the server and joined it and I realized that nothing works. Based on the lesson materials, I have to get a chat message. But nothing works. I would like to appeal to the multiplayer community. Can you help me solve this problem?