w7sH Posted June 14, 2016 Share Posted June 14, 2016 السلام عليكم وش المشكلة هنا؟؟ FontGrid = guiCreateFont( "Font.ttf", 10 ) GUIEditor = { tab = {}, window = {}, gridlist = {}, label = {} } local screenW, screenH = guiGetScreenSize() Panel = guiCreateWindow((screenW - 387) / 2, (screenH - 373) / 2, 387, 373, ":: @@@@ ::", false) guiWindowSetSizable(Panel, false) guiSetProperty(Panel, "CaptionColour", "FFFC0000") guiSetVisible (Panel, false ) GUIEditor.window[1] = guiCreateTabPanel(9, 23, 368, 324, false, Panel) GUIEditor.tab[1] = guiCreateTab("[ Handlings Panel ]", GUIEditor.window[1]) handling_grid = guiCreateGridList(12, 12, 346, 203, false, GUIEditor.tab[1]) handling_column1 = guiGridListAddColumn(handling_grid, "#", 0.5) handling_column = guiGridListAddColumn(handling_grid, "Handlings", 0.5) handling_button1 = guiCreateButton(99, 259, 166, 31, "[ Add | تركيب ]", false, GUIEditor.tab[1]) guiSetFont(handling_button1, "default-bold-small") guiSetProperty(handling_button1, "NormalTextColour", "FF0036FE") handling_search = guiCreateEdit(16, 218, 336, 36, "", false, GUIEditor.tab[1]) HD.wnd = guiCreateTab("[ TopDrift Panel ]", GUIEditor.window[1]) HD.gridlist[1] = guiCreateGridList(10, 10, 348, 280, false, GUIEditor.tab[2]) local column = guiGridListAddColumn(HD.gridlist[1], "Rank", 0.3) local column1 = guiGridListAddColumn(HD.gridlist[1], "Player Name", 0.3) local column2 = guiGridListAddColumn(HD.gridlist[1], "Total Drift, 0.3) GUIEditor.label[1] = guiCreateLabel(10, 348, 137, 15, "@w7sH", false, Panel) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 101, 253, 0) addEventHandler ( "onClientGUIDoubleClick", handling_grid, onGuiClick, false ) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) stationsNames = {} stations = {} guiSetVisible (Panel, false ) function OpenWin() if guiGetVisible (Panel) then guiSetVisible (Panel, false ) guiShowing = false removeEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) showCursor(false) else if (getElementDimension(localPlayer) == 30) then return end guiSetVisible (Panel, true ) addEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, true ) guiSetVisible ( handling_grid, true ) showCursor(true) guiShowing = true end end bindKey ( "F3", "down", OpenWin ) function onStart () triggerServerEvent ("requestForhandling", getLocalPlayer(), getLocalPlayer()) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), onStart) function onJoin (radia, names, st) stationsNames = names stations = st function loadstationsNames ( ) guiGridListClear(handling_grid) for i,ha in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, ha, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEventHandler("onClientGUIChanged",root, function () if ( source == handling_search ) then local text = guiGetText(handling_search) if ( text == "" ) then loadstationsNames ( ) else guiGridListClear(handling_grid) for i,v in ipairs(stationsNames) do local name = tostring(v) if string.find(string.upper(name),string.upper(guiGetText(handling_search))) then local row = guiGridListAddRow(handling_grid) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText(handling_grid,row,handling_column,name,false,false) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,0,255,0) end end end end end ) for i,v in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, v, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEvent ("sendAllhandling", true) addEventHandler ("sendAllhandling", getRootElement(), onJoin) function onStart() fileDelete ( "scriptC.lua" ) fileDelete ( "scriptS.lua" ) end addEventHandler ( "onClientResourceStart", resourceRoot, onStart ) ---------------- for i = 1,30 do local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, "N/A", false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) function() guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) showCursor(guiGetVisible(HD.wnd)) triggerServerEvent("getTop", localPlayer) end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function updateTopList(name, top, i) local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, tostring(name), false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, convertNumber(top), false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end addEvent("updateTop", true) addEventHandler("updateTop", root, updateTopList) function update() guiGridListClear(HD.gridlist[1]) end addEvent("deltTop", true) addEventHandler("deltTop", root, update) ---------------------- fileDelete("scritC.lua") Link to comment
Me[Z]oO Posted June 14, 2016 Share Posted June 14, 2016 FontGrid = guiCreateFont( "Font.ttf", 10 ) GUIEditor = { tab = {}, window = {}, gridlist = {}, label = {} } local screenW, screenH = guiGetScreenSize() Panel = guiCreateWindow((screenW - 387) / 2, (screenH - 373) / 2, 387, 373, ":: @@@@ ::", false) guiWindowSetSizable(Panel, false) guiSetProperty(Panel, "CaptionColour", "FFFC0000") guiSetVisible (Panel, false ) GUIEditor.window[1] = guiCreateTabPanel(9, 23, 368, 324, false, Panel) GUIEditor.tab[1] = guiCreateTab("[ Handlings Panel ]", GUIEditor.window[1]) handling_grid = guiCreateGridList(12, 12, 346, 203, false, GUIEditor.tab[1]) handling_column1 = guiGridListAddColumn(handling_grid, "#", 0.5) handling_column = guiGridListAddColumn(handling_grid, "Handlings", 0.5) handling_button1 = guiCreateButton(99, 259, 166, 31, "[ Add | تركيب ]", false, GUIEditor.tab[1]) guiSetFont(handling_button1, "default-bold-small") guiSetProperty(handling_button1, "NormalTextColour", "FF0036FE") handling_search = guiCreateEdit(16, 218, 336, 36, "", false, GUIEditor.tab[1]) HD.wnd = guiCreateTab("[ TopDrift Panel ]", GUIEditor.window[1]) HD.gridlist[1] = guiCreateGridList(10, 10, 348, 280, false, GUIEditor.tab[2]) local column = guiGridListAddColumn(HD.gridlist[1], "Rank", 0.3) local column1 = guiGridListAddColumn(HD.gridlist[1], "Player Name", 0.3) local column2 = guiGridListAddColumn(HD.gridlist[1], "Total Drift", 0.3) GUIEditor.label[1] = guiCreateLabel(10, 348, 137, 15, "@w7sH", false, Panel) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 101, 253, 0) addEventHandler ( "onClientGUIDoubleClick", handling_grid, onGuiClick, false ) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) stationsNames = {} stations = {} guiSetVisible (Panel, false ) function OpenWin() if guiGetVisible (Panel) then guiSetVisible (Panel, false ) guiShowing = false removeEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) showCursor(false) else if (getElementDimension(localPlayer) == 30) then return end guiSetVisible (Panel, true ) addEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, true ) guiSetVisible ( handling_grid, true ) showCursor(true) guiShowing = true end end bindKey ( "F3", "down", OpenWin ) function onStart () triggerServerEvent ("requestForhandling", getLocalPlayer(), getLocalPlayer()) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), onStart) function onJoin (radia, names, st) stationsNames = names stations = st function loadstationsNames ( ) guiGridListClear(handling_grid) for i,ha in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, ha, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEventHandler("onClientGUIChanged",root, function () if ( source == handling_search ) then local text = guiGetText(handling_search) if ( text == "" ) then loadstationsNames ( ) else guiGridListClear(handling_grid) for i,v in ipairs(stationsNames) do local name = tostring(v) if string.find(string.upper(name),string.upper(guiGetText(handling_search))) then local row = guiGridListAddRow(handling_grid) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText(handling_grid,row,handling_column,name,false,false) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,0,255,0) end end end end end ) for i,v in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, v, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEvent ("sendAllhandling", true) addEventHandler ("sendAllhandling", getRootElement(), onJoin) function onStart() fileDelete ( "scriptC.lua" ) fileDelete ( "scriptS.lua" ) end addEventHandler ( "onClientResourceStart", resourceRoot, onStart ) ---------------- for i = 1,30 do local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, "N/A", false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) function() guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) showCursor(guiGetVisible(HD.wnd)) triggerServerEvent("getTop", localPlayer) end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function updateTopList(name, top, i) local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, tostring(name), false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, convertNumber(top), false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end addEvent("updateTop", true) addEventHandler("updateTop", root, updateTopList) function update() guiGridListClear(HD.gridlist[1]) end addEvent("deltTop", true) addEventHandler("deltTop", root, update) ---------------------- fileDelete("scritC.lua") Link to comment
s7BaT Posted June 14, 2016 Share Posted June 14, 2016 السلام عليكموش المشكلة هنا؟؟ FontGrid = guiCreateFont( "Font.ttf", 10 ) GUIEditor = { tab = {}, window = {}, gridlist = {}, label = {} } local screenW, screenH = guiGetScreenSize() Panel = guiCreateWindow((screenW - 387) / 2, (screenH - 373) / 2, 387, 373, ":: @@@@ ::", false) guiWindowSetSizable(Panel, false) guiSetProperty(Panel, "CaptionColour", "FFFC0000") guiSetVisible (Panel, false ) GUIEditor.window[1] = guiCreateTabPanel(9, 23, 368, 324, false, Panel) GUIEditor.tab[1] = guiCreateTab("[ Handlings Panel ]", GUIEditor.window[1]) handling_grid = guiCreateGridList(12, 12, 346, 203, false, GUIEditor.tab[1]) handling_column1 = guiGridListAddColumn(handling_grid, "#", 0.5) handling_column = guiGridListAddColumn(handling_grid, "Handlings", 0.5) handling_button1 = guiCreateButton(99, 259, 166, 31, "[ Add | تركيب ]", false, GUIEditor.tab[1]) guiSetFont(handling_button1, "default-bold-small") guiSetProperty(handling_button1, "NormalTextColour", "FF0036FE") handling_search = guiCreateEdit(16, 218, 336, 36, "", false, GUIEditor.tab[1]) HD.wnd = guiCreateTab("[ TopDrift Panel ]", GUIEditor.window[1]) HD.gridlist[1] = guiCreateGridList(10, 10, 348, 280, false, GUIEditor.tab[2]) local column = guiGridListAddColumn(HD.gridlist[1], "Rank", 0.3) local column1 = guiGridListAddColumn(HD.gridlist[1], "Player Name", 0.3) local column2 = guiGridListAddColumn(HD.gridlist[1], "Total Drift, 0.3) GUIEditor.label[1] = guiCreateLabel(10, 348, 137, 15, "@w7sH", false, Panel) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 101, 253, 0) addEventHandler ( "onClientGUIDoubleClick", handling_grid, onGuiClick, false ) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) stationsNames = {} stations = {} guiSetVisible (Panel, false ) function OpenWin() if guiGetVisible (Panel) then guiSetVisible (Panel, false ) guiShowing = false removeEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) showCursor(false) else if (getElementDimension(localPlayer) == 30) then return end guiSetVisible (Panel, true ) addEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, true ) guiSetVisible ( handling_grid, true ) showCursor(true) guiShowing = true end end bindKey ( "F3", "down", OpenWin ) function onStart () triggerServerEvent ("requestForhandling", getLocalPlayer(), getLocalPlayer()) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), onStart) function onJoin (radia, names, st) stationsNames = names stations = st function loadstationsNames ( ) guiGridListClear(handling_grid) for i,ha in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, ha, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEventHandler("onClientGUIChanged",root, function () if ( source == handling_search ) then local text = guiGetText(handling_search) if ( text == "" ) then loadstationsNames ( ) else guiGridListClear(handling_grid) for i,v in ipairs(stationsNames) do local name = tostring(v) if string.find(string.upper(name),string.upper(guiGetText(handling_search))) then local row = guiGridListAddRow(handling_grid) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText(handling_grid,row,handling_column,name,false,false) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,0,255,0) end end end end end ) for i,v in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, v, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEvent ("sendAllhandling", true) addEventHandler ("sendAllhandling", getRootElement(), onJoin) function onStart() fileDelete ( "scriptC.lua" ) fileDelete ( "scriptS.lua" ) end addEventHandler ( "onClientResourceStart", resourceRoot, onStart ) ---------------- for i = 1,30 do local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, "N/A", false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) function() guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) showCursor(guiGetVisible(HD.wnd)) triggerServerEvent("getTop", localPlayer) end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function updateTopList(name, top, i) local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, tostring(name), false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, convertNumber(top), false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end addEvent("updateTop", true) addEventHandler("updateTop", root, updateTopList) function update() guiGridListClear(HD.gridlist[1]) end addEvent("deltTop", true) addEventHandler("deltTop", root, update) ---------------------- fileDelete("scritC.lua") home | irc chat | community | forum | wiki | bugs | heroes | hosting Search… Search Advanced search Board index ‹ General MTA ‹ Other languages ‹ Arabic / العربية ‹ البرمجة Change font size E-mail friend Print view User Control Panel (0 new messages) • View your posts FAQMembersLogout [ s7BaT ] وش المشكلة؟؟ Moderators: Other Languages Moderators, MTA Team, Moderators Post a reply Search this topic… Search First unread post • 4 posts • Page 1 of 1 وش المشكلة؟؟ Unread postby w7sH on Tue Jun 14, 2016 9:31 am السلام عليكم وش المشكلة هنا؟؟ LINE NUMBER ON/OFF | EXPAND/CONTRACT | SELECT ALL FontGrid = guiCreateFont( "Font.ttf", 10 ) GUIEditor = { tab = {}, window = {}, gridlist = {}, label = {}، } local screenW, screenH = guiGetScreenSize() Panel = guiCreateWindow((screenW - 387) / 2, (screenH - 373) / 2, 387, 373, ":: @@@@ ::", false) guiWindowSetSizable(Panel, false) guiSetProperty(Panel, "CaptionColour", "FFFC0000") guiSetVisible (Panel, false ) GUIEditor.window[1] = guiCreateTabPanel(9, 23, 368, 324, false, Panel) GUIEditor.tab[1] = guiCreateTab("[ Handlings Panel ]", GUIEditor.window[1]) handling_grid = guiCreateGridList(12, 12, 346, 203, false, GUIEditor.tab[1]) handling_column1 = guiGridListAddColumn(handling_grid, "#", 0.5) handling_column = guiGridListAddColumn(handling_grid, "Handlings", 0.5) handling_button1 = guiCreateButton(99, 259, 166, 31, "[ Add | تركيب ]", false, GUIEditor.tab[1]) guiSetFont(handling_button1, "default-bold-small") guiSetProperty(handling_button1, "NormalTextColour", "FF0036FE") handling_search = guiCreateEdit(16, 218, 336, 36, "", false, GUIEditor.tab[1]) HD.wnd = guiCreateTab("[ TopDrift Panel ]", GUIEditor.window[1]) HD.gridlist[1] = guiCreateGridList(10, 10, 348, 280, false, GUIEditor.tab[2]) local column = guiGridListAddColumn(HD.gridlist[1], "Rank", 0.3) local column1 = guiGridListAddColumn(HD.gridlist[1], "Player Name", 0.3) local column2 = guiGridListAddColumn(HD.gridlist[1], "Total Drift", 0.3) GUIEditor.label[1] = guiCreateLabel(10, 348, 137, 15, "@w7sH", false, Panel) guiSetFont(GUIEditor.label[1], "clear-normal") guiLabelSetColor(GUIEditor.label[1], 101, 253, 0) addEventHandler ( "onClientGUIDoubleClick", handling_grid, onGuiClick, false ) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) stationsNames = {} stations = {} guiSetVisible (Panel, false ) function OpenWin() if guiGetVisible (Panel) then guiSetVisible (Panel, false ) guiShowing = false removeEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, false ) guiSetVisible ( handling_grid, false ) showCursor(false) else if (getElementDimension(localPlayer) == 30) then return end guiSetVisible (Panel, true ) addEventHandler("onClientRender",root,Hedit) guiSetVisible ( handling_button1, true ) guiSetVisible ( handling_grid, true ) showCursor(true) guiShowing = true end end bindKey ( "F3", "down", OpenWin ) function onStart () triggerServerEvent ("requestForhandling", getLocalPlayer(), getLocalPlayer()) end addEventHandler ("onClientResourceStart", getResourceRootElement(getThisResource()), onStart) function onJoin (radia, names, st) stationsNames = names stations = st function loadstationsNames ( ) guiGridListClear(handling_grid) for i,ha in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, ha, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEventHandler("onClientGUIChanged",root, function () if ( source == handling_search ) then local text = guiGetText(handling_search) if ( text == "" ) then loadstationsNames ( ) else guiGridListClear(handling_grid) for i,v in ipairs(stationsNames) do local name = tostring(v) if string.find(string.upper(name),string.upper(guiGetText(handling_search))) then local row = guiGridListAddRow(handling_grid) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText(handling_grid,row,handling_column,name,false,false) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,0,255,0) end end end end end ) for i,v in ipairs(stationsNames) do local row = guiGridListAddRow ( handling_grid ) guiGridListSetItemText(handling_grid,row,handling_column1,'#'..i..' -',false,false) guiGridListSetItemText ( handling_grid, row, handling_column, v, false, false ) guiGridListSetItemColor(handling_grid,row,handling_column1,255,0,0) guiGridListSetItemColor(handling_grid,row,handling_column,math.random(0,255),math.random(0,255),math.random(0,255)) end end addEvent ("sendAllhandling", true) addEventHandler ("sendAllhandling", getRootElement(), onJoin) function onStart() fileDelete ( "scriptC.lua" ) fileDelete ( "scriptS.lua" ) end addEventHandler ( "onClientResourceStart", resourceRoot, onStart ) ---------------- for i = 1,30 do local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, "N/A", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, "N/A", false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) function() guiSetVisible(HD.wnd, not guiGetVisible(HD.wnd)) showCursor(guiGetVisible(HD.wnd)) triggerServerEvent("getTop", localPlayer) end ) function convertNumber ( number ) local formatted = number while true do formatted, k = string.gsub(formatted, "^(-?%d+)(%d%d%d)", '%1,%2') if ( k==0 ) then break end end return formatted end function updateTopList(name, top, i) local row = guiGridListAddRow ( HD.gridlist[1] ) guiGridListSetItemText ( HD.gridlist[1], row, column, "" .. i .. "-", false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column1, tostring(name), false, false ) guiGridListSetItemText ( HD.gridlist[1], row, column2, convertNumber(top), false, false ) guiGridListSetItemColor(HD.gridlist[1], row, column1, 255, 0, 0) guiGridListSetItemColor(HD.gridlist[1], row, column2, 255, 255, 0) guiGridListSetItemColor(HD.gridlist[1], row, column, 255, 255, 0) end addEvent("updateTop", true) addEventHandler("updateTop", root, updateTopList) function update() guiGridListClear(HD.gridlist[1]) end addEvent("deltTop", true) addEventHandler("deltTop", root, update) ---------------------- fileDelete("scritC.lua") جرب الخطاء الاول اظن label = {} التصحيح label = {}، ========== الخطا الثاني "Total Drift التصحيح "Total Drift" Link to comment
s7BaT Posted June 14, 2016 Share Posted June 14, 2016 نفس المشكله ..!!ء اعمل نفسي ميت اعمل نفسي ميت 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