bituu_ Posted February 11, 2021 Share Posted February 11, 2021 (edited) I think the chat doesn't work:https://imgur.com/a/kPtU8jj Some help please! Edited February 11, 2021 by bituu_ Link to comment Share on other sites More sharing options...
MrPancakers Posted February 12, 2021 Share Posted February 12, 2021 If you haven't setup the playerChat event then nothing will show up. Link to comment Share on other sites More sharing options...
bituu_ Posted February 12, 2021 Author Share Posted February 12, 2021 (edited) Ty so much! I'm a newcomer in rage Edited February 12, 2021 by bituu_ Link to comment Share on other sites More sharing options...
Ted1 Posted February 18, 2021 Share Posted February 18, 2021 I have the same problem, for me is not working even if i have setup the playerChat in server-side. Can someon help me? Thanks! Link to comment Share on other sites More sharing options...
bituu_ Posted February 18, 2021 Author Share Posted February 18, 2021 (edited) 4 hours ago, Ted1 said: I have the same problem, for me is not working even if i have setup the playerChat in server-side. Can someon help me? Thanks! mp.events.add("playerChat", (player, message) => { if (message.length > 0 && message != "" && message != " " && message != " " && message != " " && message.length <= 60 && message != " ") { mp.players.broadcast(`${player.name} [${player.id}]: ${message}`) } }); I use this in packages not in client_packages Daca mai ai vreo problema da-mi mesaj pe discord bituu_#4205; Am vazut ca esti roman. Edited February 18, 2021 by bituu_ Link to comment Share on other sites More sharing options...
Ted1 Posted February 19, 2021 Share Posted February 19, 2021 Multumesc foarte mult de raspuns, o sa te adaug acum, sa iti spun daca am reusit! Link to comment Share on other sites More sharing options...
SGH Posted February 22, 2021 Share Posted February 22, 2021 (edited) I am literally having the SAME exact issue right now. I have a custom chat setup and it still won't work. If I kept everything default I run into the same issue. No user chat or commands work. Can't even get my error messages to appear for any unfinished command I try to execute. Help!! I can't continue without this and pulling my hair out lol UPDATE: I had an issue with a server event which once rectified, fixed the chat issue. Edited February 22, 2021 by SGH Link to comment Share on other sites More sharing options...
bituu_ Posted February 23, 2021 Author Share Posted February 23, 2021 13 hours ago, SGH said: I am literally having the SAME exact issue right now. I have a custom chat setup and it still won't work. If I kept everything default I run into the same issue. No user chat or commands work. Can't even get my error messages to appear for any unfinished command I try to execute. Help!! I can't continue without this and pulling my hair out lol UPDATE: I had an issue with a server event which once rectified, fixed the chat issue. Are you using this? Link to comment Share on other sites More sharing options...
Ted1 Posted February 24, 2021 Share Posted February 24, 2021 Quote let api = {"chat:push": chatAPI.push, "chat:clear": chatAPI.clear, "chat:activate": chatAPI.activate, "chat:show": chatAPI.show}; for(let fn in api) { mp.events.add(fn, api[fn]); } Just use this code, if you have a custom chat! Link to comment Share on other sites More sharing options...
Andzhu Posted July 25, 2023 Share Posted July 25, 2023 (edited) Quote $(document).ready(function() { chat.container = $("#chat ul#chat_messages"); hide(); $(".ui_element").show(); $("body").keydown(function(event) { if (event.which == 84 && chat.input == null && chat.active == true) { enableChatInput(true); event.preventDefault(); show(); } else if (event.which == 13 && chat.input != null) { var value = chat.input.children("input").val(); if (value.length > 0) { chat.previous = value; if (value[0] == "/") { value = value.substr(1); if (value.length > 0 && value.length <= 100) mp.invoke("command", value); } else { if (value.length <= 100) mp.invoke("chatMessage", value); } } enableChatInput(false); hide(); } else if (event.which == 27 && chat.input != null) { enableChatInput(false); hide(); } else if (event.which == 38 && chat.input != null) { chat.input.children("input").val(chat.previous); } }); // Event handler for receiving chat messages mp.events.add("chat:push", (message) => { // Call the addChatMessage function to inject the message into the chat chatAPI.push(message); }); }); Edited July 25, 2023 by Andzhu Link to comment Share on other sites More sharing options...
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