pino-boy Posted November 3, 2013 Share Posted November 3, 2013 Hello,I have a problem in the list of maps maps no appear gridMaps = guiCreateGridList(17,51,315,285,false) guiGridListSetSortingEnabled(gridMaps,false) guiGridListAddColumn(gridMaps,"Map name",0.9) addEventHandler ( "onClientGUIClick", gridMaps, updateMapLabels ) function loadMaps(gamemodeMapTable, gamemode, map) guiGridListClear(gridMaps) if gamemodeMapTable then aGamemodeMapTable = gamemodeMapTable for id,gamemode in pairs (gamemodeMapTable) do if (gamemode.name == "Race") then for id,map in ipairs (gamemode.maps) do local row = guiGridListAddRow ( gridMaps ) guiGridListSetItemText ( gridMaps, row, 1, map.name, false, false ) guiGridListSetItemData ( gridMaps, row, 1, map.resname) totalServerMaps = totalServerMaps+1 if (string.find(map.name,"[DM]",1,true)) then totalDmMaps = totalDmMaps+1 elseif (string.find(map.name,"[DD]",1,true)) then totalDdMaps = totalDdMaps+1 end updateMapLabels(1) end end end end end function updateMapLabels(updateMode) if updateMode == 1 then guiSetText(lblTotalMapsOnServer,"Total maps on the server: "..totalServerMaps) guiSetText(lblTotalDmMaps,"Total DM Maps: "..totalDmMaps) guiSetText(lblTotalDdMaps,"Total DD Maps: "..totalDdMaps) else local row,column = guiGridListGetSelectedItem(gridMaps) local mapName = guiGridListGetItemText(gridMaps,row,1) if mapName == "" then guiSetText(lblSelectedMapName,"N/A") guiSetText(lblSelectedMapAuthor,"N/A") else guiSetText(lblSelectedMapName,mapName) if string.find(mapName,"[DM]",1,true) then guiSetText(lblSelectedMapAuthor,"Deathmatch") elseif string.find(mapName,"[DD]",1,true) then guiSetText(lblSelectedMapAuthor,"Destruction Derby") elseif string.find(mapName,"[FUN]",1,true) then guiSetText(lblSelectedMapAuthor,"Fun map") else guiSetText(lblSelectedMapAuthor,"UNKNOWN") end end end end Link to comment
Ab-47 Posted November 3, 2013 Share Posted November 3, 2013 What does your debug say? Link to comment
BieHDC Posted November 3, 2013 Share Posted November 3, 2013 I have had the same problem But i can say you that you trigger a Server event when the client joins and the server sends a table back to client and save it. and you have to recreate the table serverside or the client cant read Link to comment
pino-boy Posted November 3, 2013 Author Share Posted November 3, 2013 What does your debug say? has no error in debug Link to comment
pino-boy Posted November 3, 2013 Author Share Posted November 3, 2013 I have had the same problemBut i can say you that you trigger a Server event when the client joins and the server sends a table back to client and save it. and you have to recreate the table serverside or the client cant read did no understand, what do you mean? Link to comment
pino-boy Posted November 3, 2013 Author Share Posted November 3, 2013 changed gridMaps = guiCreateGridList(17,51,315,285,false) guiGridListSetSortingEnabled(gridMaps,false) guiGridListAddColumn(gridMaps,"Map name",0.9) addEventHandler( "onClientGUIClick", gridMaps, loadMaps ) Debug 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