N3xT Posted August 19, 2015 Author Share Posted August 19, 2015 انا عدلت ع addMaps_بجانب كلاينت .. استبدله ؟ يب Link to comment
#DRAGON!FIRE Posted August 19, 2015 Share Posted August 19, 2015 المابات جات ف اللستة ؟ Link to comment
N3xT Posted August 19, 2015 Author Share Posted August 19, 2015 المابات جات ف اللستة ؟ يب كل شيء تمام , بس الاديت م يبحث Link to comment
H25 Posted August 19, 2015 Share Posted August 19, 2015 المابات جات ف اللستة ؟ يب كل شيء تمام , بس الاديت م يبحث متأكد من اسم الايدت ؟ Link to comment
N3xT Posted August 20, 2015 Author Share Posted August 20, 2015 المابات جات ف اللستة ؟ يب كل شيء تمام , بس الاديت م يبحث متأكد من اسم الايدت ؟ يب Link to comment
MR.GRAND Posted August 20, 2015 Share Posted August 20, 2015 addEvent ( "addMaps_", true ) addEventHandler ( "addMaps_", root, function ( m_table ) guiGridListClear ( GUIEditor.gridlist[1] ) cMaps = m_table for _,v in ipairs ( m_table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end ) addEventHandler("onClientGUIChanged",root, function () if ( source == GUIEditor.edit[1] ) then local text = string.upper(guiGetText(GUIEditor.edit[1])) if ( text == "" ) then return else guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(cMaps) do if ( string.find ( string.upper ( v ), string.upper ( guiGetText ( GUIEditor.edit[1]) ) ) ) then if string.find(text) then local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,255,100,100) else return end end end end end end end ) Link to comment
#Madara Posted August 20, 2015 Share Posted August 20, 2015 addEvent ( "addMaps_", true ) addEventHandler ( "addMaps_", root, function ( m_table ) guiGridListClear ( GUIEditor.gridlist[1] ) cMaps = m_table for _,v in ipairs ( m_table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end ) addEventHandler("onClientGUIChanged",root, function () if ( source == GUIEditor.edit[1] ) then local text = string.upper(guiGetText(GUIEditor.edit[1])) if ( text == "" ) then return else guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(cMaps) do if ( string.find ( string.upper ( v ), string.upper ( guiGetText ( GUIEditor.edit[1]) ) ) ) then if string.find(text) then local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,255,100,100) else return end end end end end end end ) وش تخربط أنت ؟ Link to comment
MR.GRAND Posted August 20, 2015 Share Posted August 20, 2015 addEvent ( "addMaps_", true ) addEventHandler ( "addMaps_", root, function ( m_table ) guiGridListClear ( GUIEditor.gridlist[1] ) cMaps = m_table for _,v in ipairs ( m_table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end ) addEventHandler("onClientGUIChanged",root, function () if ( source == GUIEditor.edit[1] ) then local text = string.upper(guiGetText(GUIEditor.edit[1])) if ( text == "" ) then return else guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(cMaps) do if ( string.find ( string.upper ( v ), string.upper ( guiGetText ( GUIEditor.edit[1]) ) ) ) then if string.find(text) then local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,255,100,100) else return end end end end end end end ) وش تخربط أنت ؟ خلي يجربه أول ! Link to comment
N3xT Posted August 20, 2015 Author Share Posted August 20, 2015 addEvent ( "addMaps_", true ) addEventHandler ( "addMaps_", root, function ( m_table ) guiGridListClear ( GUIEditor.gridlist[1] ) cMaps = m_table for _,v in ipairs ( m_table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end ) addEventHandler("onClientGUIChanged",root, function () if ( source == GUIEditor.edit[1] ) then local text = string.upper(guiGetText(GUIEditor.edit[1])) if ( text == "" ) then return else guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(cMaps) do if ( string.find ( string.upper ( v ), string.upper ( guiGetText ( GUIEditor.edit[1]) ) ) ) then if string.find(text) then local row = guiGridListAddRow(GUIEditor.gridlist[1]) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) guiGridListSetItemColor(GUIEditor.gridlist[1],row,1,255,100,100) else return end end end end end end end ) guiGridListSetItemText(GUIEditor.gridlist[1],row,1,getPlayerName(v),false,false) مَ يحتاج أجربه Link to comment
MR.GRAND Posted August 20, 2015 Share Posted August 20, 2015 انا عدلت لك البحث للاعبين , بس انت عدل اللي عليك ._. Link to comment
N3xT Posted August 20, 2015 Author Share Posted August 20, 2015 انا عدلت لك البحث للاعبين , بس انت عدل اللي عليك ._. مَ رضي يشتغل أساسا الديبق كله اخطاء Link to comment
MR.GRAND Posted August 20, 2015 Share Posted August 20, 2015 انا عدلت لك البحث للاعبين , بس انت عدل اللي عليك ._. مَ رضي يشتغل أساسا الديبق كله اخطاء حط الكلام اللي يقوله لك بالديبوق ونعرف نصححه Link to comment
N3xT Posted August 20, 2015 Author Share Posted August 20, 2015 Bad Argument #1 to 'upper' (string expected, got boolean) : سطر 109 addEventHandler("onClientGUIChanged",root, function () if ( source == GUIEditor.edit[1] ) then local text = string.upper(guiGetText(GUIEditor.edit[1])) local row = guiGridListAddRow(GUIEditor.gridlist[1]) if ( text == "" ) then return else guiGridListClear(GUIEditor.gridlist[1]) for i,v in ipairs(cMaps) do if ( string.find ( string.upper ( v ) , string.upper ( guiGetText ( GUIEditor.edit[1]) ) ) ) then if string.find(text) then guiGridListSetItemText(GUIEditor.gridlist[1],row,1,v,false, false) end end end end end end) Link to comment
iMr.SFA7 Posted August 20, 2015 Share Posted August 20, 2015 -- Client Side addEvent ( "addMaps_", true ) addEventHandler ( "addMaps_", root, function ( m_table ) guiGridListClear ( GUIEditor.gridlist[1] ) cMaps = m_table for _,v in ipairs ( m_table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end ) addEventHandler ( "onClientGUIChanged", GUIEditor.edit[1], function ( ) if ( guiGetText ( GUIEditor.edit[1] ) ~= "" ) then guiGridListClear ( GUIEditor.gridlist[1] ) for _,v in ipairs ( cMaps ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) if ( string.find ( string.upper ( v ), string.upper ( guiGetText ( GUIEditor.edit[1]) , 1, true ) ) ) then guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, v, false, false ) end end else guiGridListClear ( GUIEditor.gridlist[1] ) for _,v in ipairs ( cMaps ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end end ,false ) Link to comment
N3xT Posted August 20, 2015 Author Share Posted August 20, 2015 if ( string.find ( string.upper ( v ), string.upper ( guiGetText ( GUIEditor.edit[1]) , 1, true ) ) ) then نفس الغلط هنا Link to comment
iMr.SFA7 Posted August 20, 2015 Share Posted August 20, 2015 آمم جرب كذآ -- Client Side addEvent ( "addMaps_", true ) addEventHandler ( "addMaps_", root, function ( m_table ) guiGridListClear ( GUIEditor.gridlist[1] ) cMaps = m_table for _,v in ipairs ( m_table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end ) addEventHandler ( "onClientGUIChanged", GUIEditor.edit[1], function ( ) if ( guiGetText ( GUIEditor.edit[1] ) ~= "" ) then guiGridListClear ( GUIEditor.gridlist[1] ) for _,v in ipairs ( cMaps ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) local ResourceName = getResourceName ( v ) if ( string.find ( string.upper ( ResourceName ), string.upper ( guiGetText ( GUIEditor.edit[1]) , 1, true ) ) ) then guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, ResourceName , false, false ) end end else guiGridListClear ( GUIEditor.gridlist[1] ) for _,v in ipairs ( cMaps ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) local ResourceName = getResourceName ( v ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, ResourceName , true, true) end end end ,false ) Link to comment
N3xT Posted August 20, 2015 Author Share Posted August 20, 2015 م ظبط , للمعلومية ، تراني حاط بالقريد ليست getResourceInfo( v, "name" ) عشان يحط لي أسم المابات واقدر احطها نكست getResourceName م ينفع مَ فيه يعني احد يعرف لها ولا كيف Link to comment
N3xT Posted August 20, 2015 Author Share Posted August 20, 2015 يب الدي بق يقول شيء ؟؟؟ bad argument #1 to 'upper' (string expected, got boolean) Link to comment
The Killer Posted August 21, 2015 Share Posted August 21, 2015 الحين انت وش تبي تسوي بالظبط ؟ تبي في الايديت يوم تبحث ؟ ووش الخطأ ذا الي في الديبوق ؟ يوم كتبت طلع الخطأ ؟ + اطرح كود الكلاينت الاخير الي ركبته Link to comment
N3xT Posted August 21, 2015 Author Share Posted August 21, 2015 الحين انت وش تبي تسوي بالظبط ؟ تبي في الايديت يوم تبحث ؟ ووش الخطأ ذا الي في الديبوق ؟ يوم كتبت طلع الخطأ ؟ + اطرح كود الكلاينت الاخير الي ركبته عندي أديت ، وأبيه يبحث عن المابات وذا أخر كود ركبته addEvent ( "addMaps_", true ) addEventHandler ( "addMaps_", root, function ( m_table ) guiGridListClear ( GUIEditor.gridlist[1] ) cMaps = m_table for _,v in ipairs ( m_table ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, v, true, true) end end ) addEventHandler ( "onClientGUIChanged", GUIEditor.edit[1], function ( ) if ( guiGetText ( GUIEditor.edit[1] ) ~= "" ) then guiGridListClear ( GUIEditor.gridlist[1] ) for _,v in ipairs ( cMaps ) do local row = guiGridListAddRow ( GUIEditor.gridlist[1] ) local ResourceName = getResourceName ( v ) if ( string.find ( string.upper ( ResourceName ), string.upper ( guiGetText ( GUIEditor.edit[1]) , 1, true ) ) ) then guiGridListSetItemText( GUIEditor.gridlist[1], row, 1, ResourceName , false, false ) end end else guiGridListClear ( GUIEditor.gridlist[1] ) for _,v in ipairs ( cMaps ) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) local ResourceName = getResourceName ( v ) guiGridListSetItemText ( GUIEditor.gridlist[1], row, 1, ResourceName , true, true) end end end ,false ) getResourceNameهنا البحث يكون عن طريق انا مخليه getResourceInfo - عشان يطلع أسمه من الميتا واذا كتبت شيء بالاديت يطلع الخطأ bad argument #1 to 'upper' (string expected, got boolean Link to comment
The Killer Posted August 21, 2015 Share Posted August 21, 2015 طيب سويته لك بطريقه مختلفه شويتين جربها : Client side # addEventHandler ("onClientResourceStart", resourceRoot, function () triggerServerEvent ("GetMaps", localPlayer) end ) addEventHandler ("onClientGUIClick", resourceRoot, function () if (source == GUIEditor.button[2]) then local row = guiGridListGetSelectedItem (GUIEditor.gridlist[1]) local select = guiGridListGetItemText (GUIEditor.gridlist[1], row, 1) if (select and select ~= "") then triggerServerEvent ("nextM", localPlayer, select) end end 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 ) addEventHandler ("onClientGUIChanged", GUIEditor.edit[1], function () if guiGetText (source) ~= "" then guiGridListClear (GUIEditor.gridlist[1]) triggerServerEvent ("searchForIt", localPlayer, guiGetText (source)) else triggerServerEvent ("getMapsBack", localPlayer) end end ) addEvent ("ReplyFromServer", true) addEventHandler ("ReplyFromServer", root, function (mapName, maps) for _,v in ipairs (maps) do if string.find (v:lower (), mapName:lower ()) then local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, v, false, false) end end end ) addEvent ("getAllMaps", true) addEventHandler ("getAllMaps", root, function (maps) for _,v in ipairs (maps) do local row = guiGridListAddRow (GUIEditor.gridlist[1]) guiGridListSetItemText (GUIEditor.gridlist[1], row, 1, v, false, false) end end ) Server side # function fetchMaps ( ) local Maps_ = { } for k, v in ipairs( getResources ( ) ) do if ( getResourceInfo( v, "type" ) == "map" and getResourceInfo( v, "gamemodes" ) == "race" )then table.insert ( Maps_, getResourceName( v ) ) end end return Maps_ end addEvent ("GetMaps", true) addEventHandler ("GetMaps", root, function () local Maps = fetchMaps () triggerClientEvent (source, "addMaps_", source, Maps) end ) addEvent ("searchForIt", true) addEventHandler ("searchForIt", root, function (mapName) local maps = fetchMaps () triggerClientEvent (source, "ReplyFromServer", source, mapName, maps) end ) addEvent ("getMapsBack", true) addEventHandler ("getMapsBack", root, function () local maps = fetchMaps () triggerClientEvent (source, "getAllMaps", source, maps) end ) addEvent ("nextM", true) addEventHandler ("nextM", root, function (map) executeCommandHandler ("nextmap", source, map) end ) Link to comment
N3xT Posted August 21, 2015 Author Share Posted August 21, 2015 الكود ظبط بالبحث وتمام ، بس فيه مشكلة getResourceName( v ) الأسماء اللي بالقريد ليست ، أسماء ملفات الماب فهمتني ؟ أنا أبيه يطلع لي أسماء المابات اللي بالميتا getResourceInfo( v, "name" ) اذا عدلت عليه وخليته كذا يخرب وما اقدر ابحث وش الحل 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