@@ -65,14 +65,15 @@ function guiClick(button)
6565 if source == aTabMap .RefreshList then
6666 guiGridListClear (aTabMap .MapList )
6767 triggerServerEvent (" getMaps_s" , localPlayer , true )
68+ return
6869 end
69- if ( source ~= aTabMap .MapListSearch ) and guiGridListGetSelectedItem ( aTabMap .MapList ) == - 1 then
70+ local selectedRow = guiGridListGetSelectedItem ( aTabMap .MapList )
71+ local mapName = guiGridListGetItemText ( aTabMap .MapList , selectedRow , 1 )
72+ local mapResName = guiGridListGetItemText ( aTabMap .MapList , selectedRow , 2 )
73+ local gamemode = guiGridListGetItemText ( aTabMap .MapList , selectedRow , 3 )
74+ if ( source == aTabMap .Start or source == aTabMap .NextMap ) and selectedRow == - 1 then
7075 aMessageBox ( " error" , " No map selected!" )
71- end
72- local mapName = guiGridListGetItemText ( aTabMap .MapList , guiGridListGetSelectedItem ( aTabMap .MapList ), 1 )
73- local mapResName = guiGridListGetItemText ( aTabMap .MapList , guiGridListGetSelectedItem ( aTabMap .MapList ), 2 )
74- local gamemode = guiGridListGetItemText ( aTabMap .MapList , guiGridListGetSelectedItem ( aTabMap .MapList ), 3 )
75- if source == aTabMap .MapList then
76+ elseif source == aTabMap .MapList then
7677 if gamemode == " race" then
7778 guiSetEnabled (aTabMap .NextMap , true )
7879 else
0 commit comments