• Retrieving Map Image
    3 replies, posted
What's the function to retrieve the images that maps have in map selection menu?
[lua] if file.Exists("maps/"..Maps[I]..".png","GAME") then MapMaterial[I] = Material("../maps/"..Maps[I]..".png") print("Loaded "..Maps[I]..".png") else print("No image for "..Maps[I]) end [/lua]
how do you draw the image though? Probably a dumb question but I've never tried drawing a Material on the players screen before.
[lua] surface.SetMaterial(MapMaterial[i]) surface.SetDrawColor(255,255,255,255) surface.DrawTexturedRect(x,y,256,256)[/lua]
Sorry, you need to Log In to post a reply to this thread.