--As requested by Spoco here is the LCD Demo for GMod --Load GMX for our table loading and saving shite if gmx==nil then _OpenScript("lib/gmx/init.lua") end --Declare our table of pixels Pixel = {} --Add sizes WIDTH = 640 HEIGHT = 480 function initPixels() for x=1,HEIGHT do Pixel[x] = {} for y=1,WIDTH do Pixel[x].y = {} Pixel[x].y.r = 255 Pixel[x].y.g = 255 Pixel[x].y.b = 255 Pixel[x].y.a = 255 end end end initPixels() function copyToWorld() for y=1,HEIGHT do for x=1,WIDTH do local colorString=Pixel[x][y].r .. " "..Pixel[x][y].g.." "..Pixel[x][y].b.." " .. Pixel[x][y].a local entid = _EntGetByName("pixel"..x"x"..y) _EntFire(entid,"color",colorString,0) end end end function savePattern(userid,name) gmx.saveTable(Pixel,"lcdpatterns/"..name..".lcd") end function loadPattern(userid,name) gmx.loadTable("lcdpatterns/"..name..".lcd") copyToWorld() end CONCOMMAND("savelcd",savePattern) CONCOMMAND("loadlcd",loadPattern)