zombienation Posted March 10, 2012 Share Posted March 10, 2012 Hello, I am trying to merge some stuff in my server and i have a double chat, I know i fixed it by looking in the luas but i forgot what to look for in the lines lol. Could anybody who had this to tell me how i can search the lines by searching on a word? If u remember it lol This could spare me some time Thx Link to comment
Kenix Posted March 10, 2012 Share Posted March 10, 2012 I think you use freeroam resource and in freeroam have custom chat messages. So for disable: Open freeroam->Open file fr_server.lua->find event onPlayerChat->delete event handler ->done. 1 Link to comment
zombienation Posted March 10, 2012 Author Share Posted March 10, 2012 I think you use freeroam resource and in freeroam have custom chat messages.So for disable: Open freeroam->Open file fr_server.lua->find event onPlayerChat->delete event handler ->done. No its not the freeroam resource, I added.a.script from a friend. From then i have the double.chat, when it is off its all ok. So i have to look in all the luas, wich are maybe 25 lol. I will see what i will find on the info u gve me. Thx Link to comment
Agon Posted March 12, 2012 Share Posted March 12, 2012 No you didn't get it. Freeroam has it's own chat script. And you put another chat script. So it outputs 2 messages. Just delete chat lines in freeroam as kenix said.. Link to comment
Moderators IIYAMA Posted March 12, 2012 Moderators Share Posted March 12, 2012 I am stuppit or does he means how to find a damn word in a not path.... maybe you mean the command: ctrl + F ???? (windows) CMD + F (apple... if you have a apple like me I write sometimes my codes at school ) Link to comment
Z4Zy Posted March 27, 2018 Share Posted March 27, 2018 On 3/10/2012 at 23:13, Kenix said: I think you use freeroam resource and in freeroam have custom chat messages. So for disable: Open freeroam->Open file fr_server.lua->find event onPlayerChat->delete event handler ->done. [ @Kenix ] yes... it's true.. and.... when freeroam resource is in stop, players can chat. Can you please tell me where is that handler located ? Link to comment
Discord Moderators Pirulax Posted March 28, 2018 Discord Moderators Share Posted March 28, 2018 Didnt Kenix said that? Link to comment
Z4Zy Posted March 29, 2018 Share Posted March 29, 2018 Kenix said that freeroam has custom chat messages, and when remove the handler, chat messages will stop display in chatbox. yes it is correct. it happens. But, when that chat system is shut, players can send chats to the chatbox yet and that chat's color is default color. So, where is that handler located? Link to comment
monamour Posted March 30, 2018 Share Posted March 30, 2018 one of them is from freeroam and the other one if from some another resource so you need to stop the running resources one by one and check after every stop if the problem sloved Link to comment
Z4Zy Posted March 30, 2018 Share Posted March 30, 2018 Here is the Problem, There's no double chat problem in the server. Chat happens normally. Okay, When stopping freeroam resource, chat cannot be displayed.... because chat handler is in freeroam resource. Right...!! But, players can still chat. So where is that handler located? Link to comment
monamour Posted March 30, 2018 Share Posted March 30, 2018 4 hours ago, DeadthStrock said: Here is the Problem, There's no double chat problem in the server. Chat happens normally. Okay, When stopping freeroam resource, chat cannot be displayed.... because chat handler is in freeroam resource. Right...!! But, players can still chat. So where is that handler located? the probleam is in some other resource than freeroam!! so you have chat handler in another script , so you have to check your running resuorces one of them has chat handler (try to stop them and try ) when you find out which one has the chat handler edit it and delete the chat handler . try to check after each stopping if the problem sloved Link to comment
Z4Zy Posted April 1, 2018 Share Posted April 1, 2018 (edited) In Local Server, I've unprotected resources that are protected by default and then stop all the resources using "stop all resources" button in the admin panel. But chatbox can be use to chat..!! That means problem remains same Edited April 1, 2018 by DeadthStrock Link to comment
monamour Posted April 2, 2018 Share Posted April 2, 2018 On 1.4.2018 at 10:09, DeadthStrock said: In Local Server, I've unprotected resources that are protected by default and then stop all the resources using "stop all resources" button in the admin panel. But chatbox can be use to chat..!! That means problem remains same well i dont know what resuroces you use but you can open the lua files (server side) press Ctrl+f and search for > onPlayerChat -> delete event handler ->done. it can be freeroam and it can be some other script , you have to search. this will slove it 100% 1 Link to comment
myonlake Posted April 3, 2018 Share Posted April 3, 2018 (edited) Do you mean the chatbox T or Y menu opens? That's MTA default functionality. You can disable the chatbox with showChat. Edited April 3, 2018 by myonlake 1 Link to comment
Z4Zy Posted May 29, 2018 Share Posted May 29, 2018 well @monamour This is the "onPlayerChat" event in fr_server.lua addEventHandler('onPlayerChat', root, function(msg, type) if type == 0 then cancelEvent() if chatTime[source] and chatTime[source] + tonumber(get("*chat/mainChatDelay")) > getTickCount() then outputChatBox("Stop spamming main chat!", source, 255, 0, 0) return else chatTime[source] = getTickCount() end if get("*chat/blockRepeatMessages") == "true" and lastChatMessage[source] and lastChatMessage[source] == msg then outputChatBox("Stop repeating yourself!", source, 255, 0, 0) return else lastChatMessage[source] = msg end local r, g, b = getPlayerNametagColor(source) outputChatBox(getPlayerName(source) .. ': #FFFFFF' .. msg:gsub('#%x%x%x%x%x%x', ''), root, r, g, b, true) outputServerLog( "CHAT: " .. getPlayerName(source) .. ": " .. msg ) end end ) Did you see ?? there's a cancelEvent () . It means when player chat, that event will cancel, then customize the message and output. If there wasn't cancelEvent() chat goes double. That's the trouble i have. Now resolved. Anyway Thank you!. Link to comment
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