Jump to content

MTA:SA logIn logOut messages


vinigas

Recommended Posts

Posted

I use logIn, logOut functions in my script and I see that I getting chat messages then I am testing. Can I turn off those automatic messages ?

Quote

login: You successfully logged in.

login: You are already logged in.

 

Posted
12 minutes ago, vinigas said:

login: You successfully logged in.

login: You are already logged in

This means that the logIn function is being triggered twice. Mostly happens when you double click on a gui button.

Posted

Yea I know, but that's is not a problem. The problem is that i do not use outputChatBox, but I'm still getting this chat messages.

Posted (edited)

@Walid No... MrTasty's solution would work just fine.

To put it into an example:

function onChatMessage(text)
	if(string.sub(text,1,6) == "login:" or string.sub(text,1,7) == "logout:") then -- Check if it contains login: or logout: strings
		cancelEvent() -- Cancel it
	end
end
addEventHandler("onClientChatMessage",root,onChatMessage)

 

Edited by GTX
  • Like 2

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