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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.