Jump to content

Client-server communication


Recommended Posts

  • 4 weeks later...


I'll be talking in the context of C# methods.

From Client > Server you need to use RAGE.Events.CallRemote(eventName, parameters). In the server-side have a [RemoteEvent] which calls a delegated callback and do the functions there with the parameters.

Edited by $kylar
  • Mask 1
Link to comment
Share on other sites

  • 2 months later...
В 17.12.2019 в 20:11, mbsnero сказал:

// Client Side
mp.events.callRemote("sendDataToServer", data);

// Server Side
mp.events.add("sendDataToServer", function (player, data) {
  // Something do with data & player variables


mp.events.callRemote("PlayerData", player);
    'PlayerData' : player => {
        player.age = "test"


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...