-
Posts
1,546 -
Joined
-
Last visited
Everything posted by Dimos7
-
--Client setCameraMatrix(-2057.1525878906, 1029.9833984375, 63.992084503174, 0, 0, 0.10) showChat(false) showPlayerHudComponent("all", false) function createLoginWindow() window = exports["dxgui_v1"]:dxCreateWindow(733, 395, 466, 256, "Login Panel", tocolor(60, 199, 234, 255), "default-blod", "Lighter Blue") dxWindowSetMovable(window, false) userl = exports["dxgui_v1"]:dxCreateLabel(15, 49, 71, 24, "Username:", window, tocolor(60, 199, 234, 255), "default-blod", "Lighter Blue") username = guiCreateEdit(91, 47, 258, 26, "", false, window) passl = exports["dxgui_v1"]:dxCreateLabel(15, 110, 71, 24, "Password:", window, tocolor(60, 199, 234, 255), "default-blod", "Lighter Blue") password = guiCreateEdit(91, 108, 258, 26, "", false, window) guiEditSetMasked(password, true) reme = guiCreateCheckBox(79, 167, 126, 15, "Remember me", false , false, window) register = exports["dxgui_v1"]:dxCreateButton(69, 212, 87, 34, "Register", window, tocolor(60, 199, 234, 255), "default-blod", "Lighter Blue") login = exports["dxgui_v1"]:dxCreateButton(226, 212, 87, 34, "Login", window, tocolor(60, 199, 234, 255), "default-blod", "Lighter Blue") guest = exports["dxgui_v1"]dxCreateButton(397, 34, 31, 33, "X", window, tocolor(60, 199, 234, 255), "default-blod", "Lighter Blue") addEventHandler("onClientGUIClick", reme, saveInfo) addEventHandler("onClientDXClick", register, clientSubmitRegister) addEventHandler("onClientDXClick", login, clientSubmitLogin) addEventHandler("onClientDXClick", guest, clietnGuestClick) end function resourceStart() createLoginWindow() if (window ~= nil) then dxSetVisible(window, true) else exports["xp-annunce"]:sentClientMessage("An error has occupied!", localPlayer, 255, 0, 0, true) end showCursor(true) guiSetInputEnabled(true) end function clietnGuestClick(button, state) if button == "left" and state == "up" then dxSetVisible(window, false) showCursor(false) guiSetInputEnabled(false) setCameraTarget(localPlayer) showChat(true) showPlayerHudComponent("all", true) end end function clientSubmitRegister(button, state) if button == "left" and state =="up" then username = guiGetText(username) password = guiGetText(password) if username ~= "" and password ~= "" then triggerServerEvent("submitRegister", root, localPlayer, username, password) else exports["xp-annunce"]:sentClientMessage("Enter username and password!", localPlayer, 255, 0, 0, true) end end end function clientSubmitLogin(button, state) if button == "left" and state == "up" then username = guiGetText(username) password = guiGetText(password) if username ~= "" and password ~= "" then triggerServerEvent("submitLogin", root, localPlayer, username, password) else exports["xp-annunce"]:sentClientMessage("Enter username and password!", localPlayer, 255, 0, 0, true) end end end function saveInfo(button, state) if button == "left" and state == "up" then guiCheckBoxSetSelected(reme, true) username = guiGetText(username) password = guiGetText(password) if username ~= "" and password ~= "" then triggerServerEvent("submitInfo", root, localPlayer, username, password) else exports["xp-annunce"]:sentClientMessage("Enter username and password!", localPlayer, 255, 0, 0, true) end if guiCheckBoxGetSelected(reme) == true then user = getElementData(localPlayer, "username") pass = getElementData(localPlayer, "password") guiSetText(username, user) guiSetText(password, pass) else guiSetText(username, "") guiSetText(password, "") end elseif button =="left" and state == "up" then guiCheckBoxSetSelected(reme, false) end end function hideLoginWindow() dxSetVisible(window, false) showCursor(false) guiSetInputEnabled(false) showChat(true) showPlayerHudComponent("all", true) end addEvent("hideLoginWindow", true) addEventHandler("hideLoginWindow", root, hideLoginWindow) addEventHandler("onClientResourceStart", resourceRoot, resourceStart) --Server function loginHandler(thePlayer, username, password) local account = getAccount(username, password) if account ~= false then if (logIn(thePlayer, account, password) == true) then triggerClientEvent(thePlayer, "hideLoginWindow", root) exports["xp-announce"]:sentClientMessage("INFO: Welcome"..getPlayerName(thePlayer).."you successfully logged in!", thePlayer, 0, 255, 0, true) else exports["xp-announce"]:sentClientMessage("Error please report it to forum", thePlayer, 255, 0, 0, true) end else exports["xp-announce"]:sentClientMessage("Username or password are incorrect!", thePlayer, 255, 0, 0, true) end end function registerHandler(thePlayer, username, password) local account = getAccount(username, password) if account ~= false then exports["xp-announce"]:sentClientMessage("Username is already in exist!", thePlayer, 255, 0, 0, true) else account = addAccount(username, password) exports["xp-announce"]:sentClientMessage("INFO: You successfully registed!", thePlayer, 0, 255, 0, true) end end function reminderHandler(thePlayer, username, password) local account= getAccount(username, password) if account then setElementData(thePlayer, "username", username) setElementData(thePlayer, "password", password) end end addEvent("submitLogin", true) addEvent("submitRegister", true) addEvent("submitInfo", true) addEventHandler("submitLogin", root, loginHandler) addEventHandler("submitRegister", root, reminderHandler) addEventHandler("submitInfo", root, reminderHandler) c_login error line 7 dxWindowSetMovable(a nill value)
-
marker1=createMarker marker2=createMarker Event Name "onCLientMarkerHit" guiSetVisible ofc its a example
-
why you have put only give m4 and not all the weapons you try to make?
-
--client cwm = createMarker( 1983.65601, -2413.86963, 12.54688, "cylinder", 2, 150, 0, 75, 255 ) --this creates the marker GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.2726,0.3275,0.3186,0.4537,"(Weapon Factory)",true) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Memo[1] = guiCreateMemo(151,51,199,46,"On button click you will w\nait for 20 second to create M4",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Memo[2] = guiCreateMemo(151,99,202,46,"On button click you will wait for 20 second to create AK-47",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) GUIEditor_Button[1] = guiCreateButton(16,59,130,41,"100M4 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(15,105,130,41,"100AK-47 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(17,152,130,41,"18 Gernades for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[3] = guiCreateMemo(150,148,202,46,"On button click you will wait for 20 second to create Gernade",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[3],true) GUIEditor_Memo[4] = guiCreateMemo(150,195,202,46,"On button click you will wait for 20 second to create Rifle",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[4],true) GUIEditor_Button[4] = guiCreateButton(17,197,130,41,"75 Rifle for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[5] = guiCreateMemo(150,243,202,46,"On button click you will wait for 20 second to create Sniper",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[5],true) GUIEditor_Button[5] = guiCreateButton(18,246,130,41,"75 Sniper for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[6] = guiCreateMemo(151,290,202,46,"On button click you will wait for 20 second to create UZI",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[6],true) GUIEditor_Button[6] = guiCreateButton(20,293,130,41,"200 UZI for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[7] = guiCreateMemo(150,337,202,46,"On button click you will wait for 20 second to create C.shotgun",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(18,340,130,41,"200 C.shotgun for 150$",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(24,30,324,20,"Regards,(T-RPG)ProMax",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],150,0,150) GUIEditor_Button[11] = guiCreateButton(298,20,55,26,"Close",false,GUIEditor_Window[1]) --creates the GUI function ToggleCWMMenu ( hit ) if ( hit and hit == localPlayer ) then if eventName == "onClientMarkerHit" then guiSetVisible ( GUIEditor_Window[1],true ) showCursor ( true ) showChat ( false ) showPlayerHudComponent("weapon", false) showPlayerHudComponent("radar", false) elseif eventName == "onClientMarkerLeave" then guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showPlayerHudComponent("weapon", true) showPlayerHudComponent("radar", true) -- shows the chat and i don't know what about the hud end end end addEventHandler("onClientMarkerHit",cwm,ToggleCWMMenu) addEventHandler("onClientMarkerLeave",cwm,ToggleCWMMenu) addEventHandler ('onClientGUIClick',GUIEditor_Button[11], -- that was the closing button function ( ) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showPlayerHudComponent("weapon", true) showPlayerHudComponent("radar", true) end,false ) --rest of buttons addEventHandler ('onClientGUIClick',GUIEditor_Button[1], function () guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) triggerServerEvent ("GiveM4",localPlayer) end,false ) --then the second part function drawStaticBar() dxDrawRectangle((sx/2)-270, (sy/2)-22, 540.0, 44.0, tocolor(255,197,0,150), false) dxDrawRectangle((sx/2)-265, (sy/2)-16, 530.0, 33.0, tocolor(0,0,0,250), false) end function drawLoadingBar() if (tonumber(createPercent) >= 100) then removeEventHandler("onClientRender", root, drawStaticBar) removeEventHandler("onClientRender", root, drawLoadingBar) showCursor(false) guiSetInputEnabled(false) else dxDrawRectangle((sx/2)-261, (sy/2)-12, tonumber(createPercent)*5.22, 25.0, tocolor(0,0,235,255), true) end dxDrawBorderedText("Creating... "..tostring(createPercent).."%", (sx/2)-145, (sy/2)-15, (sy/2)-1, (sx/2)-5, tocolor(0,255,0,255),1.0,"bankgothic","left","top",false,false,true) end addEvent("creating",true) addEventHandler("creating",root, function (weaponName) name = tostring(weaponName) if isTimer(createTimer) then killTimer(createTimer) end trainPercent = 0 showCursor(true) guiSetInputEnabled(true) trainTimer = setTimer(function () createPercent = createPercent +1 end, 100, 100) addEventHandler("onClientRender",getRootElement(),drawLoadingBar) addEventHandler("onClientRender",getRootElement(),drawStaticBar) if tonumber(createPercent) == 100 then showPlayerHudComponent("weapon", true) else showPlayerHudComponent("weapon", false) showPlayerHudComponent("radar", false) end end)
-
you mean when its still progress not apear the hud and radar i think so
-
i din't edit the think about progress bar
-
--client cwm = createMarker( 1983.65601, -2413.86963, 12.54688, "cylinder", 2, 150, 0, 75, 255 ) --this creates the marker GUIEditor_Window = {} GUIEditor_Button = {} GUIEditor_Memo = {} GUIEditor_Label = {} GUIEditor_Window[1] = guiCreateWindow(0.2726,0.3275,0.3186,0.4537,"(Weapon Factory)",true) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) guiSetAlpha(GUIEditor_Window[1],1) GUIEditor_Memo[1] = guiCreateMemo(151,51,199,46,"On button click you will w\nait for 20 second to create M4",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[1],true) GUIEditor_Memo[2] = guiCreateMemo(151,99,202,46,"On button click you will wait for 20 second to create AK-47",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[2],true) GUIEditor_Button[1] = guiCreateButton(16,59,130,41,"100M4 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[2] = guiCreateButton(15,105,130,41,"100AK-47 for 150$",false,GUIEditor_Window[1]) GUIEditor_Button[3] = guiCreateButton(17,152,130,41,"18 Gernades for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[3] = guiCreateMemo(150,148,202,46,"On button click you will wait for 20 second to create Gernade",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[3],true) GUIEditor_Memo[4] = guiCreateMemo(150,195,202,46,"On button click you will wait for 20 second to create Rifle",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[4],true) GUIEditor_Button[4] = guiCreateButton(17,197,130,41,"75 Rifle for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[5] = guiCreateMemo(150,243,202,46,"On button click you will wait for 20 second to create Sniper",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[5],true) GUIEditor_Button[5] = guiCreateButton(18,246,130,41,"75 Sniper for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[6] = guiCreateMemo(151,290,202,46,"On button click you will wait for 20 second to create UZI",false,GUIEditor_Window[1]) guiMemoSetReadOnly(GUIEditor_Memo[6],true) GUIEditor_Button[6] = guiCreateButton(20,293,130,41,"200 UZI for 150$",false,GUIEditor_Window[1]) GUIEditor_Memo[7] = guiCreateMemo(150,337,202,46,"On button click you will wait for 20 second to create C.shotgun",false,GUIEditor_Window[1]) GUIEditor_Button[7] = guiCreateButton(18,340,130,41,"200 C.shotgun for 150$",false,GUIEditor_Window[1]) GUIEditor_Label[1] = guiCreateLabel(24,30,324,20,"Regards,(T-RPG)ProMax",false,GUIEditor_Window[1]) guiLabelSetColor(GUIEditor_Label[1],150,0,150) GUIEditor_Button[11] = guiCreateButton(298,20,55,26,"Close",false,GUIEditor_Window[1]) --creates the GUI function ToggleCWMMenu ( hit ) if ( hit and hit == localPlayer ) then if eventName == "onClientMarkerHit" then guiSetVisible ( GUIEditor_Window[1],true ) showCursor ( true ) showChat ( false ) showPlayerHudComponent("weapon", false) showPlayerHudComponent("radar", false) elseif eventName == "onClientMarkerLeave" then guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showPlayerHudComponent("weapon", true) showPlayerHudComponent("radar", true) -- shows the chat and i don't know what about the hud end end end addEventHandler("onClientMarkerHit",cwm,ToggleCWMMenu) addEventHandler("onClientMarkerLeave",cwm,ToggleCWMMenu) addEventHandler ('onClientGUIClick',GUIEditor_Button[11], -- that was the closing button function ( ) guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) showPlayerHudComponent("weapon", true) showPlayerHudComponent("radar", true) end,false ) --rest of buttons addEventHandler ('onClientGUIClick',GUIEditor_Button[1], function () guiSetVisible ( GUIEditor_Window[1],false ) showCursor ( false ) showChat ( true ) triggerServerEvent ("GiveM4",localPlayer) end,false ) --then the second part function drawStaticBar() dxDrawRectangle((sx/2)-270, (sy/2)-22, 540.0, 44.0, tocolor(255,197,0,150), false) dxDrawRectangle((sx/2)-265, (sy/2)-16, 530.0, 33.0, tocolor(0,0,0,250), false) end function drawLoadingBar() if (tonumber(createPercent) >= 100) then removeEventHandler("onClientRender", root, drawStaticBar) removeEventHandler("onClientRender", root, drawLoadingBar) showCursor(false) guiSetInputEnabled(false) else dxDrawRectangle((sx/2)-261, (sy/2)-12, tonumber(createPercent)*5.22, 25.0, tocolor(0,0,235,255), true) end dxDrawBorderedText("Creating... "..tostring(createPercent).."%", (sx/2)-145, (sy/2)-15, (sy/2)-1, (sx/2)-5, tocolor(0,255,0,255),1.0,"bankgothic","left","top",false,false,true) end addEvent("creating",true) addEventHandler("creating",root, function (weaponName) name = tostring(weaponName) if isTimer(createTimer) then killTimer(createTimer) end trainPercent = 0 showCursor(true) guiSetInputEnabled(true) trainTimer = setTimer(function () createPercent = createPercent +1 end, 100, 100) addEventHandler("onClientRender",getRootElement(),drawLoadingBar) addEventHandler("onClientRender",getRootElement(),drawStaticBar) end)
-
So you want when proress bar is counting not has weapon hud and radar? you know exist gui progress bar?
-
you mean not moving the progress bar?
-
showPlayerHudComponent( string component, bool show)
-
i can put a gui edit on a dxCreateWindow?
-
i use mysql module but okay i undersatnd what do you mean
-
Hello guys i want make a faction system and when press create button rank place a database a column and when press the deleted button rank deleted the colunm
-
also i want ask if its possible have a group system and has enough rank and the rank place in databse without earer each other
-
I want in my loginpanel and player name not accepts color like hex colors can help me how i do that?
-
the them is when restart the resource say it connected to databse also teh xampp mysql running so its not that that mysql need put it on admin group acl?
-
the theme is when restart the resource say it connected to databse
-
<meta> <script src="server.lua" type="server"/> <export function="_Query" type="server"/> <export function="_QuerySingle" type="server"/> <export function="_Exec" type="server"/> </meta> local connection = nil addEventHandler("onResourceStart", resourceRoot, function(resource) connection = dbConnect("mysql", "databse=mtarp; host=127.0.0.1; port=3306;", "root", "9852174563") if connection then outputDebugString(getResourceName(resource).. ":connected to database.") return true else outputDebugString(getResourceName(resource).. ":unable to connect to database. Please contact Developer.") return false end end ) function _Query(...) if connection then local query = dbQuery(connection, ...) local result = dbPoll(query, -1) return result else return false end end function _QuerySingle(str, ...) if connection then local result = _Query(str, ...) if type(result) == 'table' then return result[1] end else return false end end function _Exec(str, ...) if connection then local query = dbExec(connection, str, ...) return query else return false end end server line 37 dbExec failed; no databse selected server line 17 dbPoll no database selected
-
yes i put that for when press the login not the register button i have make this way again and worked perfectly
-
function passwordHandler(thePlayer, password, rpassword) local account = getPlayerAccount(thePlayer) if account then if isGuestAccount(account) then outputChatBox("You must be logged in to change password!", thePlayer, 255, 0, 0) return end if password == rpassword then if string.len(password) >= 5 then setAccountPassword(account, password) triggerClientEvent(thePlayer, "hidePasswordWindow", root) else outputChatBox("Your new password must be at least 5 characters long!", thePlayer, 255, 0, 0) end else outputChatBox("Your passwords aren't the same!", thePlayer, 255, 0, 0) end end end function loginHandler(thePlayer, username, password) local account = getAccount(username, password) if account ~= false then if (logIn(thePlayer, account, password) == true) then outputChatBox("You succefuly logged in!", thePlayer, 0, 255, 0) triggerClientEvent(thePlayer, "hideLoginWindow", root) else outputChatBox("An error please report it to forum!", thePlayer, 255, 0, 0) end else outputChatBox("Username or password are incorrect!", thePlayer, 255, 0, 0) end end function registerHandler(thePlayer, username, password) local account = getAccount(username, password) if account ~= false then outputChatBox("This username is already exist!", thePlayer, 255, 0, 0) else account = addAccount(username, password) outputChatBox("You succefuly registered!", thePlayer, 0, 255, 0) if (logIn(thePlayer, account, password) == true) then outputChatBox("You succefuly logged in!", thePlayer, 0, 255, 0) triggerClientEvent(thePlayer, "hideLoginWindow", root) else outputChatBox("An error please report it to forum!", thePlayer, 255, 0, 0) end end end addEvent("submitChangepw", true) addEvent("submitLogin", true) addEvent("submitRegister", true) addEventHandler("submitChangepw", root, passwordHandler) addEventHandler("submitLogin", root, loginHandler) addEventHandler("submitRegister", root, registerHandler) local GUIEditor = { window = { }, label = { }, edit = { }, button= { } } function createPasswordWindow() GUIEditor.window[1] = guiCreateWindow(693, 268, 303, 307, "Change Password", false) guiWindowSetMovable(GUIEditor.window[1], false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.label[1] = guiCreateLabel(7, 75, 289, 24, " New Password:", false, GUIEditor.window[1]) guiLabelSetVerticalAlign(GUIEditor.label[1], "top") guiLabelSetHorizontalAlign(GUIEditor.label[1], "left") guiSetFont(GUIEditor.label[1], "clear-normal") GUIEditor.edit[1] = guiCreateEdit(9, 100, 285, 25, "", false, GUIEditor.window[1]) guiEditSetMasked(GUIEditor.edit[1], true) GUIEditor.label[2] = guiCreateLabel(7, 140, 289, 24, " Repeat Password:", false, GUIEditor.window[1]) guiLabelSetVerticalAlign(GUIEditor.label[2], "top") guiLabelSetHorizontalAlign(GUIEditor.label[2], "left") guiSetFont(GUIEditor.label[2], "clear-normal") GUIEditor.edit[2] = guiCreateEdit(9, 168, 285, 25, "", false, GUIEditor.window[1]) guiEditSetMasked(GUIEditor.edit[2], true) GUIEditor.button[1] = guiCreateButton(9, 254, 143, 53, "Change", false, GUIEditor.window[1]) GUIEditor.button[2] = guiCreateButton(153, 254, 143, 53, "Cancel", false, GUIEditor.window[1]) guiSetVisible(GUIEditor.window[1], false) addEventHandler("onClientGUIClick", GUIEditor.button[1], clientSubmitChangepw, false) addEventHandler("onClientGUIClick", GUIEditor.button[2], hidePasswordWindow, false) end function createLoginWindow() GUIEditor.window[2] = guiCreateWindow(693, 268, 303, 307, "login Panel", false) guiWindowSetMovable(GUIEditor.window[2], false) guiWindowSetSizable(GUIEditor.window[2], false) GUIEditor.label[3] = guiCreateLabel(7, 75, 289, 24, " Username:", false, GUIEditor.window[2]) guiLabelSetVerticalAlign(GUIEditor.label[3], "top") guiLabelSetHorizontalAlign(GUIEditor.label[3], "left") guiSetFont(GUIEditor.label[3], "clear-normal") GUIEditor.edit[3] = guiCreateEdit(9, 100, 285, 25, "", false, GUIEditor.window[2]) GUIEditor.label[4] = guiCreateLabel(7, 140, 289, 24, " Password:", false, GUIEditor.window[2]) guiLabelSetVerticalAlign(GUIEditor.label[4], "top") guiLabelSetHorizontalAlign(GUIEditor.label[4], "left") guiSetFont(GUIEditor.label[4], "clear-normal") GUIEditor.edit[4] = guiCreateEdit(9, 168, 285, 25, "", false, GUIEditor.window[2]) guiEditSetMasked(GUIEditor.edit[4], true) GUIEditor.button[3] = guiCreateButton(9, 254, 143, 53, "Login", false, GUIEditor.window[2]) GUIEditor.button[4] = guiCreateButton(153, 254, 143, 53, "Register", false, GUIEditor.window[2]) addEventHandler("onClientGUIClick", GUIEditor.button[3], clientSubmitLogin, false) addEventHandler("onClientGUIClick", GUIEditor.button[4], clientSubmitRegister, false) end function resourceStart() createLoginWindow() if (GUIEditor.window[2] ~= nil) then guiSetVisible(GUIEditor.window[2], true) else outputChatBox("An error has occupied.") end showCursor(true) guiSetInputEnabled(true) end function changepw() createPasswordWindow() guiSetVisible(GUIEditor.window[1], true) showCursor(true) guiSetInputEnabled(true) end function clientSubmitLogin(button, state) if button == "left" and state == "up" then local username = guiGetText(GUIEditor.edit[3]) local password = guiGetText(GUIEditor.edit[4]) if username ~= "" and password ~= "" then triggerServerEvent("submitLogin", root, localPlayer, username, password) else outputChatBox("Enter username and password.", 255, 0, 0) end end end function clientSubmitRegister(button, state) if button == "left" and state == "up" then local username = guiGetText(GUIEditor.edit[3]) local password = guiGetText(GUIEditor.edit[4]) if username ~= "" and password ~= "" then triggerServerEvent("submitRegister", root, localPlayer, username, password) else outputChatBox("Enter username and password.", 255, 0, 0) end end end function clientSubmitChangepw(button, state) if button == "left" and state == "up" then local password = guiGetText(GUIEditor.edit[1]) local rpassword = guiGetText(GUIEditor.edit[2]) if password ~= "" and rpassword ~= "" then triggerServerEvent("submitChangepw", root, localPlayer, password, rpassword) else outputChatBox("Enter new password and repeat it", 255, 0, 0) end end end function hideLoginWindow() guiSetVisible(GUIEditor.window[2], false) showCursor(false) guiSetInputEnabled(false) end function hidePasswordWindow() guiSetVisible(GUIEditor.window[1], false) showCursor(false) guiSetInputEnabled(false) end addEvent("hideLoginWindow", true) addEvent("hidePasswordWindow", true) addEventHandler("hideLoginWindow", root, hideLoginWindow) addEventHandler("hidePasswordWindow", root, hidePasswordWindow) addEventHandler("onClientResourceStart", resourceRoot, resourceStart) addCommandHandler("changepw", changepw) every time i press register is auto login the account
-
ahah now apear error at line 31 server side execpt elemnt agrument 2 get srting