nony Posted November 10, 2012 Share Posted November 10, 2012 السلام عليكم ورحمه الله وبركاته يا شباب وش الخطأ في كود التسجيل ذا سيرفر function onRegister ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister ) خطأ سطر 10 و 11 Link to comment
TAPL Posted November 10, 2012 Share Posted November 10, 2012 حط كود الترقير الي بالكلينت Link to comment
nony Posted November 10, 2012 Author Share Posted November 10, 2012 الكود لسعد كلنت local localPlayer = getLocalPlayer ( ) function windowHandler( ) local playername = getPlayerName(localPlayer) guiSetText(GUIEditor_Memo[7], "") guiSetText(GUIEditor_Memo[7], playername) guiSetVisible ( GUIEditor_Window[1] ,false ) guiSetInputEnabled(false) showCursor ( false) end function onClickBtn ( button, state ) if (source == GUIEditor_Button[8]) then triggerServerEvent ( "onLogin", getRootElement(), localPlayer, guiGetText(GUIEditor_Memo[7]), guiGetText(GUIEditor_Memo[8]) ) end end function onClickBtn2 ( button, state ) if (source == GUIEditor_Button[10]) then triggerServerEvent ( "onRegister", getRootElement(), localPlayer, guiGetText(GUIEditor_Memo[7]), guiGetText(GUIEditor_Memo[8])) end end function hideLoginWindow() guiSetVisible ( shopWindow ,false ) guiSetInputEnabled(false) showCursor ( false ) end addEvent( "hideLoginWindow", true ) addEventHandler( "hideLoginWindow", getRootElement(), hideLoginWindow ) addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[8], onClickBtn, false ) addEventHandler ( "onClientGUIClick", GUIEditor_Button[10], onClickBtn2, false ) سيرفر function onLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) end else outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) end end addEvent( "onLogin", true ) addEventHandler( "onLogin", getRootElement(), onLogin ) function onRegister ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) end else account = addAccount ( user, pass ) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) end end end addEvent( "onRegister", true ) addEventHandler( "onRegister", getRootElement(), onRegister ) تسجيل الدخول يشتغل %100 الخراب من كود تسجيل حساب جديد Link to comment
TAPL Posted November 10, 2012 Share Posted November 10, 2012 غير الكود ذا triggerClientEvent ( "hideLoginWindow", getRootElement()) إلى triggerClientEvent ( player, "hideLoginWindow", player) و تأكد أن المود مضاف في قروب أدمن Link to comment
nony Posted November 10, 2012 Author Share Posted November 10, 2012 شكراا تابل $ اشتغل 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