Jump to content

Recommended Posts

Posted (edited)

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

Edited by HankSteiner
idk
Posted

Yeah as you saw if you register it serverside and call it clientside, the first parameter is always a player object, and then it's the arguments that you pass. Glad you worked it out.

  • Like 1

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