Ahmed Ly Posted June 12, 2016 Share Posted June 12, 2016 السلام عليكم كيف احط كل مابات التكتيك في GridList Link to comment
' A F . Posted June 12, 2016 Share Posted June 12, 2016 getResources getResourceInfo triggerClientEvent Link to comment
Ahmed Ly Posted June 12, 2016 Author Share Posted June 12, 2016 getResources getResourceInfo triggerClientEvent كيف استخدم getResources و getResourceInfo ؟؟ Link to comment
' A F . Posted June 12, 2016 Share Posted June 12, 2016 function getMaps ( ) local Maps = { } for i,v in ipairs ( getResources ( ) ) do if ( getResourceInfo ( v , "type" ) == "map" ) then table.insert ( Maps , v ) end end return Maps end for _,v in ipairs ( getMaps ( ) ) do outputChatBox ( ""..getResourceName ( v ) , root ) end Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 function getMaps ( ) local Maps = { } for i,v in ipairs ( getResources ( ) ) do if ( getResourceInfo ( v , "type" ) == "map" ) then table.insert ( Maps , v ) end end return Maps end for _,v in ipairs ( getMaps ( ) ) do outputChatBox ( ""..getResourceName ( v ) , root ) end كود هدا احطه في Server ? function getMaps ( ) local Maps = { } for i,v in ipairs ( getResources ( ) ) do if ( getResourceInfo ( v , "type" ) == "map" ) then table.insert ( Maps , v ) end end return Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 Client function OpenWin (getMaps) guiSetVisible (GUIEditor.window[1] , true ) showCursor(true) for _,v in ipairs (getMaps) do------Error local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(UIEditor.gridlist[1] ,row,cow,getResourceName(v),false,false) end end addEvent("SetMaps",true) addEventHandler("SetMaps",root,OpenWin) bindKey("F5", "down", OpenWin) server function getMaps ( ) local Maps = { } for i,v in ipairs ( getResources ( ) ) do if ( getResourceInfo ( getResourceFromName ( v ) , "type" ) == "map" ) then table.insert ( Maps , v ) triggerClientEvent("SetMaps",source,getMaps) end end return Maps end Link to comment
N3xT Posted June 13, 2016 Share Posted June 13, 2016 # 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 ) # Client : addEvent ("addMaps_", true) addEventHandler ("addMaps_", root, function (maps) guiGridListClear (ليست القريد) for _,v in ipairs (maps) do local row = guiGridListAddRow (ليست القريد) guiGridListSetItemText (ليست القريد, row, 1, v, false, false) end end ) By : ZA7F Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 # 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 ) # Client : addEvent ("addMaps_", true) addEventHandler ("addMaps_", root, function (maps) guiGridListClear (ليست القريد) for _,v in ipairs (maps) do local row = guiGridListAddRow (ليست القريد) guiGridListSetItemText (ليست القريد, row, 1, v, false, false) end end ) By : ZA7F ما اشتغل debugscript Link to comment
iMr.WiFi..! Posted June 13, 2016 Share Posted June 13, 2016 جرب 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 () for _,v in ipairs ( Maps ) do triggerClientEvent (source, "addMaps_", source, v) end end ) addEvent ("addMaps_", true) addEventHandler ("addMaps_", root, function ( v ) guiGridListClear (ليست القريد) local row = guiGridListAddRow (ليست القريد) guiGridListSetItemText (ليست القريد, row, 1, v, false, false) end ) Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 جرب 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 () for _,v in ipairs ( Maps ) do triggerClientEvent (source, "addMaps_", source, v) end end ) addEvent ("addMaps_", true) addEventHandler ("addMaps_", root, function ( v ) guiGridListClear (ليست القريد) local row = guiGridListAddRow (ليست القريد) guiGridListSetItemText (ليست القريد, row, 1, v, false, false) end ) NOT WORK Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 جاك كلام في الدي بق طيب ؟ لا والله بس مشكله لم نضغط علي اف5 يطلع في GridList F5 Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 كيف يعني ؟ وضح ؟ يعني لم نفتح لوحه يطلع في GridList F5 و هو ازر لي نفتح بيه لوحه Link to comment
Mr.CoR Posted June 13, 2016 Share Posted June 13, 2016 يطلع لك بيانات داخل القريد ليست ولا فاضيه ؟ Link to comment
Ahmed Ly Posted June 13, 2016 Author Share Posted June 13, 2016 يطلع لك بيانات داخل القريد ليست ولا فاضيه ؟ تطلع F5 بس ومفيش ماب اسمه F5 Link to comment
Mr.CoR Posted June 13, 2016 Share Posted June 13, 2016 غريب وريني الكود كامل اشوفه حق اللوحه والكود الي عطاه لك واي فاي Link to comment
Ahmed Ly Posted June 13, 2016 Author 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(k) guiSetVisible (GUIEditor.window[1] , true ) showCursor(true) guiGridListClear (GUIEditor.gridlist[1] ) local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) guiGridListSetItemText ( GUIEditor.gridlist[1] , row,cow,k, false, false) end bindKey("F5", "down", OpenWin2) 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 _,k in ipairs ( Maps ) do triggerClientEvent (source, "addMaps_", source, k) end end ) Link to comment
Mr.CoR 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, 1, v, false, false) end ) Link to comment
Ahmed Ly Posted June 13, 2016 Author 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, 1, v, false, false) 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