buxx0 2 Posted August 29, 2017 (edited) Hey. I have some code, example commands that I made are working fine. I can't get player.call to work. I have no idea why. I'm beginner at node/js, previously I scripted some php but nevermind. events.js (packages/gamemode/) server-side - is working fine, console is logging "use strict"; mp.events.add('playerJoin', (player) => { console.log('playerJoin called by' + player.name); player.call('playerJoinHandler', player); // not working }); mp.events.addCommand('veh', (player) => { player.call('playerJoinHandler', player); // working }); events.js (client_packages/gamemode/) - not working "use strict"; mp.events.add('playerJoinHandler', (player) => { mp.gui.chat.push("test"); player.position = (0, 0, 0); }); I've spent half a day on it. I don't know that I'm retarded AF or what. I think few hours ago it was working, but it seemed random so I deleted everything and started from scratch. I guess I've done something wrong, but my commands were working fine. I only can't get playerJoin to work. I can't find answer on the wiki or in example freeroam so I'm asking here for explanation. Thank for ur time. Edited August 29, 2017 by buxx0 Share this post Link to post Share on other sites
ragempdev 792 Posted August 29, 2017 Are you sure that your events.js was executed? Share this post Link to post Share on other sites
buxx0 2 Posted August 29, 2017 (edited) 1 hour ago, ragempdev said: Are you sure that your events.js was executed? It should be because if I gonna call playerJoinHandler from command at serverside, it's working. Edited August 29, 2017 by buxx0 Share this post Link to post Share on other sites
JennyMatrix 2 Posted January 20, 2018 Same problem. Did you found a decision? Share this post Link to post Share on other sites
Bonus 8 Posted January 21, 2018 @JennyMatrix Now the arguments need to be in an array (use brackets): player.call('playerJoinHandler', [player]); 1 Share this post Link to post Share on other sites
deffo 5 Posted January 28, 2018 (edited) Working fine in 0.3.3, probably doesn't work in 0.2. Edited January 28, 2018 by deffo Share this post Link to post Share on other sites