#NaMrOo'D Posted June 28, 2017 Share Posted June 28, 2017 (edited) بسم الله الرحمن الرحيم سلام عليكم ورحمة الله وبركاتة بتمنى تساعدوني ي شباب , لاني مبتدا في لبرمجه , حاولت اسوي لوحه واخلي في لوحه يطلع أسماء لاعبين وسويت كلشي بس معي يزبط , أتمنى لو بس احد يزبطلي لكود , ويضيفلي مربع صغير فوق لجير لست يكون مربع بحث عن لاعبين # وشششكرا # أتمنى لمسساعدةه * GUIEditor = { gridlist = {}, window = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(396, 168, 449, 497, "", false) guiWindowSetSizable(wnd,false) gridlist = guiCreateGridList(10, 89, 224, 398, false, wnd) guiGridListAddColumn(gridlist, "Player", 0.9) guiGridListAddRow(gridlist) guiGridListSetItemText(gridlist, 0, 1, "-", false, false) guiSetVisible (wnd,false) guiWindowSetMovable(wnd,false) guiWindowSetSizable(wnd,false) guiSetVisible(wnd,false) showCursor(false) end ) function grid () local playerList = guiCreateGridList( 10, 89, 224, 398, true ) local column = guiGridListAddColumn( playerList, "Player", 0.9 ) if ( column ) then for id, playeritem in ipairs (getElementsByType("player")) do local row = guiGridListAddRow ( playerList ) guiGridListSetItemText ( playerList, row, column, getPlayerName ( playeritem ), false, false ) end end end addEventHandler ("onClientResourceStart", getResourceRootElement(), grid ) bindKey('f3','down', function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(not isCursorShowing()) end ) Edited June 28, 2017 by #Othman Link to comment
iMr.WiFi..! Posted June 28, 2017 Share Posted June 28, 2017 أولاً : القسم خطأ وأتمنى ان ينقل الى قسم البرمجة ثانياً : يرجى وضع الاكواد بالتاق زي ماهو موضح بالموضوع ثالثاً : تـصحيح الكود , GUIEditor = { gridlist = {}, window = {} } wnd = guiCreateWindow(396, 168, 449, 497, "", false) guiWindowSetSizable(wnd,false) gridlist = guiCreateGridList(10, 89, 224, 398, false, wnd) guiGridListAddColumn(gridlist, "Player", 0.9) guiSetVisible (wnd,false) guiWindowSetMovable(wnd,false) guiWindowSetSizable(wnd,false) guiSetVisible(wnd,false) showCursor(false) for id, playeritem in ipairs (getElementsByType("player")) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, getPlayerName ( playeritem ), false, false ) end bindKey('f3','down', function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(not isCursorShowing()) end ) Link to comment
MR.StoRm Posted June 28, 2017 Share Posted June 28, 2017 7 hours ago, iMr.WiFi..! said: أولاً : القسم خطأ وأتمنى ان ينقل الى قسم البرمجة ثانياً : يرجى وضع الاكواد بالتاق زي ماهو موضح بالموضوع ثالثاً : تـصحيح الكود , GUIEditor = { gridlist = {}, window = {} } wnd = guiCreateWindow(396, 168, 449, 497, "", false) guiWindowSetSizable(wnd,false) gridlist = guiCreateGridList(10, 89, 224, 398, false, wnd) guiGridListAddColumn(gridlist, "Player", 0.9) guiSetVisible (wnd,false) guiWindowSetMovable(wnd,false) guiWindowSetSizable(wnd,false) guiSetVisible(wnd,false) showCursor(false) for id, playeritem in ipairs (getElementsByType("player")) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, getPlayerName ( playeritem ), false, false ) end bindKey('f3','down', function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(not isCursorShowing()) end ) المفروض تسوي فانكشن عشان تحطه بكود فتح اللوحة ,@iMr.WiFi..! يصير كذا : , GUIEditor = { gridlist = {}, window = {} } wnd = guiCreateWindow(396, 168, 449, 497, "", false) guiWindowSetSizable(wnd,false) gridlist = guiCreateGridList(10, 89, 224, 398, false, wnd) guiGridListAddColumn(gridlist, "Player", 0.9) guiSetVisible (wnd,false) guiWindowSetMovable(wnd,false) guiWindowSetSizable(wnd,false) guiSetVisible(wnd,false) showCursor(false) function aPlayers_() for id, playeritem in ipairs (getElementsByType("player")) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, getPlayerName ( playeritem ), false, false ) end bindKey('f3','down', function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(not isCursorShowing()) aPlayers_() end ) Link to comment
iMr.WiFi..! Posted June 28, 2017 Share Posted June 28, 2017 5 hours ago, MR.StoRm said: المفروض تسوي فانكشن عشان تحطه بكود فتح اللوحة ,@iMr.WiFi..! يصير كذا : , GUIEditor = { gridlist = {}, window = {} } wnd = guiCreateWindow(396, 168, 449, 497, "", false) guiWindowSetSizable(wnd,false) gridlist = guiCreateGridList(10, 89, 224, 398, false, wnd) guiGridListAddColumn(gridlist, "Player", 0.9) guiSetVisible (wnd,false) guiWindowSetMovable(wnd,false) guiWindowSetSizable(wnd,false) guiSetVisible(wnd,false) showCursor(false) function aPlayers_() for id, playeritem in ipairs (getElementsByType("player")) do local row = guiGridListAddRow ( gridlist ) guiGridListSetItemText ( gridlist, row, 1, getPlayerName ( playeritem ), false, false ) end bindKey('f3','down', function() guiSetVisible(wnd, not guiGetVisible(wnd)) showCursor(not isCursorShowing()) aPlayers_() end ) مو لازم فانكشن لان اول ما يشتغل المود راح يسوي اللوب,, بس اذا يبي احداث يضيفها من عنده مثل تغيير الاسم + خروج اللاعب الخ 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