I need help with derma

Hi, I try to customize the default DarkRP f4 menu but there is one thing I am clueless about.

These are the tabs of the menu:

And I want the color of the tab names to change if the tab is active.

But it only works with the ammo tab.

Thats the code:



hook.Add("Think" , "ActiveF4Tab", function()



if sheet.Tab:IsActive() then 
    sheet.Tab:SetTextColor( Color( 0, 255, 0, 255 ) )
    else if not sheet.Tab:GetDisabled() then sheet.Tab:SetTextColor( Color( 255, 255, 255, 255 ) )
end
end


end)

I’m not sure if you need the entire f4 menu code to solve the problem but if you need it i will post it.

By the way I dont edit the core files of darkrp. I edit it in the darkrpmodification addon.

http://forum.facepunch.com/showthread.php?t=1310132

Use it on sheet:Paint() hook, not in think http://wiki.garrysmod.com/page/PANEL/Paint
And, as its for darkrp, please, dont try to sell it

It seems like it doesn’t change anything.

It somehow only affects the ammo tab too.

Thats a good point :smile:

Don’t worry. It’s just for my server.

Bump

Does no one know how to solve that issue?

Edit: Nevermind. I solved the issue by putting the code in a Paint hook.