itHyperoX Posted April 8, 2017 Share Posted April 8, 2017 Hi. How can i cancel this, when player account not exist? login: No known account for 'sad' I want to cancel the "No known account for 'sad' message like this: if text == "ACL: Access denied for 'start'" then cancelEvent() end Link to comment
xeon17 Posted April 8, 2017 Share Posted April 8, 2017 This message can atually be canceled using the onChatMessage event. Link to comment
itHyperoX Posted April 8, 2017 Author Share Posted April 8, 2017 (edited) i know... already done this. But i can not cancel this, because the "username" always changing. How can i cancel that? i tried with this addEventHandler ( "onClientChatMessage", root, function ( text ,username) if text == "No known account for '"..username.."'" then cancelEvent() end end) Edited April 8, 2017 by TheMOG Link to comment
AE. Posted April 8, 2017 Share Posted April 8, 2017 31 minutes ago, TheMOG said: i know... already done this. But i can not cancel this, because the "username" always changing. How can i cancel that? i tried with this addEventHandler ( "onClientChatMessage", root, function ( text ,username) if text == "No known account for '"..username.."'" then cancelEvent() end end) tested : addEventHandler ( "onClientChatMessage", root, function ( text) if text >= "login: No known account for" then cancelEvent() end end) Link to comment
Tails Posted April 8, 2017 Share Posted April 8, 2017 (edited) addEventHandler ( "onClientChatMessage", root, function ( text ) if string.find(text, "login:") then cancelEvent() end end) Are you trying to block a message from being outputted from the default login system or from a script? I'm not sure if you can but normally the above example should work. Edited April 8, 2017 by Tails 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