Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/06/18 in Posts

  1. Hey guys, Our community has been in development for a while now, and we've shown some images on our forums, but I wanted to show some here as well. Some of the screenshots may be outdated, as I'm showing everything. Let's see how long I can keep this thread going to show how far we have come, and how far we will go. Every feature is a work in progress, enjoy. New videos that were released:
    1 point
  2. Hello! Asynchronous Javascript Communication is a module to allow easy communication between server, client and CEF/browser. This module lets you call server handlers from clients (and vice versa) without dealing with adding and managing custom event handlers. You can easily call a handler and get your callback called as soon as everything is returned from the handler in a promise like way! Let's see how it works in action: // server side const ajcom = require("./ajcom") ajcom.register("getServerName", hCtx => { return mp.config.name }) // client side const ajcom = require("./[package name]/ajcom.js") mp.events.add("guiReady", () => { ajcom.callServer("getServerName").then((ctx, serverName) => { mp.gui.chat.push(`Welcome to ${serverName} ragemp server!`) }) }) That's all! Not convinced yet? See how the above code is done without ajcom: // server side mp.events.add("getServerName", (player) => { player.call("gotServerName", [mp.config.name]) }) // client side mp.events.add("gotServerName", (serverName) => { mp.gui.chat.push(`Welcome to ${serverName} ragemp server!`) }) mp.events.add("guiReady", () => { mp.events.callRemote("getServerName") }) See? It eases the event handling mess. But there's a lot more to ajcom. You can easily handle errors happening on handler's side or any of the callbacks, set delays and other stuff. The full documentation is available here and you can grab the module from here Github repo Changelog v1.9.6 (2018/3/7) added jsdocs for constructors added separate enums and classes for types used as parameters added noPostback flag added flags for handlers added special handlers (hooks) for server side handlers getting called added the ability to broadcast a call to all or specific clients added cef support added cross side logging fixed calling a handler with triggerDelay not being called fixed data.source and data.target having wrong values change the namespace so that users can use enums and classes v1.1.3 (2018/2/25) added jsdocs changed event handling codes fixed client > client call fixed some possible crashes (fake client calling server) v1.0.0 (2018/2/15): Initial release!
    1 point
  3. let Ped = mp.peds.new(mp.game.joaat('MP_F_Freemode_01'), new mp.Vector3( 100.0, -100.0, 25.0), 270.0, (streamPed) => { // Ped Streamed streamPed.setAlpha(0); streamPed.freezePosition(true); }, player.dimension);
    1 point
  4. Hi, In reference to: https://rage.mp/forums/forum/43-tutorials/ Due to the activity on the forums (or lack thereof), we cannot rely on tutorials that provide correct information to push the tutorials that provide incorrect information further down the pagination. Is there not a possibility of us being able to refactor these incorrect tutorials, if not remove them altogether? I can't think of another good solution without creating a whole bunch of admin. Third party scripting such as this always seems to be the starting point for a lot of people who have a (dormant) interest in programming/scripting and I'm sure we can agree that the accuracy of something that the official website of said third party scripting which is referred to as "Tutorials" should be inline with the way things actually work. Perhaps I'm just blowing hot air. Feedback would be much appreciated
    1 point
  5. Okay it seems you can't do multible global.Functions = require(fileA) global.Functions = require(fileB) global.Functions = require(fileC)
    1 point
×
×
  • Create New...