justn Posted March 14, 2014 Posted March 14, 2014 (edited) Okay, so the problem is, when the player clicks the login button, and the player spawns, the screen shows only black, I want it so when the player clicks the 'Login' button and the player spawns, the camera will be on the player like normal. main_s.lua function assigntheteam () setPlayerTeam ( source, Unemployed ) thePlayer = spawnPlayer ( source, 1643.4000244141, -2249.1000976563, 13.300000190735, 0, 0, 178.000488, 0, 0, 0, Unemployed) end addEvent ( "IfNewPlayerJoin", true ) addEventHandler ( "IfNewPlayerJoin", getRootElement(), assigntheteam ) main_c.lua addEventHandler("onClientGUIClick",RegisterLogin_Window, function(b) if b == "left" then if source == LoginButton then username = guiGetText(LoginUsername) password = guiGetText(LoginPass) triggerServerEvent("onRequestLogin",getLocalPlayer(),username,password) triggerServerEvent("IfNewPlayerJoin",getLocalPlayer()) xmlFileHandler() end end end) Edited March 14, 2014 by Guest Datastore - Store data to a database quickly. (Useful for saving scripted tables)
Wei Posted March 14, 2014 Posted March 14, 2014 function assigntheteam () setPlayerTeam ( source, Unemployed ) thePlayer = spawnPlayer ( source, 1643.4000244141, -2249.1000976563, 13.300000190735, 0, 0, 178.000488, 0, 0, 0, Unemployed) setCameraTarget(source, source) end addEvent ( "IfNewPlayerJoin", true ) addEventHandler ( "IfNewPlayerJoin", getRootElement(), assigntheteam ) Diet with russian vodka, lose 3 days in one week !
justn Posted March 14, 2014 Author Posted March 14, 2014 (edited) function assigntheteam () setPlayerTeam ( source, Unemployed ) thePlayer = spawnPlayer ( source, 1643.4000244141, -2249.1000976563, 13.300000190735, 0, 0, 178.000488, 0, 0, 0, Unemployed) setCameraTarget(source, source) end addEvent ( "IfNewPlayerJoin", true ) addEventHandler ( "IfNewPlayerJoin", getRootElement(), assigntheteam ) Screen is still black Edited March 14, 2014 by Guest Datastore - Store data to a database quickly. (Useful for saving scripted tables)
DNL291 Posted March 14, 2014 Posted March 14, 2014 Try using: fadeCamera(source, true) Please do not PM me with scripting related question nor support, use the forums instead.
justn Posted March 14, 2014 Author Posted March 14, 2014 Ah okay, ty guys. Datastore - Store data to a database quickly. (Useful for saving scripted tables)
justn Posted March 14, 2014 Author Posted March 14, 2014 Well, it spawns, but the map doesnt appear Datastore - Store data to a database quickly. (Useful for saving scripted tables)
Karuzo Posted March 14, 2014 Posted March 14, 2014 set the Player to dimension 0 or 1 dunno which was the normal one
Ab-47 Posted March 14, 2014 Posted March 14, 2014 set the Player to dimension 0 or 1 dunno which was the normal one Dimension 0 is default, where everything is. Also check if you're in interior 0 - MAIN And now Aurora is back again, pm for more info. Ex. Lead dev & L6 Staff at AUR, NGC, MTA RP & SAA. Ex. Developer at Community of Social Gamers - CSG Ex Founder of International Gaming Community - IGC and Union of Individual Players- UIP Ab-47
DNL291 Posted March 14, 2014 Posted March 14, 2014 @#Twerky, Try this: function assigntheteam () setPlayerTeam ( source, Unemployed ) spawnPlayer(source, 1643.40002, -2249.10009, 13.300, 178.0004, 0, 0, 0, Unemployed) fadeCamera(source, true) setCameraTarget(source, source) end addEvent ( "IfNewPlayerJoin", true ) addEventHandler ( "IfNewPlayerJoin", getRootElement(), assigntheteam ) Please do not PM me with scripting related question nor support, use the forums instead.
justn Posted March 14, 2014 Author Posted March 14, 2014 @#Twerky, Try this: function assigntheteam () setPlayerTeam ( source, Unemployed ) spawnPlayer(source, 1643.40002, -2249.10009, 13.300, 178.0004, 0, 0, 0, Unemployed) fadeCamera(source, true) setCameraTarget(source, source) end addEvent ( "IfNewPlayerJoin", true ) addEventHandler ( "IfNewPlayerJoin", getRootElement(), assigntheteam ) Works now ! Thanks to all of you ! Datastore - Store data to a database quickly. (Useful for saving scripted tables)
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