Black material with just the shape

Hi!
I am talking to you today for a little problem. I changed the DrawVoiceChat() function of the DarkRP, located in gamemode->modules->hud->cl_hud.lua
Without know why, depending on the starting, sometimes I’ve the good icon at the right, but generally (95%), the texture is deformed : too dark, or just entirely black.
The code :



local VoiceChatTexture = Material( "mymaterial/mymaterial.png" )
local function DrawVoiceChat()
    if localplayer.DRPIsTalking then
        local _, chboxY = chat.GetChatBoxPos()

        local Rotating = math.sin(CurTime() * 3)

        if Rotating < 0 then
            Rotating = 1 - (1 + Rotating)
        end

        surface.SetMaterial(VoiceChatTexture)
        surface.DrawTexturedRectRotated(ScrW() - 100, chboxY, Rotating * 96, 96, 0)
    end
end


Image of the black “material” :

http://img15.hostingpics.net/pics/929696MATERIAL.png

So I search a way to see the texture right when speaking, and still functional. (I think that SetMaterial is not a good way)…
If one person can give me the right solution…

Thanks by advance!

use surface.SetDrawColor(Color(255,255,255)) before surface.SetMaterial()

Yeah, that was it. Thanks.

http://corefiles.darkrp.eu