hellaluffy 0 Posted February 11 Share Posted February 11 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
Tampa 51 Posted February 11 Share Posted February 11 mp.gui. is only for client-side Link to post Share on other sites
MarcoQ 1 Posted February 12 Share Posted February 12 @hellaluffy https://wiki.rage.mp/index.php?title=Player::outputChatBox Link to post Share on other sites
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now