TheGamingMann Posted January 31, 2014 Share Posted January 31, 2014 (edited) I have a custom login in message and login panel. Could you help me disable or silence the "ACL: You have logged in" message please. Thank you. Here is my code. c_login.lua: function createRegister() local screenW, screenH = guiGetScreenSize() wdwAccount = guiCreateWindow((screenW - 378) / 2, (screenH - 109) / 2, 378, 109, "", false) guiWindowSetSizable(wdwAccount, false) lblPassword = guiCreateLabel(10, 37, 102, 15, "Enter a Password", false, wdwAccount) guiSetFont(lblPassword, "default-bold-small") edtInfo = guiCreateEdit(127, 33, 240, 24, "", false, wdwAccount) guiEditSetMasked(edtInfo, true) btnSubmit = guiCreateButton(112, 67, 153, 30, "Submit", false, wdwAccount) addEventHandler("onClientGUIClick", btnSubmit, accRequest, false) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), function() createRegister() guiSetVisible(wdwAccount, false) showRegister() end ) function showRegister() if not guiGetVisible(wdwAccount) then guiSetVisible(wdwAccount, true) showCursor(true, true) end end function hideRegister() guiSetVisible(wdwAccount, false) showCursor(false, false) triggerEvent("showSpawnWindow", localPlayer) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", localPlayer, hideRegister) function accRequest() local password = guiGetText(edtInfo) triggerServerEvent("accLogReg", localPlayer, password) end s_login.lua: function loginHandler(password) local account = getAccount(getPlayerName(source), password) if (account ~= false) then logIn(source, account, password) outputChatBox("Welcome back "..getPlayerName(source)..".", source, 102, 40, 2) triggerClientEvent("hideLoginWindow", source) else if (password ~= "" and password ~= nil) then local accountAdded = addAccount(getPlayerName(source), password) if (accountAdded) then outputChatBox("Thank you for registering "..getPlayerName(source)..".", source, 102, 40, 2) outputChatBox("If you click 'Submit' again you can login.", source, 102, 40, 2) end end end end addEvent("accLogReg", true) addEventHandler("accLogReg", root, loginHandler) Thanks in advanced for any help guys. Also sorry if I am a bit "Annoying". -Fixed Edited February 1, 2014 by Guest Link to comment
TheGamingMann Posted February 1, 2014 Author Share Posted February 1, 2014 I don't usually like bumping things but I would really like to know if this is possible. Link to comment
TheGamingMann Posted February 1, 2014 Author Share Posted February 1, 2014 Sorry for the second bump but I have not found any way to do this. Link to comment
Bonsai Posted February 1, 2014 Share Posted February 1, 2014 Are you talking about this MTA built in login confirm? If so, try -cancelEvent on https://wiki.multitheftauto.com/wiki/OnPlayerLogin and then - https://wiki.multitheftauto.com/wiki/LogIn Never did that, no idea what happens. Link to comment
TheGamingMann Posted February 1, 2014 Author Share Posted February 1, 2014 Sorry for the slow response. But here are some screen shot. Red Box = Wish to Remove Green Box = Keep Sorry for the messy job. Its just the yellow text that I don't want there. Link to comment
xXMADEXx Posted February 1, 2014 Share Posted February 1, 2014 As far as I know, you can't remove it, unless maybe if you use onChatMessage, and check to see if the message is equal to the login message, then cancel it out... Maybe that would work, but i'm not really sure. So something like this: addEventHandler ( "onChatMessage", root, function ( msg ) if ( tostring ( msg ) : lower ( ) == "login: you successfully logged in" ) then cancelEvent ( ) end end ) Link to comment
TheGamingMann Posted February 1, 2014 Author Share Posted February 1, 2014 No. That is just keeping the message thanks for trying anyway. I will just clear it before outputting mt own I guess. 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