Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function LoginScreen_Register()
- local username = guiGetText(tUsername)
- local password = guiGetText(tPassword)
- if (string.len(username)<3) then
- LoginScreen_showWarningMessage("Your username must be a minimum of 3 characters!")
- elseif (string.find(username, ";", 0)) or (string.find(username, "'", 0)) or (string.find(username, "@", 0)) or (string.find(username, ",", 0)) or (string.find(username, " ", 0)) then
- LoginScreen_showWarningMessage("Your username cannot contain ;,@.' or space!")
- elseif (string.len(password)<6) then
- LoginScreen_showWarningMessage("Your password is too short. \n You must enter 6 or more characters.", 255, 0, 0)
- elseif (string.len(password)>=30) then
- LoginScreen_showWarningMessage("Your password is too long. \n You must enter less than 30 characters.", 255, 0, 0)
- elseif (string.find(password, ";", 0)) or (string.find(password, "'", 0)) or (string.find(password, "@", 0)) or (string.find(password, ",", 0)) then
- LoginScreen_showWarningMessage("Your password cannot contain ;,@'.", 255, 0, 0)
- else
- showChat(false)
- triggerServerEvent("accounts:register:attempt", getLocalPlayer(), username, password)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement