• ForceDermaSkin Wont Work?
    0 replies, posted
Hey guys, I made a derma-skin, (I just copied "example" and modified it) Its located in: gamemodes/[gamemodename]/content/lua/skins. [lua]local SKIN = {} // These are used in the settings panel SKIN.PrintName = "Red Skin" SKIN.Author = "Staneh" SKIN.DermaVersion = 1 SKIN.colOutline = Color( 0, 255, 0, 250 ) // You can change the colours from the Default skin SKIN.colPropertySheet = Color( 0, 255, 0, 255 ) SKIN.colTab = SKIN.colPropertySheet SKIN.colTabText = Color( 0, 0, 0, 200 ) SKIN.fontButton = "DefaultSmall" SKIN.fontTab = "DefaultSmall" SKIN.fontFrame = "DebugFixed" // Or any of the functions function SKIN:DrawSquaredBox( x, y, w, h, color ) surface.SetDrawColor( color ) surface.DrawRect( x, y, w, h ) surface.SetDrawColor( self.colOutline ) surface.DrawOutlinedRect( x, y, w, h ) end function SKIN:PaintFrame( panel ) local color = self.bg_color self:DrawSquaredBox( 0, 0, panel:GetWide(), panel:GetTall(), color ) surface.SetDrawColor( 0, 255, 0, 75 ) surface.DrawRect( 0, 0, panel:GetWide(), 21 ) surface.SetDrawColor( self.colOutline ) surface.DrawRect( 0, 21, panel:GetWide(), 1 ) end // Or just start a new skin from scratch by overriding the whole thing // // You need to add this to the bottom of your skin to register it in Derma. // Parameters are name (which should have no spaces or special chacters), description, then the SKIN table // derma.DefineSkin( "red", "Red", SKIN ) [/lua] and here my ForceDermaSkin: [lua] function GM:ForceDermaSkin() return "red" end [/lua] its in cl_init.lua. Whats wrong with it? It wont pop up as a red dermaskin..
Sorry, you need to Log In to post a reply to this thread.