RdX Posted April 23, 2014 Share Posted April 23, 2014 السلام عليكم ورحمة الله وبركاته انا اليوم سويت شيء سيط لاأاكن المشكله منيب عارف كيف اخليه يطلع في Gridlist mapGridList = guiCreateGridList ( 20, 50, 191, 320, false, mapwin ); guiGridListSetSelectionMode ( mapGridList, 2 ); gColumn = guiGridListAddColumn ( mapGridList, "Name:", 0.85 ); guiWindowSetSizable ( mapwin, false ); function getRaceMaps() local maps = {} for _,res in ipairs(getResources()) do if getResourceInfo(res,"type") == "map" then if getResourceInfo(res,"gamemodes") == "race" then table.insert(maps,getResourceInfo(res,"name")) end end end return maps end ذا القريد لست و لا الكود حق الي يطلع مابات الريس لأأكن ما عرفت كيف اربطها مع بعض فأأ سووو خير و علموني <3 Link to comment
RdX Posted April 23, 2014 Author Share Posted April 23, 2014 ^^^^^^^^^^^ تم عملهأأ تم الحل Link to comment
#DRAGON!FIRE Posted April 23, 2014 Share Posted April 23, 2014 * Client Side ! bindKey( "F4", "down", function ( ) triggerServerEvent( "getMaps", localPlayer ) end ) addEvent( "UpMapsToGrid", true ) addEventHandler( "UpMapsToGrid", root, function( allMaps ) guiGridListClear( mapGridList ) for _,v in ipairs( allMaps ) do local row = guiGridListAddRow( mapGridList ) guiGridListSetItemText( mapGridList, row, 1, tostring( v ), false, false ) end end ) * Server Side ! function getRaceMaps( element ) local maps = {} for _,res in ipairs(getResources()) do if getResourceInfo(res,"type") == "map" then if getResourceInfo(res,"gamemodes") == "race" then table.insert(maps,getResourceInfo(res,"name")) end triggerClientEvent( element, "UpMapsToGrid", element, maps ) end end end addEvent( "getMaps", true ) addEventHandler( "getMaps", root, function( ) getRaceMaps( source ) 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