trolovecro Posted October 14, 2019 Posted October 14, 2019 Hi guys, yesterday I tried this code for client side js: mp.events.add("playerSpawn", () => { mp.gui.chat.push("You just spawned"); }); and its doesnt work. Just like "playerJoin" or other events on client side. Also i tried for "render" event,and its worked just fine. Can you explain why client side events wont work? (my script is added in index.js)
IDONTSUDO Posted February 8, 2020 Posted February 8, 2020 (edited) same problem it not work((99 Edited February 8, 2020 by IDONTSUDO
KraeuterErich Posted February 14, 2020 Posted February 14, 2020 Same problem. Just started with developing and much on client side isn't working.
Vernetti Posted February 17, 2020 Posted February 17, 2020 (edited) В 14.10.2019 в 23:35, trolovecro сказал: Hi guys, yesterday I tried this code for client side js: mp.events.add("playerSpawn", () => { mp.gui.chat.push("You just spawned"); }); and its doesnt work. Just like "playerJoin" or other events on client side. Also i tried for "render" event,and its worked just fine. Can you explain why client side events wont work? (my script is added in index.js) maybe becouze This event is not called for the local player who joined the server ))? so i can explain :3 when u joining the server, all players will call clientside event playerJoin, but not u Edited February 17, 2020 by Vernetti
tostado Posted February 18, 2020 Posted February 18, 2020 you can add that event to server side and use player.outputChatBox mp.events.add("playerSpawn", (player) => { player.outputChatBox("You just spawned"); });
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