max-mohammed Posted June 7, 2014 Share Posted June 7, 2014 شباب ان مسوي اكثر من لوحة فيها قريد ليست وماتشتغل انا بعطيكم واحدة تكفى صححوها + وروني الاخطاء بالتفصيل وطريقة التصحيح #Client Side wnd = guiCreateWindow(356, 181, 312, 392, "لوحة الانتقال", false) GUIEditor.label[1] = guiCreateLabel(60, 28, 232, 30, "اختر المكان الذي تريد الانتقال إليه:", false, wnd) gridlist = guiCreateGridList(10, 56, 292, 270, false, wnd) guiGridListAddColumn(gridlist, "الأماكن", 0.9) loacl am = {{"ffs",1000,300,23}} button = guiCreateButton(101, 336, 116, 46, "انتقال", false, wnd) for k,v in ipairs(am) do guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, 0, 1, v[1], false, false) guiGridListSetItemData(gridlist, 0, 1, v[2] and v[3] and v[4]) end guiLabelSetColor(GUIEditor.label[1], 253, 0, 239) guiSetVisible (wnd, false) guiSetProperty(wnd, "CaptionColour", "FF00FCFE") bindKey ("F6", "down" function () if (guiGetVisible(wnd) == false) then guiSetVisible (wnd, true) showCursor (true) else guiSetVisible (wnd, false) showCursor (false) end end) --- function click (button, state, absoluteX, absoluteYe) if (source == button) then if (guiGridListGetSelectedItem (gridlist)) then local name = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), 1) local x,y,z = guiGridListGetItemData (gridlist, guiGridListGetSelectedItem (gridlist), 1) setElementPosition(localPlayer, x, y, z) outputChatBox("لقد انتقلت إلى " ..name, source, 255 , 0, 120, false) end end end addEventHandler ("onClientGUIClick", getRootElement(), click) Link to comment
#Rmad~> Posted June 7, 2014 Share Posted June 7, 2014 صححت الي بكودك بس فيه اخطأ واشياء ناقصة local am = [x,y,z] wnd = guiCreateWindow(356, 181, 312, 392, "لوحة الانتقال", false) guiSetVisible (wnd, false) guiSetProperty(wnd, "CaptionColour", "FF00FCFE") GUIEditor.label[1] = guiCreateLabel(60, 28, 232, 30, "اختر المكان الذي تريد الانتقال إليه:",false,wnd) guiLabelSetColor(GUIEditor.label[1], 253, 0, 239) gridlist = guiCreateGridList(10, 56, 292, 270, false,wnd) guiGridListAddColumn(gridlist, "الأماكن",0.9) button = guiCreateButton(101, 336, 116, 46, "انتقال", false, wnd) for k,v in ipairs(am) do guiGridListClear (gridList) guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist,0,1,v[1],false,false) guiGridListSetItemData(gridlist,0,1,v[2]and v[3] and v[4]) end bindKey ( "F6" , "down" , function () if guiGetVisible ( wnd , true ) then guiSetVisible ( wnd , false ) showCursor ( false ) else guiSetVisible ( wnd , true ) showCursor ( true ) end end ) addEventHandler ("onClientGUIClick",getRootElement(), function () if (source == button) then local row = guiGridListGetSelectedItem(source) if (row ~= -1) then local player = guiGridListGetItemData(gridlist,1) if (player) then setElementPosition(localPlayer,player) outputChatBox("لقد انتقلت إلى "..player.."",source,255,0,120,true) end end end end ) Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 ابو زهره , كودك فيه اخطاء كثير ... بالنسبه لصاحب الموضوع اخطائك كثير ... -- Client Side # wnd = guiCreateWindow(356, 181, 312, 392, 'لوحة الانتقال', false) label = guiCreateLabel(60, 28, 232, 30, 'اختر المكان الذي تريد الانتقال إليه:', false, wnd) button = guiCreateButton(101, 336, 116, 46, 'انتقال', false, wnd) gridlist = guiCreateGridList(10, 56, 292, 270, false, wnd) guiLabelSetColor(label, 253, 0, 239) guiGridListAddColumn(gridlist, 'الأماكن', 0.9) guiSetVisible (wnd, false) guiSetProperty(wnd, 'CaptionColour', 'FF00FCFE') local am = {{'ffs',1000,300,23}} for k,v in ipairs(am) do local row = guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, row, 1, v[1], false, false) guiGridListSetItemData(gridlist, row, 1, { v[2] , v[3] , v[4] } ) end bindKey ('F6', 'down',function () guiSetVisible (wnd, not guiGetVisible ( wnd ) ) showCursor (guiGetVisible ( wnd )) end) function click () if (source == button) then if (guiGridListGetSelectedItem (gridlist)) ~= -1 then local name = guiGridListGetItemText (gridlist, guiGridListGetSelectedItem (gridlist), 1) local position = guiGridListGetItemData (gridlist, guiGridListGetSelectedItem (gridlist), 1) setElementPosition(localPlayer, position[1], position[2], position[3]) outputChatBox('لقد انتقلت إلى ' ..name, source, 255 , 0, 120, false) end end end addEventHandler ('onClientGUIClick', root, click) Link to comment
max-mohammed Posted June 7, 2014 Author Share Posted June 7, 2014 مشكوووور ذبست الكود اشتغل بس ممكن تقول لي وش كانت الاخطاء بالضبط وكيف عدلتها وكيف طريقة تعديلها Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 ! فـ بيكون خطأ GUIEditor مافيه جدول اسمه GUIEditor.label[1] اول خطأ انك كنت حاط متغير اللبل ثانيا خطأ عندك كان سطر 15 و 16 السطر انت حاطه 0 , فـ لو عندك قيمتين كيف تحطهم بسطر واحد؟ , شوف انا كيف سويت ذذ ,{ v[2] , v[3] , v[4] } وهذا خطأ , الاسهل انك تسوي جدول بسيط and ثالث خطأ عندك كان سطر 16 , حطيت (وتجيب قيمهم بإستخدام الاندكس ( رقم القيمه Link to comment
max-mohammed Posted June 7, 2014 Author Share Posted June 7, 2014 الله يعطيك الف الف عافية ذبست ومشكور اعلى الاخطاء كفوو Link to comment
فاّرس Posted June 7, 2014 Share Posted June 7, 2014 الله يعافيك , حياك الله بأي وقت ... كفوك يالذيب 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