Jump to content

double chat


Recommended Posts

Posted

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

Posted

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.

  • Thanks 1
Posted
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

Posted

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

  • Moderators
Posted

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 :wink: )

  • 6 years later...
Posted
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 ?

 

Posted

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?

Posted

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

Posted

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?

Posted
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

Posted (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 by DeadthStrock
Posted
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%

  • Thanks 1
  • 1 month later...
Posted

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!^_^.

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