Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function login(player)
- if player != loginName then
- print("[KdLogin] Sorry, but you aren't authorized to login here. Try the Guest account!")
- return false
- elseif args[] < 2 then
- print("[KdLogin] You need two arguments; the playername, and the loginName, you can also change this to a username and password in teh console.")
- return false
- elseif player == loginName then
- print("[KdLogin] Logging in ".. player .." now.")
- loggedIn = true
- end
- end
- function setLoginName(name)
- loginName = name
- return true
- end
- function isLoggedIn()
- if loggedIn then
- return true
- else
- return false
- end
- end
- function logOut()
- if loggedIn() then
- loggedIn = !loggedIn
- print("[KdLogin] Logging out")
- return true
- else
- return false
- end
- end
- function logInGuest()
- if loggedIn() == false then
- loggedInGuest = true
- print("[KdLogin] Logging in the guest account")
- return true
- else
- print("[KdLogin] You need to log out first!")
- return false
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement