Jump to content

Recommended Posts

Posted

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

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