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

  1. Hey guys, my css3 "animate.css" doesnt work.. is there support for css3 animations? if not i must do this with jquery .animate animate.css: https://daneden.github.io/animate.css/ html: <html> <head> <link rel="stylesheet" href="css/animate.css"> <style> @font-face { font-family: "Roboto", sans-serif; src: "/splasher/ui/assets/fonts/Roboto.ttf"; } body { margin: 0px; padding: 0px; font-family: "Roboto", sans-serif; } .death-box { position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.8); color: white; } .death-box > .vertical-center { position: absolute; width: 100%; top: 50%; -ms-transform: translateY(-50%); transform: translateY(-50%); margin: 0; } .text-center { text-align: center; } h1 { font-size: 50px; } p { font-size: 20px; } span#time { padding: 10px; border: 5px solid white; margin-right: 20px; } span.minutes { margin-right: 5px; } span.seconds { margin-left: 5px; } </style> </head> <body> <div class="death-box animated fadeIn delay-2s"> <div class="vertical-center"> <h1 class="text-center animated fadeInDown delay-3s">DU BIST BEWUSSTLOS!</h1> <p class="text-center animated fadeInDown delay-4s"><span id="time"></span> BIS ZUM KRANKENHAUS</p> </div> </div> <script> function setDeathTime(time) { hours = Math.floor(time / 3600); time %= 3600; minutes = Math.floor(time / 60); seconds = time % 60; document.getElementById("time").innerHTML = '<span class="minutes">' + minutes + ' Minuten</span>:<span class="seconds">' + seconds + ' Sekunden</span>'; } </script> </body> </html> Greetz
  2. 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>
  3. 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
  4. 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
  5. Version 1.1.0

    12 downloads

    About this File I used this res to create my res: Shortcuts (Animations) on Numpad 1.0.0 Before first Startup: you import db.sql in your Database and change "Yourname" in the record or leave it. I used RPC in this example, install it. My node_modules are in the archive located. Do this on Login/Startup Serverside gm.mysql.handle.query("SELECT * FROM shortcuts WHERE name = ?", [player.name], function (err10,res10) { if (err10) console.log("Error in loadShortcuts: "+err10); if (res10.length > 0) { res10.forEach(function (shortcutData) { player.data.numpad1A = shortcutData.num1animA; player.data.numpad1B = shortcutData.num1animB; player.data.numpad1C = shortcutData.num1animC; player.data.numpad1D = shortcutData.num1animD; player.data.numpad1Name = shortcutData.num1name; player.data.numpad2A = shortcutData.num2animA; player.data.numpad2B = shortcutData.num2animB; player.data.numpad2C = shortcutData.num2animC; player.data.numpad2D = shortcutData.num2animD; player.data.numpad2Name = shortcutData.num2name; player.data.numpad3A = shortcutData.num3animA; player.data.numpad3B = shortcutData.num3animB; player.data.numpad3C = shortcutData.num3animC; player.data.numpad3D = shortcutData.num3animD; player.data.numpad3Name = shortcutData.num3name; player.data.numpad4A = shortcutData.num4animA; player.data.numpad4B = shortcutData.num4animB; player.data.numpad4C = shortcutData.num4animC; player.data.numpad4D = shortcutData.num4animD; player.data.numpad4Name = shortcutData.num4name; player.data.numpad5A = shortcutData.num5animA; player.data.numpad5B = shortcutData.num5animB; player.data.numpad5C = shortcutData.num5animC; player.data.numpad5D = shortcutData.num5animD; player.data.numpad5Name = shortcutData.num5name; player.data.numpad6A = shortcutData.num6animA; player.data.numpad6B = shortcutData.num6animB; player.data.numpad6C = shortcutData.num6animC; player.data.numpad6D = shortcutData.num6animD; player.data.numpad6Name = shortcutData.num6name; player.data.numpad7A = shortcutData.num7animA; player.data.numpad7B = shortcutData.num7animB; player.data.numpad7C = shortcutData.num7animC; player.data.numpad7D = shortcutData.num7animD; player.data.numpad7Name = shortcutData.num7name; player.data.numpad8A = shortcutData.num8animA; player.data.numpad8B = shortcutData.num8animB; player.data.numpad8C = shortcutData.num8animC; player.data.numpad8D = shortcutData.num8animD; player.data.numpad8Name = shortcutData.num8name; player.data.numpad9A = shortcutData.num9animA; player.data.numpad9B = shortcutData.num9animB; player.data.numpad9C = shortcutData.num9animC; player.data.numpad9D = shortcutData.num9animD; player.data.numpad9Name = shortcutData.num9name; }); }else{ gm.mysql.handle.query("INSERT INTO shortcuts SET name = ?", [player.name], function (insertError) { if (insertError) console.log(`[Shortcuts Init Error] ${err.message}`); if(!insertError){ gm.mysql.handle.query("SELECT * FROM shortcuts WHERE name = ?", [player.name], function (err10,res10) { if (err10) console.log("Error in loadShortcuts: "+err10); if (res10.length > 0) { res10.forEach(function (shortcutData) { player.data.numpad1A = shortcutData.num1animA; player.data.numpad1B = shortcutData.num1animB; player.data.numpad1C = shortcutData.num1animC; player.data.numpad1D = shortcutData.num1animD; player.data.numpad1Name = shortcutData.num1name; player.data.numpad2A = shortcutData.num2animA; player.data.numpad2B = shortcutData.num2animB; player.data.numpad2C = shortcutData.num2animC; player.data.numpad2D = shortcutData.num2animD; player.data.numpad2Name = shortcutData.num2name; player.data.numpad3A = shortcutData.num3animA; player.data.numpad3B = shortcutData.num3animB; player.data.numpad3C = shortcutData.num3animC; player.data.numpad3D = shortcutData.num3animD; player.data.numpad3Name = shortcutData.num3name; player.data.numpad4A = shortcutData.num4animA; player.data.numpad4B = shortcutData.num4animB; player.data.numpad4C = shortcutData.num4animC; player.data.numpad4D = shortcutData.num4animD; player.data.numpad4Name = shortcutData.num4name; player.data.numpad5A = shortcutData.num5animA; player.data.numpad5B = shortcutData.num5animB; player.data.numpad5C = shortcutData.num5animC; player.data.numpad5D = shortcutData.num5animD; player.data.numpad5Name = shortcutData.num5name; player.data.numpad6A = shortcutData.num6animA; player.data.numpad6B = shortcutData.num6animB; player.data.numpad6C = shortcutData.num6animC; player.data.numpad6D = shortcutData.num6animD; player.data.numpad6Name = shortcutData.num6name; player.data.numpad7A = shortcutData.num7animA; player.data.numpad7B = shortcutData.num7animB; player.data.numpad7C = shortcutData.num7animC; player.data.numpad7D = shortcutData.num7animD; player.data.numpad7Name = shortcutData.num7name; player.data.numpad8A = shortcutData.num8animA; player.data.numpad8B = shortcutData.num8animB; player.data.numpad8C = shortcutData.num8animC; player.data.numpad8D = shortcutData.num8animD; player.data.numpad8Name = shortcutData.num8name; player.data.numpad9A = shortcutData.num9animA; player.data.numpad9B = shortcutData.num9animB; player.data.numpad9C = shortcutData.num9animC; player.data.numpad9D = shortcutData.num9animD; player.data.numpad9Name = shortcutData.num9name; }); } }) } }) } }); if you need more contact me
  6. Попробовал сделать на сервере таймер через setInterval вне событий и решил написать данный код в этом таймере: let vehicle = mp.vehicles.at(0); console.log(vehicle); Данное значение показывает только { setVariable: [function], call: [function] } Почему я не могу получить data значения которые создавал в событии для этого объекта? Однако в событиях присутствует возможность получения data значений при аналогичном получении объекта.
  7. 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>
  8. 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')
  9. Version 1.0.1

    346 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!
  10. 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
  11. Доброго времени суток! Требуются дополнительные разработчики для запуска крупного проекта в GTA V (Rage MP). Требуемые специалисты : - Программист. Основные требования: Опыт работы с Rage MP, знание нативного JS для написания качественного мода, а также Typescript, Vue.js, SQL, Git, Jira. Знание RP и его основных механик, усидчивость, ответственность, умение находить и фиксить баги, умение работать с ТЗ. Приветствуется знание html, css; ВАЖНО: Если вы уже работаете в крупном проекте и вам не нравятся условия работы - также пишите! Возможно именно у нас для вас будут созданы самые благоприятные условия Требуются разработчики с хорошим запасом знаний, должным количеством времени, стрессоустойчивость, энтузиазмом и умением работать в команде! Планируется долгосрочное сотрудничество! Условия: - З/П (по факту/оклад); - Адекватное техническое задание; - При необходимости составление договора; Если вы хотите работать с нами, напишите!https://vk.com/timich_t
  12. 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); });
  13. 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!
  14. 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
  15. Доброго времени суток. Хочу представить пример парсинга мастер-листа и получения информации о вашем сервере. Скриншот: Код на 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 обязательна!
  16. 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?
  17. Version 1.0.1

    138 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
  18. 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
  19. 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?
  20. Всем привет! Пожалуйста, подскажите кто знает. Могу ли я начать разработку на стороне сервера на языке C#? И параллельно разрабатывать клиент на языке JavaScript? Я хочу использовать одновременно 2 языка для разработки. На каждой стороне свой. Как я могу это реализовать?
  21. 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?
  22. 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?
  23. unkaid

    Realtime Weather

    Version 1.0.0

    151 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
  24. 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
  25. 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.