Jump to content
RAGE Multiplayer Community

nodejs mp.gui is undefined


Recommended Posts

Here is my index.js code:

require('../grandrp/events/OnPlayerJoin.js');

console.log('Server started');

Here is OnPlayerJoin.js

mp.events.add('playerJoin', (player) => {
  mp.gui.chat.push(`${player.name} has joined the server!`);
  
  player.spawn(new mp.Vector3(2185.73, 259.42, 261.52));
});

When player is joined it says:

TypeError: Cannot read property 'chat' of undefined

Link to post
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...