Search the Community

Showing results for tags 'javascript'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

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 43 results

  1. Install: npm npm i @ragemp-tools/[email protected] 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>
  2. Hallo Leute, ich möchte gerne für einen bestimmten Spieler ein blip erstellen, um genauer zu sagen für einen der in einem Job ist. Damit er dann auch nur die Job Map-Icons (Blips) sehen kann und die anderen, die diesen job nicht haben, dies nicht sehen bzw haben. Freundliche Grüße und Dank im voraus, Concil
  3. Hello Guys, is there any way to create player only blips? like players who have a job and for them create the blips... Greetz, Concil
  4. Попробовал сделать на сервере таймер через setInterval вне событий и решил написать данный код в этом таймере: let vehicle = mp.vehicles.at(0); console.log(vehicle); Данное значение показывает только { setVariable: [function], call: [function] } Почему я не могу получить data значения которые создавал в событии для этого объекта? Однако в событиях присутствует возможность получения data значений при аналогичном получении объекта.
  5. Install: npm npm i @ragemp-tools/[email protected] 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>
  6. 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')
  7. Version 1.0.1

    340 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!
  8. 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
  9. Доброго времени суток! Требуются дополнительные разработчики для запуска крупного проекта в GTA V (Rage MP). Требуемые специалисты : - Программист. Основные требования: Опыт работы с Rage MP, знание нативного JS для написания качественного мода, а также Typescript, Vue.js, SQL, Git, Jira. Знание RP и его основных механик, усидчивость, ответственность, умение находить и фиксить баги, умение работать с ТЗ. Приветствуется знание html, css; ВАЖНО: Если вы уже работаете в крупном проекте и вам не нравятся условия работы - также пишите! Возможно именно у нас для вас будут созданы самые благоприятные условия Требуются разработчики с хорошим запасом знаний, должным количеством времени, стрессоустойчивость, энтузиазмом и умением работать в команде! Планируется долгосрочное сотрудничество! Условия: - З/П (по факту/оклад); - Адекватное техническое задание; - При необходимости составление договора; Если вы хотите работать с нами, напишите!https://vk.com/timich_t
  10. This occurs due to player stamina hitting zero, resulting in hp being lost. Below is the workaround for this in both C# and JavaScript. C# //Subscribe the Tick event Events.Tick += Tick; public void Tick(List<Events.TickNametagData> nametags) { RAGE.Game.Player.RestorePlayerStamina(1.0F); } JavaScript mp.events.add('render', () => { mp.game.player.restoreStamina(100); });
  11. 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!
  12. Hey Guys, So i want to create a autologin option in my login-form by saving username and pass in a file by javascript. My Question: is where can i save Data that stays after the User left the Server? i know i can use the Node.js Filesystem Module but before i try i ask the community. my Form: Thanks! Hank
  13. Доброго времени суток. Хочу представить пример парсинга мастер-листа и получения информации о вашем сервере. Скриншот: Код на PHP: $ip = '91.76.227.40'; // Ip адрес сервера $port = 22005; // Port сервера $ch = curl_init('https://ml.rage.mp/servers'); curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false ); curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false ); $resp = curl_exec( $ch ); curl_close( $ch ); $resp = json_decode($resp , true); foreach($resp as $val) { if($val['ip'] == $ip and $val['port'] == $port) { echo 'PHP<hr>Id: '.$val['_id']; echo '<br>Название: '.$val['name']; echo '<br>Слотов: '.$val['slots']; echo '<br>Игроков: '.$val['players']; echo '<br>Uptime: '.$val['uptime']; break; } } Код на JavaScript: var ip = '91.76.227.40', // Ip адрес сервера port = 22005; // Port сервера $.getJSON('https://ml.rage.mp/servers', function(data) { $.each(data, function(key, val) { if(ip == val.ip && port == val.port) { document.write('JavaScript<hr>Id: '+val._id); document.write('<br>Название: '+val.name); document.write('<br>Слотов: '+val.slots); document.write('<br>Игроков: '+val.players); document.write('<br>Uptime: '+val.uptime); return false; } }); }); Библиотека JQuery обязательна!
  14. Hello, i downloaded this character creator by @rootcause and its pretty insane but i have the following question: I dont want it by a command like here with "/creator", i need an Event that i can call in C#. for ex. like : SendPlayerToCreator(player); or smth like that Is that possible?
  15. Version 1.0.1

    137 downloads

    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
  16. ok simple, what am i doing wrong? Yes I am new to JS: Serverside: mp.events.add('testEvent',(para1,para2,para3) => { console.log('para1:'+para1); console.log('para2:'+para2); console.log('para3:'+para3); }); Clientside: mp.events.callRemote('testEvent',1,2,3); Console: para1:[object Object] para2:1 para3:2 thanks for help! Hank edit: discovered https://wiki.rage.mp/index.php?title=Getting_Started_with_Events
  17. 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?
  18. Всем привет! Пожалуйста, подскажите кто знает. Могу ли я начать разработку на стороне сервера на языке C#? И параллельно разрабатывать клиент на языке JavaScript? Я хочу использовать одновременно 2 языка для разработки. На каждой стороне свой. Как я могу это реализовать?
  19. 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?
  20. I bind my action to the number buttons. mp.keys.bind(0x31, true, function() { mp.events.callRemote('myAction') }) is it possible to disable the gta weapons selector?
  21. unkaid

    Realtime Weather

    Version 1.0.0

    149 downloads

    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
  22. Version 1.0.0

    32 downloads

    Simple solution to check incoming connections from unwanted countries. I. Install geoip-Lite: npm i geoip-lite II. Edit country_ban list with the specified country codes https://dev.maxmind.com/geoip/legacy/codes/iso3166/ III. Save and put this script to "server-files\packages" and add require('./countryBan'); in index.js
  23. I'm thinking which language should I use to make a server. Which is more supported for RageMP? Which would u recommend to start and why? I have learned both so the knowledge wouldn't be a problem.
  24. Version 1.0.0

    470 downloads

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

    Js Resource

    Hi everyone! I have a custom.js on my server-files/bridge/resources/custom folder. My meta.xml look like this: <meta> <info name="custom" type="script" /> <script src="custom.js" /> </meta> My custom.js: console.log("works"); But i cant see the console.log in my console after exectue the file server.exe. My console returns: [N] Starting network... - OK: (IPv4-only) at 127.0.0.1:22005 (node:12532) ExperimentalWarning: The ESM module loader is experimental. [M] Announcing into master server... Loading packages Initializing bridge (0.3.7.0).. This is not a published, standalone application and we are unable to locate the .NET Core SDK. Please make sure that it is installed; see http://microsoft.com/net/core for more details. Initializing Bootstrapper.dll (0.3.7.0).. -> SERVER STARTED AT 17/01/2019 15:03:56 ACLEnabled: True Loaded 451 entries from vehicleData.json Loading resources.. -> Starting custom resource.. custom: loading scripts.. found 1 script(s) -> Resource custom started! -> Starting admin resource.. admin: loading scripts.. found 1 script(s) [M] Connected to master list. admin: compiling scripts.. admin: instantiating Main.AdminScript.. admin: loading server events.. found 2 server event(s) admin: loaded 2 server events(s) admin: loading commands.. found 9 command(s) admin: loaded 9 commands(s) -> Resource admin started! -> Starting welcomemessages resource.. welcomemessages: loading scripts.. found 1 script(s) welcomemessages: compiling scripts.. welcomemessages: instantiating WelcomeMessages.. welcomemessages: loading server events.. found 2 server event(s) welcomemessages: loaded 2 server events(s) -> Resource welcomemessages started! Started! Waiting for connections.. [P] Plugin bridge.dll loaded! Started HTTP server at 22006 port. Any ideas? Thanks!