Jump to content

Recommended Posts

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

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

 

  • Mask 1
  • 4 weeks later...
Posted (edited)

@Remmi_Jefferson

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
  • 2 months later...
Posted
В 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
});

 

//client
mp.events.callRemote("PlayerData", player);
mp.gui.chat.push(player.age);
//server
mp.events.add({
    'PlayerData' : player => {
        player.age = "test"
    });

So?

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