Mr.CoR Posted June 13, 2016 Share Posted June 13, 2016 يعني الحين المشكله ان اللوحه ماتظهر ؟ Link to comment
N3xT Posted June 13, 2016 Share Posted June 13, 2016 Client : local show = false GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(284, 255, 571, 369, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(29, 34, 517, 265, false, GUIEditor.window[1]) col = guiGridListAddColumn(GUIEditor.gridlist[1], "Name Maps", 0.9) GUIEditor.button[1] = guiCreateButton(9, 317, 169, 35, "اغلاق", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible( GUIEditor.window[1] ,false) bindKey("F5", "down", function () if show == false then guiSetVisible( GUIEditor.window[1] ,true) showCursor(true) else guiSetVisible( GUIEditor.window[1] ,false) showCursor(false) end end ) addEventHandler ("onClientResourceStart", resourceRoot, function () triggerServerEvent ("GetMaps", localPlayer) end ) addEvent ("addMaps_", true) addEventHandler ("addMaps_", root, function (maps) guiGridListClear (GUIEditor.gridlist[1]) for _,v in ipairs (maps) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, v, false, false) end end ) Server : function fetchMaps ( ) local Maps_ = { } for k, v in ipairs( getResources ( ) ) do if ( getResourceInfo( v, "type" ) == "map" ) then table.insert ( Maps_, getResourceInfo( v, "name" ) ) end end return Maps_ end addEvent ("GetMaps", true) addEventHandler ("GetMaps", root, function () local Maps = fetchMaps () triggerClientEvent (source, "addMaps_", source, Maps) end ) Link to comment
iMr.WiFi..! Posted June 13, 2016 Share Posted June 13, 2016 GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(284, 255, 571, 369, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(29, 34, 517, 265, false, GUIEditor.window[1]) cow = guiGridListAddColumn(GUIEditor.gridlist[1], "Name Maps", 0.9) GUIEditor.button[1] = guiCreateButton(9, 317, 169, 35, "اغلاق", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible( GUIEditor.window[1] ,false) function OpenWin2() guiSetVisible (GUIEditor.window[1] , true ) showCursor(true) end bindKey("F5", "down", OpenWin2) addEvent ("addMaps_", true) addEventHandler ("addMaps_", root, function ( v ) guiGridListClear ( GUIEditor.gridlist[1] ) local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText (GUIEditor.gridlist[1], row, cow, v, false, false) end ) function fetchMaps ( ) local Maps_ = { } for k, v in ipairs( getResources ( ) ) do if ( getResourceInfo( v, "type" ) == "map" )then table.insert ( Maps_, getResourceInfo( v, "name" ) ) end end return Maps_ end addEvent ("GetMaps", true) addEventHandler ("GetMaps", root, function () local Maps = getMaps () for _,v in ipairs ( Maps ) do triggerClientEvent (source, "addMaps_", source, v) end end ) Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 Client : local show = false GUIEditor = { gridlist = {}, window = {}, button = {} } GUIEditor.window[1] = guiCreateWindow(284, 255, 571, 369, "", false) guiWindowSetSizable(GUIEditor.window[1], false) GUIEditor.gridlist[1] = guiCreateGridList(29, 34, 517, 265, false, GUIEditor.window[1]) col = guiGridListAddColumn(GUIEditor.gridlist[1], "Name Maps", 0.9) GUIEditor.button[1] = guiCreateButton(9, 317, 169, 35, "اغلاق", false, GUIEditor.window[1]) guiSetProperty(GUIEditor.button[1], "NormalTextColour", "FFAAAAAA") guiSetVisible( GUIEditor.window[1] ,false) bindKey("F5", "down", function () if show == false then guiSetVisible( GUIEditor.window[1] ,true) showCursor(true) else guiSetVisible( GUIEditor.window[1] ,false) showCursor(false) end end ) addEventHandler ("onClientResourceStart", resourceRoot, function () triggerServerEvent ("GetMaps", localPlayer) end ) addEvent ("addMaps_", true) addEventHandler ("addMaps_", root, function (maps) guiGridListClear (GUIEditor.gridlist[1]) for _,v in ipairs (maps) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, v, false, false) end end ) Server : function fetchMaps ( ) local Maps_ = { } for k, v in ipairs( getResources ( ) ) do if ( getResourceInfo( v, "type" ) == "map" ) then table.insert ( Maps_, getResourceInfo( v, "name" ) ) end end return Maps_ end addEvent ("GetMaps", true) addEventHandler ("GetMaps", root, function () local Maps = fetchMaps () triggerClientEvent (source, "addMaps_", source, Maps) 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