hassan.k.s.a Posted July 21, 2012 Share Posted July 21, 2012 (edited) * Edited March 25, 2013 by Guest Link to comment
Tete omar Posted July 21, 2012 Share Posted July 21, 2012 قصدك يطلع الماوس ؟ الي يضغط على الأزرار؟ Link to comment
Tete omar Posted July 21, 2012 Share Posted July 21, 2012 جرب هذا bindKey ( "F2" , "down" , function() if ( guiGetVisible ( GUIEditor_Window[1] ) == true ) then guiSetVisible ( GUIEditor_Window[1] ,false ) showCursor (true) guiSetInputEnabled(false) elseif ( guiGetVisible ( GUIEditor_Window[1] ) == false ) then guiSetVisible ( GUIEditor_Window[1] ,true ) showCursor (false) guiSetInputEnabled(true) playSound("tt.wav") end end ) Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 نفس المشكله يالحبيب المشكله اول ماشغل المود يطلع السهم علشان كيذا ماقدر امشي انا ابغاه مايطلع السهم توضيح لو شغلت المود يطلع السهم وماقدر اتحرك اقدر اتحرك في حاله وحده لما افتحها النافذه واسكرها Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 االمشكله بضبط هنا في شي لازم احط فيه اسم النافذه يمكن مادري انت شوف هنا الخطأ اسم النافذه والتاب موجودين في الكود الي فوق guiSetVisible(tab5, false) local localPlayer = getLocalPlayer() function receiveVars( allow, name) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") if (name == "false") then guiSetVisible(LblRegisterName, false) guiSetVisible(EditRegisterName, false) end if (allow == "false") then guiDeleteTab(TabRegister, TabPanel) end guiSetSelectedTab(TabPanel, TabLogin) guiSetText(LoginUsername, playername) guiSetText(EditRegisterUsername, playername) guiSetVisible(tab5, true) guiBringToFront(tab5) guiSetInputEnabled(true) showCursor(true) end addEvent( "onSendVars", true ) addEventHandler( "onSendVars", getRootElement(), receiveVars ) function windowHandler() triggerServerEvent("onNeedVars", getLocalPlayer()) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler) function onClickBtn(button, state) if(button == "left" and state == "up") then if(source == BtnAction) then if(guiGetSelectedTab(TabPanel) == TabLogin) then triggerServerEvent("on4XLogin", getRootElement(), localPlayer, guiGetText(LoginUsername), guiGetText(LoginPassword)) else triggerServerEvent("on4XRegister", getRootElement(), localPlayer, guiGetText(EditRegisterUsername), guiGetText(EditRegisterPassword), guiGetText(EditRegisterName)) end end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(LoginWin, false) end addEvent("hideLoginWindow", true) addEventHandler("onClientGUIClick", BtnAction, onClickBtn, false) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 انت شغل الكلاينت عندك ولاتضغط اف2 تشوف انك ماتقدر تمشي لازم تضغط اف2 وتسكرها بعدين تمشي ض1 انا ابيه مايطلع السهم اول ماشغله Link to comment
3NAD Posted July 21, 2012 Share Posted July 21, 2012 ججربت الكلنت والسهم مخفي .. إلآ إذا ضغطت أف2 يظظهر Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 اما &___% انا عندي مو شغال على العموم بحذفه من المود خلاص حبيبي مو مهم وآسف تعبتك Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 طيب ممكن كود ابغى مربع يكون في النافذه هاذا المربع يكون فيه صورة الاعب مثل البيس مود اول مايدخل الواحد يجيك نافذه وسطها الاعب يختار شخصيه انا ابغى الكود هاذا *___% Link to comment
top sniper Posted July 21, 2012 Share Posted July 21, 2012 طيب ممكن كودابغى مربع يكون في النافذه هاذا المربع يكون فيه صورة الاعب مثل البيس مود اول مايدخل الواحد يجيك نافذه وسطها الاعب يختار شخصيه انا ابغى الكود هاذا *___% اخر سطر بالسكرت خلة يكون showCursor (false) Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 مانفع اخوي اترك سالفته ... ابغى الكود اذا كنت تعرفه Link to comment
3NAD Posted July 21, 2012 Share Posted July 21, 2012 طيب ممكن كودابغى مربع يكون في النافذه هاذا المربع يكون فيه صورة الاعب مثل البيس مود اول مايدخل الواحد يجيك نافذه وسطها الاعب يختار شخصيه انا ابغى الكود هاذا *___% مآ تصصصير متحركة مثل البيس مود لأنهـآ بـ وسسط نآفذة لككن تقدر عن طريق الصور الثابته و أزرار إخفاء الصورة السابقة + إظهار الصورة التالية Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 طيب اخوي ممكن اكواد الويكي ؟@ او مثال ومثل ماقلت بوسط النافذه عادي مافيه مشكله Link to comment
hassan.k.s.a Posted July 21, 2012 Author Share Posted July 21, 2012 هههههه حل المشكله انه ناقص GUIEditor_Button = {} Link to comment
Tete omar Posted July 22, 2012 Share Posted July 22, 2012 GUIEditor_Button = {} مو لازم تحطه لآن هذا عباره عن Table ممكن تسوي زي كذا myButton = createButton الخ الخ .. وتمسح GUIEditor_button = {} مثلاً sl6an = guiCreateButton(17,140,121,42,"اكتب اي شي هنا",false,myWindow) بالنسبة ل myWindow هذي مثل الزر يعني مو لازم GUIEditor_window = {} على طول مثل الزر myWindow = guiCreateWindow( .... الخ ) Link to comment
Hoka1234 Posted July 23, 2012 Share Posted July 23, 2012 شوف الكود ده , مش بتاعي بس ممكن مساعده Client x,y = guiGetScreenSize() LoginWin = guiCreateWindow(x/1.37 - 125,y/3 - 100,280,350,"[811] PLAYER PANEL",false) TabPanel = guiCreateTabPanel(0,20,260,152,false,LoginWin) TabLogin = guiCreateTab("Login Here",TabPanel) LblUsername = guiCreateLabel(105,13,70,16,"Username:",false,TabLogin) LoginUsername = guiCreateEdit(46,40,171,21,"",false,TabLogin) LblPassword = guiCreateLabel(105,72,70,16,"Password:",false,TabLogin) LoginPassword = guiCreateEdit(46,98,171,21,"",false,TabLogin) guiEditSetMasked(LoginPassword,true) TabRegister = guiCreateTab("Register here",TabPanel) LblRegisterUsername = guiCreateLabel(10,4,150,16,"Username:",false,TabRegister) EditRegisterUsername = guiCreateEdit(46,22,171,21,"",false,TabRegister) LblRegisterPassword = guiCreateLabel(10,44,150,16,"Password:",false,TabRegister) EditRegisterPassword = guiCreateEdit(46,61,171,21,"",false,TabRegister) guiEditSetMasked(EditRegisterPassword,true) LblRegisterName = guiCreateLabel(10,83,150,16,"Real Name:",false,TabRegister) EditRegisterName = guiCreateEdit(46,100,171,21,"",false,TabRegister) BtnAction = guiCreateButton(0,180,260,25,"Login/Register",false,LoginWin) guiSetVisible(LoginWin, false) local localPlayer = getLocalPlayer() function receiveVars( allow, name) local playername = getPlayerName(localPlayer) guiSetText(LoginUsername, "") guiSetText(EditRegisterUsername, "") if (name == "false") then guiSetVisible(LblRegisterName, false) guiSetVisible(EditRegisterName, false) end if (allow == "false") then guiDeleteTab(TabRegister, TabPanel) end guiSetSelectedTab(TabPanel, TabLogin) guiSetText(LoginUsername, playername) guiSetText(EditRegisterUsername, playername) guiSetVisible(LoginWin, true) guiBringToFront(LoginWin) guiSetInputEnabled(true) showCursor(true) end addEvent( "onSendVars", true ) addEventHandler( "onSendVars", getRootElement(), receiveVars ) function windowHandler() triggerServerEvent("onNeedVars", getLocalPlayer()) end addEventHandler("onClientResourceStart", getResourceRootElement(getThisResource()), windowHandler) function onClickBtn(button, state) if(button == "left" and state == "up") then if(source == BtnAction) then if(guiGetSelectedTab(TabPanel) == TabLogin) then triggerServerEvent("on4XLogin", getRootElement(), localPlayer, guiGetText(LoginUsername), guiGetText(LoginPassword)) else triggerServerEvent("on4XRegister", getRootElement(), localPlayer, guiGetText(EditRegisterUsername), guiGetText(EditRegisterPassword), guiGetText(EditRegisterName)) end end end end function hideLoginWindow() guiSetInputEnabled(false) guiSetVisible(LoginWin, false) showCursor(false) end addEvent("hideLoginWindow", true) addEventHandler("onClientGUIClick", BtnAction, onClickBtn, false) addEventHandler("hideLoginWindow", getRootElement(), hideLoginWindow) -------------------------------------------------------------- Server function on4XLogin ( player, user, pass ) local account = getAccount ( user, pass ) if ( account ~= false ) then if ( not isGuestAccount ( account ) ) then -- For every player that's logged in.... logOut ( player ) -- Log them out. end if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else outputChatBox ( "Wrong username or password!", player, 255, 255, 0 ) -- Output they got the details wrong. end end addEvent( "on4XLogin", true ) addEventHandler( "on4XLogin", getRootElement(), on4XLogin ) function on4XRegister ( player, user, pass, name ) local account = getAccount ( user, pass ) if ( account ~= false ) then if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end else account = addAccount ( user, pass ) setAccountData ( account, "name", name) if (logIn ( player, account, pass ) == true) then triggerClientEvent ( player, "hideLoginWindow", getRootElement()) else outputChatBox ( "Register/Login error!", player, 255, 255, 0 ) -- Output they got the details wrong. end end end addEvent( "on4XRegister", true ) addEventHandler( "on4XRegister", getRootElement(), on4XRegister ) function needVars() local allow_register = get("allow_register") local name_on_register = get("name_on_register") triggerClientEvent(source, "onSendVars", getRootElement(), allow_register, name_on_register) end addEvent("onNeedVars", true) addEventHandler("onNeedVars", getRootElement(), needVars) جربه و عدل فيه و هتوصل للأنت عايزه 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