Team Skin Trouble

When I call my function, the game chokes up a bit, then nothing happens. No error in console/server, and players skin remains the same. :confused:

[lua]function SetTeamSkin( pl )

if pl:Team() == 1 then  
	pl:SetMaterial("materials/models/Actinium/Antimony") 
	pl:PrintMessage( HUD_PRINTTALK, "Orange")

elseif pl:Team() == 2 then 
	pl:SetMaterial("materials/models/Actinium/Argon")
	pl:PrintMessage( HUD_PRINTTALK, "Green")
	
elseif pl:Team() == 3 then 
    pl:SetMaterial("materials/models/Actinium/Aluminum")
	pl:PrintMessage( HUD_PRINTTALK, "Red")

elseif pl:Team() == 4 then 
	pl:SetMaterial("materials/models/Actinium/Americium")
	pl:PrintMessage( HUD_PRINTTALK, "Blue")

end 

end [/lua]

(oh and the PrintMessages are there just to check if the function is being called properly… which it is…)

Any Ideas?

Edit : Wrong thread

Try using materials without “materials/” ant the beginning, so it becomes pl:SetMaterial(“models/Actinium/Aluminum”) . This might help. Make sure that material exist on disk.

EDIT: Nvm, do what kna_rus says:

ooops! completely forgot about that…

[editline]07:58PM[/editline]

Ok, now I get

“Material models/actinium/antimony does not support vertex format used by the mesh (maybe missing fields or mismatched vertex compression?), mesh will not be rendered. Grab a programmer!”

What does that mean? How do I fix that…

[editline]08:31PM[/editline]

Fixed

My vmt’s were “LightmappedGeneric”, changed them to “VertexlitGeneric”

Works fine. Thanks guys.

Ok, its working… but when the player dies, it reverts to the models default skin, Is there a way around that?