Hello all I have a mask shop for my TTT server's but since the change from gmod 12 to 13 it has been really frustrating. My motley crew has fix the shop to work with 13 but there is one problem the mask's will not show up on the players face there are no errors in the client console nor the server console so we are completely stumped to what's wrong can any one tell me if there is an issue with 3D2D or this code?
[CODE]function ENT:Draw()
local material = self.Entity:GetNWString( "Material" )
local owner = self:GetOwner()
if !IsValid( owner ) then return end
if !owner:Alive() then return end
if owner:Team() == TEAM_SPEC then return end
if LocalPlayer() == owner then return end
local boneindex = owner:LookupBone("ValveBiped.Bip01_Head1")
if boneindex then
local pos, ang = owner:GetBonePosition( boneindex )
if pos and pos ~= owner:GetPos() then
ang:RotateAroundAxis( ang:Forward(), 90 )
ang:RotateAroundAxis( ang:Up(), -90 )
cam.Start3D2D( pos - ang:Forward() * 5 - ang:Right() * 10 + ang:Up() * 7, ang, 1 )
surface.SetDrawColor( 255, 255, 255, 255 )
surface.SetTexture( surface.GetTextureID( material ) )
surface.DrawTexturedRect( 0, 0, 10, 10 )
cam.End3D2D()
end
end
end[/CODE]
Have you tried debugging the code by printing messages after segments of logic? Try to figure out where it's stopping.
Also, something to keep in mind, Garry has added texture filtering options which should make the rendered materials look a little better once you've got it working. [url]http://garry.tv/post/34414478795/texture-filtering[/url]
His problem is related to Chief Tiger's mask shop. He didn't code it so don't expect the man to "know the problem" and how to fix it.
Sorry, you need to Log In to post a reply to this thread.