Jump to content

KieronWiltshire

Members
  • Posts

    20
  • Joined

  • Last visited

Details

  • Gang
    ballas

KieronWiltshire's Achievements

Civilian

Civilian (7/54)

0

Reputation

  1. I was wondering if anyone here has managed to not use MyBB's permission system? I'd really like to make my own which allows me to use on multiple applications such as MTA:SA, so like I will have a universal permission system.
  2. Is there a property or something I could configure in order to get text aligned to the center of a label. I don't want any solutions in 'hard code'. I'm just wondering, that's all!
  3. I am, but my events were not working, so i tried other events to make sure what the issue was... Besides i need to hide the gui after login etc...
  4. I want to keep the @ and . symbols though for the email, is this possible?
  5. No it honestly doesn't all the code is in gui, the client-script is empty for now...
  6. Just says they don't exist client side...
  7. Issue with my event handlers. ServerSide local SQL_HOST = "127.0.0.1" local SQL_USERNAME = "root" local SQL_PASSWORD = "" function connect() accountsDatabase = dbConnect( "mysql", SQL_HOST, SQL_USERNAME, SQL_PASSWORD, "share=0" ) outputChatBox("connected") checkExists() triggerClientEvent("hideLoginWindow", getRootElement()) triggerClientEvent("hideRegisterWindow", getRootElement()) end addEventHandler ( "onResourceStart", getRootElement(), connect ) ClientSide --Display the login window to the root element function displayLoginWindow() --source is the player in this case. guiSetVisible(loginWindow, true ) outputChatBox("displayed") end --Hide the login window to the root element function hideLoginWindow() --source is the player in this case. guiSetVisible(loginWindow, false ) end --Display the register window to the root element function displayRegisterWindow() --source is the player in this case. guiSetVisible(registerWindow, true ) end --Hide the login window to the root element function hideRegisterWindow() --source is the player in this case. guiSetVisible(registerWindow, false ) end --[[ LOGIN ALERT LABEL FUNCTIONS ]]-- --Set the login label to a custom message function setLoginAlertLabel(message) guiSetText( loginAlertLabel, message ) end --"Your email or password maybe incorrect or doesn't exit. If the account \ndoesn't exist please create an account before attempting to login." --[[ REGISTER ALERT LABEL FUNCTIONS ]]-- --Set the register label to a custom message function setRegisterFullNameAlertLabel(message) guiSetText( registerFullNameAlertLabel, message ) end --Set the email alert label to a custom message function setRegisterEmailAlertLabel(message) guiSetText( registerEmailAlertLabel, message ) end --Set the password alert label to a custom message function setRegisterPasswordAlertLabel(message) guiSetText( registerPasswordAlertLabel, message ) end addEvent( "displayLoginWindow", true ) addEvent( "hideLoginWindow", true ) addEvent( "displayRegisterWindow", true ) addEvent( "hideRegisterWindow", true ) addEvent( "setLoginAlertLabel", true ) addEvent( "setRegisterFullNameAlertLabel", true ) addEvent( "setRegisterEmailAlertLabel", true ) addEvent( "setRegisterPasswordAlertLabel", true ) addEventHandler( "displayLoginWindow", getRootElement(), displayLoginWindow ) addEventHandler( "hideLoginWindow", getRootElement(), hideLoginWindow ) addEventHandler( "displayRegisterWindow", getRootElement(), displayRegisterWindow ) addEventHandler( "hideRegisterWindow", getRootElement(), hideRegisterWindow ) addEventHandler( "setLoginAlertLabel", getRootElement(), setLoginAlertLabel ) addEventHandler( "setRegisterFullNameAlertLabel", getRootElement(), setRegisterFullNameAlertLabel ) addEventHandler( "setRegisterEmailAlertLabel", getRootElement(), setRegisterEmailAlertLabel ) addEventHandler( "setRegisterPasswordAlertLabel", getRootElement(), setRegisterPasswordAlertLabel ) My meta: <meta> <!-- SCRIPT INFORMATION --> <info author="Kieron Wiltshire" type="script" name="ZedLogin" description="Zed login script" /> <script src="gui.lua" type="client" /> <script src="login-server.lua" type="server" /> <script src="login-client.lua" type="client" /> </meta>
  8. So, now for my login function, would I also encrypt the password to MD5 on login and check the encryption from SQL and from login?
  9. How should I store passwords? I would like to encrypt them to SHA1 or MD5 if possible
  10. I know that, I just don't want to type each individual character out...
  11. Does anyone have a function which I can use which checks for illegal characters for things like usernames and stuff please?
  12. It would be much appreciated if you could explain the if statement please, I would really like to know what's going on so I grasp it better.
  13. Can anyone please help me, I really want to get this finished by tonight if possible.
  14. Thanks, but what about my 2nd question about finishing the query, can you help me there as well please?
  15. No, I mean the SELECT FROM INSERT, that kinda stuff, where can I look this up? Also you know the dbPoll, how I use it to check if a user exists in a database... i.e --Check if the email already exists.. function emailExists(email) local query = dbQuery ( accountsDatabase, "SELECT * FROM users WHERE email=?", email ) local result = dbPoll ( query, - 1 ) if() then return true else return false end end how would I finish this code so I can check if the email exists, does dbPoll work like a for loop, does it look through each result, how can I check if email exists in database...
×
×
  • Create New...