Arsilex Posted September 22, 2012 Share Posted September 22, 2012 gridMaps = guiCreateGridList(639,99,356,511,false) guiGridListSetSortingEnabled(gridMaps,false) guiGridListAddColumn(gridMaps,"Map name",0.9) guiSetAlpha(gridMaps,0.69999998807907) how to put in this all maps of Race? Link to comment
DiSaMe Posted September 22, 2012 Share Posted September 22, 2012 getResources getResourceInfo triggerClientEvent addEvent addEventHandler guiGridListAddRow guiGridListSetItemText Get all resources with getResources, cycle through all of them and use getResourceInfo to check if "type" attribute is "map" and "gamemodes" attribute is "race", and if they are, then also get "name" attribute and put it into a table. So you have a table with the names of all race maps. Make an event client-side and trigger it from server with map names list as an argument. On the client side, loop through that table and use guiGridListAddRow and guiGridListSetItemText to add the map names to the grid list. 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