Adham Posted April 2, 2016 Share Posted April 2, 2016 سلام عليكم اليوم انا عامل مود سجن وعاملو علي قريد لست ب اوقات عاوز اليضعط علي قريد لست اسمو 1 hours بعد كدا يضعط علي بيتون اسمه Jail Player يخش اللاعب السجن علي حسب المده المتحدده. Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 وعليكم السلامم ~ 'onClientGUIClick' guiGridListGetSelectedItem -- نسوي لوكال بعدين نتحقق انه حدد داخل الجريد ليست guiGridListGetItemData -- ناخذ اللاعب setElementPosition -- وديه السجن setTimer -- اذا تبيها ساعه اعمل 216000000 setElementPosition -- حدد المكان الي بيروحلو اذا خلص الوقت -- اذا تبيه تاخذ احداثياته للمكان الي كان فيه getElementPosition Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 سري فهمتك غلط الفنكشنات -- سوي لوب كذا JP = { { "1 Hours" , 216000000 }, { "2 Hours" , 432000000 } } -- وسوي لوب للاعبين 'onClientGUIClick' guiGridListGetSelectedItem -- نسوي لوكال بعدين نتحقق انه حدد داخل الجريد ليست guiGridListGetItemData -- ناخذ الوقت setElementPosition -- نوديه السجن setTimer -- نحط الوقت setElementPosition -- نرجعه اذا خلص الوقت قصدي انا شرحت غلط Link to comment
Adham Posted April 3, 2016 Author Share Posted April 3, 2016 (edited) addEventHandler("onClientGUIClick",resourceRoot, function ( P ) if ( source == GUIEditor.button[1] ) then setElementPosition ( source, 2122.21338, 2243.54175, 10.67188 ) setTimer ( P, 1000, 1, ) setElementPosition ( source, 2122.21818, 53121, 10.5141 ) end end) مش عارف احط القريد لست وا لداتا JP = { {'1','minutes'}, {'2','mintes'}, {'3','mintes'}, {'5','mintes'}, {'10','mintes'}, {'15','mintes'}, {'20','mintes'}, {'30','mintes'}, {'40','mintes'}, {'1','hours'}, {'2','hours'}, {'3','hours'}, {'4','hours'}, {'5','hours'}, {'24','hours'} } Edited April 3, 2016 by Guest Link to comment
Abdul KariM Posted April 3, 2016 Share Posted April 3, 2016 من جدك ؟ اكثر من موضوع اشوفك تحط اكواد للقريد ليست والحين تقول ماعرف للقريد ليست والداتا ؟ + كودك خطأ في كود تغيير المكان حاط لي سورس , يعني تبي تغير مكان الزر ؟ ماراح تضبط اول خطأ p ثاني شي , من وين جبت تصرفها على كيفك <> حاول زين وبساعدك , لاتستعجل Link to comment
Adham Posted April 3, 2016 Author Share Posted April 3, 2016 طيب انا عملت فكشن p عشان settimer Link to comment
Adham Posted April 3, 2016 Author Share Posted April 3, 2016 <@> addEventHandler("onClientGUIClick",resourceRoot, function ( ) if ( source == GUIEditor.button[1] ) then local sel = guiGridListGetSelectedItem(grid) local text = guiGridListGetItemText(grid,sel,1) setElementPosition ( 2122.21338, 2243.54175, 10.67188 ) setTimer ( 1000, 1 ) setElementPosition ( 2122.21818, 53121, 10.5141 ) end end) Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) 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 getElementType(player) == "player" then setTimer ( Jail , Mk ) end end) اذا ما زبط اطرح الكلينت كامل ازبطه Link to comment
Adham Posted April 3, 2016 Author Share Posted April 3, 2016 GUIEditor = { gridlist = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(174, 155, 422, 335, "jail", false) guiWindowSetSizable(wnd, false) GUIEditor.gridlist[1] = guiCreateGridList(13, 32, 310, 196, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "ID", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "Time", 0.5) GUIEditor.button[1] = guiCreateButton(60, 232, 273, 38, "Jail Player", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) -- 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) -- addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) 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 getElementType(player) == "player" then setTimer ( Jail , Mk ) end end) ----- Link to comment
Adham Posted April 3, 2016 Author Share Posted April 3, 2016 GUIEditor = { gridlist = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(174, 155, 422, 335, "jail", false) guiWindowSetSizable(wnd, false) GUIEditor.gridlist[1] = guiCreateGridList(13, 32, 310, 196, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "ID", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "Time", 0.5) GUIEditor.button[1] = guiCreateButton(60, 232, 273, 38, "Jail Player", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) -- 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) -- addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) 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 getElementType(player) == "player" then setTimer ( Jail , Mk ) end end) ----- Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 سوي لوحة جديده وضيف ثنين جريد ليست جريد ليست فيه اسامي لاعبين وجريد ليست يحدد وقت الجيل وزر تحدد الجيل علطول ؟؟ كيف بالله عليك ؟ Link to comment
Sylence Posted April 3, 2016 Share Posted April 3, 2016 JP = { {'1','minutes'}, {'2','mintes'}, {'3','mintes'}, {'5','mintes'}, {'10','mintes'}, {'15','mintes'}, {'20','mintes'}, {'30','mintes'}, {'40','mintes'}, {'1','hours'}, {'2','hours'}, {'3','hours'}, {'4','hours'}, {'5','hours'}, {'24','hours'} } GUIEditor = { gridlist = {}, button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(174, 155, 422, 335, "jail", false) guiWindowSetSizable(wnd, false) GUIEditor.gridlist[1] = guiCreateGridList(13, 32, 310, 196, false, wnd) guiGridListAddColumn(GUIEditor.gridlist[1], "ID", 0.5) guiGridListAddColumn(GUIEditor.gridlist[1], "Time", 0.5) GUIEditor.button[1] = guiCreateButton(60, 232, 273, 38, "Jail Player", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) -- 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) end -- addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) 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 getElementType(player) == "player" then setTimer ( Jail , Mk ) end end) ----- انا لعبه + اهي اللوحه القلتلي عليها + حسابي نسيت الباص Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 خخخخخخخخخخخ ^ منه مسوي لوب للاعبين كيف بيسوي جيل بالله عليك ركز زين نحتاج جريد ليست اثنين الكود حقي خطأ فلازم ثنين جريد ليست ,, Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 سوي لوحة جديده فيها ثنين جريد ليست وزر واستنبط الكود حقي وسوي مثله Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 يخي جريد ليست فيه اسماء لاعبين منشان تحدد لاعب وتعطيه جيل وجريد ليست فيه اوقات الجيل Link to comment
Sylence Posted April 3, 2016 Share Posted April 3, 2016 gUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(93, 111, 643, 423, "#@#", false) guiWindowSetSizable(wnd, false) grid = guiCreateGridList(22, 71, 480, 300, false, wnd) guiGridListAddColumn(grid, "Time", 0.5) guiGridListAddColumn(grid, "Name", 0.5) GUIEditor.button[1] = guiCreateButton(159, 375, 271, 38, "Jal", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) -- 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) end -- addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) 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 getElementType(player) == "player" then setTimer ( Jail , Mk ) end end) ----- Link to comment
iMr.WiFi..! Posted April 3, 2016 Share Posted April 3, 2016 مشاءالله عبقري .. اقلك سوي جريد ليست تاني مو كلومن ثاني Link to comment
Sylence Posted April 3, 2016 Share Posted April 3, 2016 GUIEditor = { button = {} } addEventHandler("onClientResourceStart", resourceRoot, function() wnd = guiCreateWindow(121, 135, 525, 333, "#", false) guiWindowSetSizable(wnd, false) grid = guiCreateGridList(12, 55, 227, 268, false, wnd) guiGridListAddColumn(grid, "ID", 0.5) guiGridListAddColumn(grid, "Time", 0.5) grid2 = guiCreateGridList(259, 55, 227, 268, false, wnd) guiGridListAddColumn(grid2, "Name", 0.9) GUIEditor.button[1] = guiCreateButton(116, 26, 238, 24, "Jail", false, wnd) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") end ) -- 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) end -- addEventHandler("onClientGUIClick", GUIEditor.button[1], function ( ) local sel = guiGridListGetSelectedItem(grid) 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 getElementType(player) == "player" then setTimer ( Jail , Mk ) end end) ----- Link to comment
MrSAUD1 Posted April 3, 2016 Share Posted April 3, 2016 استخدم getPlayerFromName علشان تعرف اسم الاعب و يكون هو المصدر Link to comment
iMr.WiFi..! 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
Sylence Posted April 3, 2016 Share Posted April 3, 2016 مشكور اخوي طيب عاوز كود انا عامل بيتون اسمه unJailPlayer عاوز اليضعط عليه يتفك سجنه 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