codeluaeveryday Posted October 15, 2011 Share Posted October 15, 2011 ehh, last question, if SolidSnake can help then please do, i will be releasing it on my server soon. I need it too fade to black on playerlogin. This is similiar to the old post, now its just the fading? why wont it work? function enableinput() triggerClientEvent(source,"afterlogin",getRootElement()) fadeCamera ( source, true, 1.0, 0, 0, 0 ) end addEventHandler("onPlayerLogin",getRootElement(),enableinput) function camerafade() fadeCamera ( source, false, 1.0, 0, 0, 0 ) end addEventHandler("onResourceStart",getRootElement(),camerafade) Link to comment
Castillo Posted October 15, 2011 Share Posted October 15, 2011 function enableinput() triggerClientEvent(source,"afterlogin",getRootElement()) fadeCamera ( source, true, 1.0, 0, 0, 0 ) end addEventHandler("onPlayerLogin",getRootElement(),enableinput) function camerafade() --fadeCamera ( source, false, 1.0, 0, 0, 0 ) -- WTF is this? you think you can just copy one line and paste it and it'll work? for index, player in pairs(getElementsByType("player")) do fadeCamera ( player, false, 1.0, 0, 0, 0 ) end end addEventHandler("onResourceStart",resourceRoot,camerafade) Link to comment
codeluaeveryday Posted October 15, 2011 Author Share Posted October 15, 2011 function enableinput() triggerClientEvent(source,"afterlogin",getRootElement()) fadeCamera ( source, true, 1.0, 0, 0, 0 ) end addEventHandler("onPlayerLogin",getRootElement(),enableinput) function camerafade() --fadeCamera ( source, false, 1.0, 0, 0, 0 ) -- WTF is this? you think you can just copy one line and paste it and it'll work? for index, player in pairs(getElementsByType("player")) do fadeCamera ( player, false, 1.0, 0, 0, 0 ) end end addEventHandler("onResourceStart",resourceRoot,camerafade) Thank you Now one last tincy question, i sware, its the last i promise... I am trying to make the guest button work, it hides the gui alright ofc... but its the way ive done it... I sware, its gonna be awhile before i post again D: Client: function playasguest() triggerServerEvent(source,"hidefade",getRootElement()) guiSetInputEnabled(false) guiSetVisible ( loginwindow, false ) showCursor (false) end addEventHandler ( "onClientGUIClick", guestbutton, playasguest, false ) server: addEvent("hidefade",true) function camerafade() for index, player in pairs(getElementsByType("player")) do fadeCamera ( player, false, 1.0, 0, 0, 0 ) end end addEventHandler("onResourceStart",resourceRoot,camerafade) addEventHandler("hidefade",resourceRoot,camerafade) Link to comment
Castillo Posted October 15, 2011 Share Posted October 15, 2011 See? you did it again, you copyed and pasted what I written in the other post.. with this script you are fading off the camera of all players. Link to comment
codeluaeveryday Posted October 15, 2011 Author Share Posted October 15, 2011 See? you did it again, you copyed and pasted what I written in the other post.. with this script you are fading off the camera of all players. I half understand what you mean I guess i wont be getting a fix, i guess its a puzzle, can i have a second hint, like just 1 line, and ill try my best I have never made an actual GUI before, and by skipping straight into this login GUI, i am really expanding my limits, and castillo, im sure you know what its like to take a large leap and fail, you feel like you can do it, then all of a sudden it doesnt work? Well im taking a leap and a risk. Could you please help me... I just tried a few things, still failed, like i see your point, source would be hiding all, so i tried and i still cant get it working.... I am lost in my own work, shameful... Please help. Link to comment
Castillo Posted October 15, 2011 Share Posted October 15, 2011 I'm saying you just copyed my script and expected me to fix it for you, well, this time you'll have to find your bug and repair it. Link to comment
TAPL Posted October 15, 2011 Share Posted October 15, 2011 function playasguest() triggerServerEvent("hidefade",localPlayer) guiSetInputEnabled(false) guiSetVisible ( loginwindow, false ) showCursor (false) end addEventHandler ( "onClientGUIClick", guestbutton, playasguest, false ) function camerafade() for index, player in pairs(getElementsByType("player")) do fadeCamera ( player, false, 1.0, 0, 0, 0 ) end end addEventHandler("onResourceStart",resourceRoot,camerafade) addEvent("hidefade",true) function camerafade() fadeCamera ( source, false, 1.0, 0, 0, 0 ) end addEventHandler("hidefade",root,camerafade) Link to comment
Castillo Posted October 15, 2011 Share Posted October 15, 2011 TAPL, I wanted him to learn from his errors, that's why I didn't gave him the script, now he'll just take yours and forget about it. Link to comment
codeluaeveryday Posted December 16, 2011 Author Share Posted December 16, 2011 For the record. I never forgot it... I have advanced in scripting. When someone tells me a solution it locks in. Cause i like to modify it. I love learning. Its why im going for a diploma in Information Technology. All my teen years i have been trying to ensure my future career is worth living for. I hope you can understand that. Right now all is very boring. I hope things get better. Link to comment
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