Maksoud Posted April 3, 2016 Share Posted April 3, 2016 واخيراً ^^ -- ضيف ذذ لوب JP = { {"1",'minutes',60000}, {"2",'mintes',120000}, {"3",'mintes',180000}, {"5",'mintes',3000000}, {"10",'mintes',600000}, {"15",'mintes',900000}, {"20",'mintes',1200000}, {"30",'mintes',1800000}, {"40",'mintes',2400000}, {"1",'hours',3600000}, {"2",'hours',7200000}, {"3",'hours',10800000}, {"4",'hours',14400000}, {"5",'hours',18000000}, {"24",'hours',86400000} } changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { button = {} } wnd = guiCreateWindow(121, 135, 525, 333, "#", false) guiWindowSetSizable(wnd, false) grid = guiCreateGridList(12, 55, 227, 268, false, wnd) col1 = guiGridListAddColumn(grid, "ID", 0.5) col2 = guiGridListAddColumn(grid, "Time", 0.5) grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) col3 = guiGridListAddColumn(grid2, "Name", 0.9) changeGridListItemToPlayersName ( grid2, col3) GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible (wnd, false) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("m", "down", OpenWin) for _, v in ipairs (JP) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) guiGridListSetItemData(grid, Row,1, v[3], false, false) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) local sel2 = guiGridListGetSelectedItem(grid2) local Jail = unpack(guiGridListGetItemData ( grid,sel,1 )) local Mk = setElementPosition ( 2122.21818, 53121, 10.5141 ) setElementPosition ( 2122.21338, 2243.54175, 10.67188 ) if sel ~= -1 and sel2 ~= -1 and getElementType(player) == "player" then setTimer ( Jail , Mk ) end end) اتمنى تكون انك فاهم كل شيء ^^ انشالله بتستفيد يا اخى من وين تفهم انت ؟ انا ناسخ الكود بظبط و ما ظبط و اقولك ابى توضيح للخطأ و تصليحه تجيبلى نفس الكود الانا ابى توضيحه و تصليحه ؟؟ Link to comment
Abdul KariM Posted April 3, 2016 Share Posted April 3, 2016 # Client changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { button = {} } wnd = guiCreateWindow(121, 135, 525, 333, "#", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd , false ) grid = guiCreateGridList(12, 55, 227, 268, false, wnd) grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) col3 = guiGridListAddColumn(grid, "Name", 0.9) changeGridListItemToPlayersName ( grid, col3) guiGridListAddColumn(grid2, "Time", 0.9) GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") function OpenWin( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) showCursor ( not isCursorShowing ( ) ) end bindKey ( "m", "down", OpenWin ) JP = { { "1 Min",60000 }, { "2 Min", 120000 }, } for k , v in ipairs ( JP ) do local Row = guiGridListAddRow ( grid2 ) guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); guiGridListSetItemData ( grid2 , Row , 1, v[2] ) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local Sel = guiGridListGetSelectedItem ( grid ) local Sel2 = guiGridListGetSelectedItem ( grid2 ) if Sel ~= -1 and Sel2 ~= -1 then local Player = guiGridListGetItemText ( grid, Sel, 1 ) local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) end end,false ) ; # Server table = { } addEvent("Jail_Player",true) addEventHandler("Jail_Player",root, function ( Player , Time ) local ThePlayer = getPlayerFromName ( Player ) if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) end ) ; بالتوفيق Link to comment
Abdul KariM Posted April 3, 2016 Share Posted April 3, 2016 ما ظبط انا مجربه وشغال <> وش يطلع لك بالدي بوق ؟ debugscript 3 + اطرح الميتا Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 (edited) JP = { {"1",'minutes',60000}, {"2",'mintes',120000}, {"3",'mintes',180000}, {"5",'mintes',3000000}, {"10",'mintes',600000}, {"15",'mintes',900000}, {"20",'mintes',1200000}, {"30",'mintes',1800000}, {"40",'mintes',2400000}, {"1",'hours',3600000}, {"2",'hours',7200000}, {"3",'hours',10800000}, {"4",'hours',14400000}, {"5",'hours',18000000}, {"24",'hours',86400000} } changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { button = {} } wnd = guiCreateWindow(121, 135, 525, 333, "#", false) guiWindowSetSizable(wnd, false) grid = guiCreateGridList(12, 55, 227, 268, false, wnd) col1 = guiGridListAddColumn(grid, "ID", 0.5) col2 = guiGridListAddColumn(grid, "Time", 0.5) grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) col3 = guiGridListAddColumn(grid2, "Name", 0.9) changeGridListItemToPlayersName ( grid2, col3) GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible (wnd, false) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("m", "down", OpenWin) for _, v in ipairs (JP) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) guiGridListSetItemData(grid, Row,1, v[3], false, false) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) local sel2 = guiGridListGetSelectedItem(grid2) local Jail = (guiGridListGetItemData ( grid,sel,1 )) local Player = guiGridListGetItemText ( grid, Sel, 1 ) setElementPosition ( 2122.21338, 2243.54175, 10.67188 ) if sel ~= -1 and sel2 ~= -1 then setTimer ( Jail , setElementPosition ( 2122.21818, 53121, 10.5141 ) ) end end) فنكشنات بتحتاجه عشان تحفظ الجيل حق اللاعب getElementPosition setElementPosition setAccountData getAccountData Edit "* Edited April 3, 2016 by Guest Link to comment
Abdul KariM Posted April 3, 2016 Share Posted April 3, 2016 JP = { {"1",'minutes',60000}, {"2",'mintes',120000}, {"3",'mintes',180000}, {"5",'mintes',3000000}, {"10",'mintes',600000}, {"15",'mintes',900000}, {"20",'mintes',1200000}, {"30",'mintes',1800000}, {"40",'mintes',2400000}, {"1",'hours',3600000}, {"2",'hours',7200000}, {"3",'hours',10800000}, {"4",'hours',14400000}, {"5",'hours',18000000}, {"24",'hours',86400000} } changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { button = {} } wnd = guiCreateWindow(121, 135, 525, 333, "#", false) guiWindowSetSizable(wnd, false) grid = guiCreateGridList(12, 55, 227, 268, false, wnd) col1 = guiGridListAddColumn(grid, "ID", 0.5) col2 = guiGridListAddColumn(grid, "Time", 0.5) grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) col3 = guiGridListAddColumn(grid2, "Name", 0.9) changeGridListItemToPlayersName ( grid2, col3) GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible (wnd, false) function OpenWin() if guiGetVisible ( wnd ) then guiSetVisible ( wnd, false ) showCursor(false) guiSetInputEnabled(false) else guiSetVisible ( wnd, true ) showCursor(true) guiSetInputEnabled(true) end end bindKey("m", "down", OpenWin) for _, v in ipairs (JP) do local Row = guiGridListAddRow(grid) guiGridListSetItemText(grid, Row, 1, v[1], false, false) guiGridListSetItemText(grid, Row, 2, v[2], false, false) guiGridListSetItemData(grid, Row,1, v[3], false, false) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) local sel2 = guiGridListGetSelectedItem(grid2) local Jail = (guiGridListGetItemData ( grid,sel,1 )) local Player = guiGridListGetItemText ( grid, Sel, 1 ) setElementPosition ( 2122.21338, 2243.54175, 10.67188 ) if sel ~= -1 and sel2 ~= -1 and getElementsByType(player) == "player" then setTimer ( Jail , setElementPosition ( 2122.21818, 53121, 10.5141 ) ) end end) فنكشنات بتحتاجه عشان تحفظ الجيل حق اللاعب getElementPosition setElementPosition setAccountData getAccountData player سطر 84 من وين جبت + كودك فيه اخطاء Link to comment
#|_oskar_|# Posted April 3, 2016 Share Posted April 3, 2016 ياعيني صار صاحب الموضوع يساعد بموضوعه + كودك ياواي فااى هريسه Link to comment
Mr.CoR Posted April 4, 2016 Share Posted April 4, 2016 المشكلة ان الاثنين ماهم عارفين ايش الاكواد الي جالسين ينسخوها شغلكم نسخ ولصق فقط ، هذا شي مارح يفيدكم لازم تتصفح الويكي وتعرف كل فنكشن ايش الارقيومنت حقه وايش تحط بين الفواصل كذا رح تتعلم برمجه اما نسخ ولصق ما بتستفيد شي ومن رأيي مود السجن كبير عليكم شوي سوو مودات ثانية سهله وبسيطة وتعلمكم كيف تتعاملون مع الجداول والقريد ليست مثل لوحه انتقالات او شوب اسلحه او بقالة موفقين Link to comment
Maksoud Posted April 4, 2016 Share Posted April 4, 2016 طيب انا بدى الكود الصحيح ممكن ؟ Link to comment
Abdul KariM Posted April 4, 2016 Share Posted April 4, 2016 # Client changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { button = {} } wnd = guiCreateWindow(121, 135, 525, 333, "#", false) guiWindowSetSizable(wnd, false) guiSetVisible ( wnd , false ) grid = guiCreateGridList(12, 55, 227, 268, false, wnd) grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) col3 = guiGridListAddColumn(grid, "Name", 0.9) changeGridListItemToPlayersName ( grid, col3) guiGridListAddColumn(grid2, "Time", 0.9) GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") function OpenWin( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) showCursor ( not isCursorShowing ( ) ) end bindKey ( "m", "down", OpenWin ) JP = { { "1 Min",60000 }, { "2 Min", 120000 }, } for k , v in ipairs ( JP ) do local Row = guiGridListAddRow ( grid2 ) guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); guiGridListSetItemData ( grid2 , Row , 1, v[2] ) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local Sel = guiGridListGetSelectedItem ( grid ) local Sel2 = guiGridListGetSelectedItem ( grid2 ) if Sel ~= -1 and Sel2 ~= -1 then local Player = guiGridListGetItemText ( grid, Sel, 1 ) local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) end end,false ) ; # Server table = { } addEvent("Jail_Player",true) addEventHandler("Jail_Player",root, function ( Player , Time ) local ThePlayer = getPlayerFromName ( Player ) if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) end ) ; بالتوفيق Link to comment
Adham Posted April 4, 2016 Author Share Posted April 4, 2016 شو المشكله طيب؟ ما تظهر الوقت في القري لست changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { gridlist = {}, button = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd ,false) GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) guiGridListAddColumn(grid2, "Time", 0.9) grid = guiCreateGridList(9, 21, 278, 271, false, wnd) col3 = guiGridListAddColumn(grid, "Name", 0.9) end ) function OpenWin( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) showCursor ( not isCursorShowing ( ) ) end bindKey ( "x", "down", OpenWin ) JP = { { "1 Min",60000 }, { "2 Min", 120000 }, { "3 Min", 180000 }, { "4 Min", 3000000 }, { "5 Min", 120000 }, { "6 Min", 600000 }, { "6 Min", 900000 }, { "6 Min", 1200000 }, { "6 Min", 1800000 }, { "6 Min", 2400000 }, } for k , v in ipairs ( JP ) do local Row = guiGridListAddRow ( grid2 ) guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); guiGridListSetItemData ( grid2 , Row , 1, v[2] ) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local Sel = guiGridListGetSelectedItem ( grid ) local Sel2 = guiGridListGetSelectedItem ( grid2 ) if Sel ~= -1 and Sel2 ~= -1 then local Player = guiGridListGetItemText ( grid,2 Sel, 1 ) local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) end end,false ) ; addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then guiSetVisible(wnd,false) showCursor(false) end end ) سرفر table = { } addEvent("Jail_Player",true) addEventHandler("Jail_Player",root, function ( Player , Time ) local ThePlayer = getPlayerFromName ( Player ) if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) end ) ; Link to comment
Abdul KariM Posted April 4, 2016 Share Posted April 4, 2016 شو المشكله طيب؟ما تظهر الوقت في القري لست changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { gridlist = {}, button = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd ,false) GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) guiGridListAddColumn(grid2, "Time", 0.9) grid = guiCreateGridList(9, 21, 278, 271, false, wnd) col3 = guiGridListAddColumn(grid, "Name", 0.9) end ) function OpenWin( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) showCursor ( not isCursorShowing ( ) ) end bindKey ( "x", "down", OpenWin ) JP = { { "1 Min",60000 }, { "2 Min", 120000 }, { "3 Min", 180000 }, { "4 Min", 3000000 }, { "5 Min", 120000 }, { "6 Min", 600000 }, { "6 Min", 900000 }, { "6 Min", 1200000 }, { "6 Min", 1800000 }, { "6 Min", 2400000 }, } for k , v in ipairs ( JP ) do local Row = guiGridListAddRow ( grid2 ) guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); guiGridListSetItemData ( grid2 , Row , 1, v[2] ) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local Sel = guiGridListGetSelectedItem ( grid ) local Sel2 = guiGridListGetSelectedItem ( grid2 ) if Sel ~= -1 and Sel2 ~= -1 then local Player = guiGridListGetItemText ( grid,2 Sel, 1 ) local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) end end,false ) ; addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then guiSetVisible(wnd,false) showCursor(false) end end ) سرفر table = { } addEvent("Jail_Player",true) addEventHandler("Jail_Player",root, function ( Player , Time ) local ThePlayer = getPlayerFromName ( Player ) if isTimer ( table[ ThePlayer ] ) then return outputChatBox ("الاعب مسجون",source,255,255,255,true) end setElementPosition ( ThePlayer , 2122.21818, 53121, 10.5141 ) table[ ThePlayer ] = setTimer ( setElementPosition , Time , 1 , ThePlayer , 2122.21338 , 2243.54175 , 10.67188 ) end ) ; ايش الي دخلت بالموضوع ؟ Link to comment
Abdul KariM Posted April 4, 2016 Share Posted April 4, 2016 مش فاهم انا اقول وش دخلك بالموضوع ؟ انت صاحب الموضوع بحساب ثاني ولا وش يعني ؟ Link to comment
Adham Posted April 4, 2016 Author Share Posted April 4, 2016 + انا Sylnce العططيلكم كود اللوحه ^ Link to comment
MrSAUD1 Posted April 4, 2016 Share Posted April 4, 2016 اكثر من مره قلتها , اكيد ما راح يظهر في القريد ليست لنك مسوي القريد ليست في وضيفة , و انت حاط الجدول خارج الوضيفة و كذا يعتبر القريد ليست مو معرف فـ امسح حدث عند تشغيل المود و الوضيفة للوحة او ضيف الجدول فيها changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { gridlist = {}, button = {}, label = {} } wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd ,false) GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) guiGridListAddColumn(grid2, "Time", 0.9) grid = guiCreateGridList(9, 21, 278, 271, false, wnd) col3 = guiGridListAddColumn(grid, "Name", 0.9) function OpenWin( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) showCursor ( not isCursorShowing ( ) ) end bindKey ( "x", "down", OpenWin ) JP = { { "1 Min",60000 }, { "2 Min", 120000 }, { "3 Min", 180000 }, { "4 Min", 3000000 }, { "5 Min", 120000 }, { "6 Min", 600000 }, { "6 Min", 900000 }, { "6 Min", 1200000 }, { "6 Min", 1800000 }, { "6 Min", 2400000 }, } for k , v in ipairs ( JP ) do local Row = guiGridListAddRow ( grid2 ) guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); guiGridListSetItemData ( grid2 , Row , 1, v[2] ) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local Sel = guiGridListGetSelectedItem ( grid ) local Sel2 = guiGridListGetSelectedItem ( grid2 ) if Sel ~= -1 and Sel2 ~= -1 then local Player = guiGridListGetItemText ( grid,2 Sel, 1 ) local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) end end,false ) ; addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then guiSetVisible(wnd,false) showCursor(false) end end ) Link to comment
Abdul KariM Posted April 4, 2016 Share Posted April 4, 2016 changeGridListItemToPlayersName = function ( GridList, Column ) if GridList and Column then -- Check Parematers if getElementType ( GridList ) == "gui-gridlist" then -- Check The Type of ' GridList ' if guiGridListClear ( GridList ) then -- Clear GridList for i, v in next, getElementsByType ( "player" ) do -- Get Everything by Type ' player ' local Row = guiGridListAddRow ( GridList ) -- Add Row guiGridListSetItemText ( GridList, Row, Column, getPlayerName ( v ), false, false ); -- Set New Values end; -- end of ' for ' end; -- end of ' clear gridlist ' end; -- end of ' check gridlist type ' end; -- end of ' check parematers end; GUIEditor = { gridlist = {}, button = {}, label = {} } wnd = guiCreateWindow(121, 88, 567, 414, ":: Jail Systeam ::", false) guiWindowSetSizable(wnd, false) guiSetVisible(wnd ,false) GUIEditor.button[1] = guiCreateButton(100, 302, 355, 35, "Jail Player", false, wnd) GUIEditor.button[2] = guiCreateButton(100, 347, 355, 35, "X", false, wnd) GUIEditor.label[1] = guiCreateLabel(397, 389, 164, 25, "Created By [L]e3bA | v4.3.1", false, wnd) guiLabelSetColor(GUIEditor.label[1], 255, 0, 0) grid2 = guiCreateGridList(291, 21, 242, 271, false, wnd) guiGridListAddColumn(grid2, "Time", 0.9) grid = guiCreateGridList(9, 21, 278, 271, false, wnd) col3 = guiGridListAddColumn(grid, "Name", 0.9) changeGridListItemToPlayersName ( grid , col3 ) function OpenWin( ) guiSetVisible ( wnd , not guiGetVisible ( wnd ) ) showCursor ( not isCursorShowing ( ) ) end bindKey ( "x", "down", OpenWin ) JP = { { "1 Min",60000 }, { "2 Min", 120000 }, { "3 Min", 180000 }, { "4 Min", 3000000 }, { "5 Min", 120000 }, { "6 Min", 600000 }, { "6 Min", 900000 }, { "6 Min", 1200000 }, { "6 Min", 1800000 }, { "6 Min", 2400000 } } for k , v in ipairs ( JP ) do local Row = guiGridListAddRow ( grid2 ) guiGridListSetItemText ( grid2 ,Row , 1, v[1] , false , false ); guiGridListSetItemData ( grid2 , Row , 1, v[2] ) end addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local Sel = guiGridListGetSelectedItem ( grid ) local Sel2 = guiGridListGetSelectedItem ( grid2 ) if Sel ~= -1 and Sel2 ~= -1 then local Player = guiGridListGetItemText ( grid, Sel, 1 ) local Jail = guiGridListGetItemData ( grid2 , Sel2 , 1 ) triggerServerEvent ( "Jail_Player",localPlayer,Player,Jail ) end end,false ) ; addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.button[2] ) then guiSetVisible(wnd,false) showCursor(false) end 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