Jump to content

ZkillCatIV

Members
  • Posts

    14
  • Joined

  • Last visited

Everything posted by ZkillCatIV

  1. ohhhh I understand it now, its so simple but it seems hard thank you so much for your reply. finally understood that function hahhaha really you have no idea how long i have been looking for this answer.
  2. Thank you so much this post helped me 100% P.S 50p you are awesome dude
  3. Well, I'm trying to move the camera but i dont want to use the object method and I saw that you can do it with interpolatebetween can someone tell me how please
  4. I have an understanding in the topic the only thing that I dont get is the fprogress please can explain me with detail why they use getTickCount() and add subtract and devide to get that progress I just dont get it, thank you...!!! please not mean comments not everybody is an einstein at everything and dont say look at the wiki the wiki dont explain with details.
  5. Thank you so much guys i was doing it with just one dxDrawText using the /n to skip lines but i couldn't get the text to move as i wished to. I tried reading the wiki like 10 times i get the some of the interpolateBetween but i dont get what do i put where it ask me about the x,y,z and the time process but im going to try Thanks Woovie and DealMan . you guys are the best
  6. i need someone to explain me how does interpolateBetween work and how can it be applied and on what please and thank you. i want to make a script that shows credits like in the movies where credits go from the bottom to the top crossing the screen. like that or can someone tell me if its possible PLEASE AND THANK YOU image
  7. OKAY i already fixed the camera but can somebody explain me the interpolateBetween ? Please
  8. So i have a login panel on my server,if i do "onClientPreRender" will it be trigger when the player joins also ? Because i wanted to be trigger when the player LogIn
  9. First of all thanks for taking your time to read this. Back to the question i wanted to make a script that when someone logsIn the camera targeted an object and follow the object as the object moved instead of targeting the player then when the object stoped that the player spawned there where the object stoped. My idea with this was to make a mini intro. But i can not get the setCameraTarget to go to the object and i tried the setCameraMatrix to the object and it works but when i move the object the camera does not follow i already tried with a setTimer and a function but i cant get it to work Note : i dont have a script to post Thanks again for reading this i hope you can help me ☺
  10. ZkillCatIV

    [HELP]

    thank you so much dimos7 , the code worked perfectly i appreciate your time and your help. and also thank you so much SuperCorz for explaining the problem and the solution with great detail thank you guys so much for helping me it works perfect now.
  11. ZkillCatIV

    [HELP]

    well if a player is on the login panel and have not login account the in the panel will show a message that says "account not found" but if in the process another player joins and has already an account it shows a message saying "account found" but the message from the panel that says "account found " also show on the panel from the other player that says "account not found " if like the gui panel was on the server and not on the players. i think it has to do with to whom i am sending the panel but i am not sure i already tried replacing the getRootElement() to other variables and the panel only shows to the player that join but the changes affect the other players panels too.
  12. ZkillCatIV

    [HELP]

    addEvent("accountFound",true) addEvent("accountNotFound",true) addEvent("clientResponse",true) function playerJoined () toggleAllControls(false) fadeCamera(false) joinImg = guiCreateStaticImage(0, 0, 1920, 1080, "login.png", false) loadingText = guiCreateLabel(801, 44, 336, 88, "LOADING ...", false,joinImg) guiLabelSetHorizontalAlign(loadingText, "center", false) guiLabelSetVerticalAlign(loadingText, "center") findingText = guiCreateLabel(801, 44, 336, 88, "FINDING ACCOUNT ...", false,joinImg) guiSetFont(findingText, "clear-normal") guiLabelSetHorizontalAlign(findingText, "center", false) guiLabelSetVerticalAlign(findingText, "center") guiSetVisible(findingText,false) local resource = getResourceFromName ( "login" ) local resourceState = getResourceState( resource ) if (resourceState == "running") then guiSetVisible(loadingText,false) guiSetVisible(findingText,true) triggerServerEvent("checkAccounts", localPlayer) end end function playerLogin () showCursor(true) destroyElement(findingText) foundText = guiCreateLabel(801, 44, 336, 88, "ACCOUNT FOUND ...", false,joinImg) guiLabelSetHorizontalAlign(foundText, "center", false) guiLabelSetVerticalAlign(foundText, "center") userNameTextL = guiCreateLabel(1591, 494, 235, 25, "PLEASE ENTER USERNAME", false, joinImg) userNameBoxL = guiCreateEdit(1553, 519, 309, 34, "", false, joinImg) passwordTextL = guiCreateLabel(1591, 639, 235, 25, "PLEASE ENTER PASSWORD", false, joinImg) passwordBoxL = guiCreateEdit(1553, 664, 309, 34, "", false, joinImg) enterButtonL = guiCreateButton(1637, 838, 160, 42, "LOGIN", false, joinImg) addEventHandler("onClientGUIClick",enterButtonL,login,false) end function login() triggerServerEvent("playerLogins",localPlayer,guiGetText(userNameBoxL),guiGetText(passwordBoxL)) guiSetEnabled(enterButtonL,false) setTimer(guiSetEnabled,3000,1,enterButtonL,true) end function playerRegister () showCursor(true) destroyElement(findingText) unfoundText = guiCreateLabel(801, 44, 336, 88, "ACCOUNT NOT FOUND ...", false,joinImg) guiLabelSetColor(unfoundText, 255, 67, 67) guiLabelSetHorizontalAlign(unfoundText, "center", false) guiLabelSetVerticalAlign(unfoundText, "center") passwordTextR = guiCreateLabel(1591, 494, 235, 25, "PLEASE ENTER PASSWORD", false, joinImg) passwordBoxR = guiCreateEdit(1553, 519, 309, 34, "", false, joinImg) userNameTextR = guiCreateLabel(1591, 359, 235, 25, "PLEASE ENTER USERNAME", false, joinImg) userNameBoxR = guiCreateEdit(1553, 384, 309, 34, "", false, joinImg) emailTextR = guiCreateLabel(1591, 639, 235, 25, "PLEASE ENTER EMAIL", false, joinImg) mailBoxR = guiCreateEdit(1553, 664, 309, 34, "", false, joinImg) emailTextsR = guiCreateLabel(1563, 708, 289, 59, " * email will be used as a password backup,\n also as a form of security and contact issues. please give your authentic and active email\n Thank you.", false, joinImg) enterButtonR = guiCreateButton(1637, 838, 160, 42, "", false, joinImg) addEventHandler("onClientGUIClick",enterButtonR,register,false) end function register() if #guiGetText(userNameBoxR) <= 4 then guiSetText(unfoundText,"THE USERNAME HAS TO HAVE AT LEAST FIVE LETTERS") return end if #guiGetText(passwordBoxR) <= 4 then guiSetText(unfoundText,"THE PASSWORD HAS TO HAVE AT LEAST FIVE LETTERS.") return end if #guiGetText(mailBoxR) <= 9 then guiSetText(unfoundText,"SET AN EMAIL ") return else triggerServerEvent("playerRegisters",localPlayer ,guiGetText(userNameBoxR),guiGetText(passwordBoxR),guiGetText(mailBoxR)) guiSetEnabled(enterButtonR,false) setTimer(guiSetEnabled,3000,1,enterButtonR,true) end end function loginError( number , errors ) if number == 1 or number == 2 then guiSetText(foundText,errors) elseif number == 4 then guiSetText(unfoundText,errors) elseif number == 3 then destroyElement(joinImg) showCursor(false) toggleAllControls(true) fadeCamera(true,5) end end addEventHandler("onClientResourceStart", getRootElement(), playerJoined) addEventHandler("accountFound", getRootElement(), playerLogin) addEventHandler("accountNotFound", getRootElement(), playerRegister) addEventHandler("clientResponse", getRootElement(), loginError) that is the client side addEvent("checkAccounts",true) addEvent("playerLogins",true) addEvent("playerRegisters",true) function checkingAccounts() heSerial = getPlayerSerial(client) accounts = getAccountsBySerial(heSerial) if (#accounts ~= 0) then triggerClientEvent("accountFound",client) else triggerClientEvent("accountNotFound",client) end end function loginProcces (username , password ) if not getAccount(username) then triggerClientEvent(client,"clientResponse",client,1 , "INVALID USERNAME") return end if not getAccount(username,password) then triggerClientEvent(client,"clientResponse",client,2,"INVALID PASSWORD,") return end logIn(client,getAccount(username),password) triggerClientEvent(client,"clientResponse",client,3) end function registerProcces(username, password, email) if getAccount(username) then triggerClientEvent(client,"clientResponse",client,4,"THERE IS ANOTHER ACCOUNT WITH THIS NAME TRY SOMETHING NEW ") return end addAccount(username,password) logIn(client,getAccount(username),password) setAccountData (getAccount(username),heSerial,password) setAccountData (getAccount(username),email,username) triggerClientEvent(client,"clientResponse",client,3) end addEventHandler("checkAccounts",getRootElement(),checkingAccounts) addEventHandler("playerLogins",getRootElement(),loginProcces) addEventHandler("playerRegisters",getRootElement(),registerProcces) and this is the server side thank you so much for the help
  13. ZkillCatIV

    [HELP]

    client side ---------------------------------------- addEvent("accountFound",true) addEvent("accountNotFound",true) addEvent("clientResponse",true) function playerJoined () toggleAllControls(false) fadeCamera(false) joinImg = guiCreateStaticImage(0, 0, 1920, 1080, "login.png", false) loadingText = guiCreateLabel(801, 44, 336, 88, "LOADING ...", false,joinImg) guiLabelSetHorizontalAlign(loadingText, "center", false) guiLabelSetVerticalAlign(loadingText, "center") findingText = guiCreateLabel(801, 44, 336, 88, "FINDING ACCOUNT ...", false,joinImg) guiSetFont(findingText, "clear-normal") guiLabelSetHorizontalAlign(findingText, "center", false) guiLabelSetVerticalAlign(findingText, "center") guiSetVisible(findingText,false) local resource = getResourceFromName ( "login" ) local resourceState = getResourceState( resource ) if (resourceState == "running") then guiSetVisible(loadingText,false) guiSetVisible(findingText,true) triggerServerEvent("checkAccounts", localPlayer) end end function playerLogin () showCursor(true) destroyElement(findingText) foundText = guiCreateLabel(801, 44, 336, 88, "ACCOUNT FOUND ...", false,joinImg) guiLabelSetHorizontalAlign(foundText, "center", false) guiLabelSetVerticalAlign(foundText, "center") userNameTextL = guiCreateLabel(1591, 494, 235, 25, "PLEASE ENTER USERNAME", false, joinImg) userNameBoxL = guiCreateEdit(1553, 519, 309, 34, "", false, joinImg) passwordTextL = guiCreateLabel(1591, 639, 235, 25, "PLEASE ENTER PASSWORD", false, joinImg) passwordBoxL = guiCreateEdit(1553, 664, 309, 34, "", false, joinImg) enterButtonL = guiCreateButton(1637, 838, 160, 42, "LOGIN", false, joinImg) addEventHandler("onClientGUIClick",enterButtonL,login,false) end function login() triggerServerEvent("playerLogins",localPlayer,guiGetText(userNameBoxL),guiGetText(passwordBoxL)) guiSetEnabled(enterButtonL,false) setTimer(guiSetEnabled,3000,1,enterButtonL,true) end function playerRegister () showCursor(true) destroyElement(findingText) unfoundText = guiCreateLabel(801, 44, 336, 88, "ACCOUNT NOT FOUND ...", false,joinImg) guiLabelSetColor(unfoundText, 255, 67, 67) guiLabelSetHorizontalAlign(unfoundText, "center", false) guiLabelSetVerticalAlign(unfoundText, "center") passwordTextR = guiCreateLabel(1591, 494, 235, 25, "PLEASE ENTER PASSWORD", false, joinImg) passwordBoxR = guiCreateEdit(1553, 519, 309, 34, "", false, joinImg) userNameTextR = guiCreateLabel(1591, 359, 235, 25, "PLEASE ENTER USERNAME", false, joinImg) userNameBoxR = guiCreateEdit(1553, 384, 309, 34, "", false, joinImg) emailTextR = guiCreateLabel(1591, 639, 235, 25, "PLEASE ENTER EMAIL", false, joinImg) mailBoxR = guiCreateEdit(1553, 664, 309, 34, "", false, joinImg) emailTextsR = guiCreateLabel(1563, 708, 289, 59, " * email will be used as a password backup,\n also as a form of security and contact issues. please give your authentic and active email\n Thank you.", false, joinImg) enterButtonR = guiCreateButton(1637, 838, 160, 42, "", false, joinImg) addEventHandler("onClientGUIClick",enterButtonR,register,false) end function register() if #guiGetText(userNameBoxR) <= 4 then guiSetText(unfoundText,"THE USERNAME HAS TO HAVE AT LEAST FIVE LETTERS") return end if #guiGetText(passwordBoxR) <= 4 then guiSetText(unfoundText,"THE PASSWORD HAS TO HAVE AT LEAST FIVE LETTERS.") return end if #guiGetText(mailBoxR) <= 9 then guiSetText(unfoundText,"SET AN EMAIL ") return else triggerServerEvent("playerRegisters",localPlayer ,guiGetText(userNameBoxR),guiGetText(passwordBoxR),guiGetText(mailBoxR)) guiSetEnabled(enterButtonR,false) setTimer(guiSetEnabled,3000,1,enterButtonR,true) end end function loginError( number , errors ) if number == 1 or number == 2 then guiSetText(foundText,errors) elseif number == 4 then guiSetText(unfoundText,errors) elseif number == 3 then destroyElement(joinImg) showCursor(false) toggleAllControls(true) fadeCamera(true,5) end end addEventHandler("onClientResourceStart", getRootElement(), playerJoined) addEventHandler("accountFound", getRootElement(), playerLogin) addEventHandler("accountNotFound", getRootElement(), playerRegister) addEventHandler("clientResponse", getRootElement(), loginError) server side--------------------------------------------------------------- addEvent("checkAccounts",true) addEvent("playerLogins",true) addEvent("playerRegisters",true) function checkingAccounts() heSerial = getPlayerSerial(client) accounts = getAccountsBySerial(heSerial) if (#accounts ~= 0) then triggerClientEvent("accountFound",client) else triggerClientEvent("accountNotFound",client) end end function loginProcces (username , password ) if not getAccount(username) then triggerClientEvent(client,"clientResponse",client,1 , "INVALID USERNAME") return end if not getAccount(username,password) then triggerClientEvent(client,"clientResponse",client,2,"INVALID PASSWORD,") return end logIn(client,getAccount(username),password) triggerClientEvent(client,"clientResponse",client,3) end function registerProcces(username, password, email) if getAccount(username) then triggerClientEvent(client,"clientResponse",client,4,"THERE IS ANOTHER ACCOUNT WITH THIS NAME TRY SOMETHING NEW ") return end addAccount(username,password) logIn(client,getAccount(username),password) setAccountData (getAccount(username),heSerial,password) setAccountData (getAccount(username),email,username) triggerClientEvent(client,"clientResponse",client,3) end addEventHandler("checkAccounts",getRootElement(),checkingAccounts) addEventHandler("playerLogins",getRootElement(),loginProcces) addEventHandler("playerRegisters",getRootElement(),registerProcces) I quoted my full code to my post. by the way thank you for trying to help me I quoted my full code to my post. by the way thank you for trying to help me and im also new posting things in forums next time i will put a better name
  14. ZkillCatIV

    [HELP]

    Im somewhat new in scripting, i was making a login panel and the login panel is working and i can login and register but the only problem i have is that when i get join and i'm on the login panel and somebody else joins and is on the panel and mess with it my panel also changes,it acts like the login panel was in the server instead of just the player that joins. to be honest i don't really understand the localPlayer and the root and the getRootElement() and all of that but i have a feeling that that is what is going wrong on my script please help me
×
×
  • Create New...