FlyingSpoon Posted November 14, 2014 Posted November 14, 2014 function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount(username, password) if (logIn(player, account, password) == true) then outputChatBox("Welcome to 'Zombie Apocalypse 1.0', Enjoy the BETA!", player, 0, 255, 0) outputChatBox("Author(s): RaysMTA", player, 0, 255, 0) spawnPlayer(source, 1959.55, -1714.46, 10) fadeCamera (source, true) setCameraTarget (source, source) triggerClientEvent(player, "hideLoginWindow", getRootElement()) else triggerClientEvent(player, "unknownError", getRootElement()) end end end What I want is once, the player registers, they spawn in a certain place. I tried the code above ^ but it don't work after they register, you just get a blank screen! GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
roaddog Posted November 15, 2014 Posted November 15, 2014 you could set timer for the screen to fade out. like this. function registerHandler(player, username, password) local account = getAccount(username, password) if (account ~= false) then triggerClientEvent(player, "registerTaken", getRootElement()) else account = addAccount(username, password) if (logIn(player, account, password) == true) then fadeCamera(source, false) outputChatBox("Welcome to 'Zombie Apocalypse 1.0', Enjoy the BETA!", player, 0, 255, 0) outputChatBox("Author(s): RaysMTA", player, 0, 255, 0) triggerClientEvent(player, "hideLoginWindow", getRootElement()) spawnPlayer(source, 1959.55, -1714.46, 10) setCameraTarget (source, source) setTimer(fadeCamera, 2000, 1, source, true) else triggerClientEvent(player, "unknownError", getRootElement()) end end end You gone learn today. I work my ass off, but I still can't pay tho.
Anubhav Posted November 15, 2014 Posted November 15, 2014 Just a small note, source is not trusted. You should use client instead of source. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
FlyingSpoon Posted November 15, 2014 Author Posted November 15, 2014 @Anubhav: Thank you for the suggestion, I have changed it! @NeverGiveup: Thanks for the fix! It worked +1 GitHub: https://github.com/flyingspoon YouTube: https://www.youtube.com/channel/UClsnd4SEid3gob33DSk1-GQ
Anubhav Posted November 15, 2014 Posted November 15, 2014 No problem. See my some resources: Skin shop: https://community.multitheftauto.com/in ... ls&id=8008 Note script: https://community.multitheftauto.com/in ... ls&id=8009 Rules Panel: https://community.multitheftauto.com/in ... ls&id=8246 Random Money: https://community.multitheftauto.com/in ... ls&id=8718
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