Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Registration here
- function registerPlayer(username,password,passwordConfirm)
- if not (username == "") then
- if not (password == "") then
- if not (passwordConfirm == "") then
- if password == passwordConfirm then
- local account = getAccount (username,password)
- if (account == false) then
- local accountAdded = addAccount(tostring(username),tostring(password))
- if (accountAdded) then
- triggerClientEvent(source,"hideRegisterWindow",getRootElement())
- outputChatBox ("You have been registered successfully [Username " .. username .. " Password" .. password .. "]",source,255,255,255,true )
- setTimer(outputChatBox,800,1,"#F00000Ahora puede ingresar con su nueva cuenta.",source,255,255,255,true )
- else
- outputChatBox ("#F00000Error!Choose username/password and try again.",source,255,255,255,true )
- end
- else
- outputChatBox ("#F00000Error! This account exits already!",source,255,255,255,true )
- end
- else
- outputChatBox ("#F00000Error! Characters doesnt match!",source,255,255,255,true)
- end
- else
- outputChatBox ("#F00000Error! Fortify the password!",source,255,255,255,true)
- end
- else
- outputChatBox ("#F00000Error! Set key!",source,255,255,255,true)
- end
- else
- outputChatBox ("#F00000Error! You welcome and put username and password to register!",source,255,255,255,true)
- end
- end
- addEvent("onRequestRegister",true)
- addEventHandler("onRequestRegister",getRootElement(),registerPlayer)
Add Comment
Please, Sign In to add comment