View Single Post
desert420
Junior Member
Join Date: May 2009
Old 05-10-2012 , 20:04   Re: Wearable Item's Invisible
Reply With Quote #5

Here is my code that isnt working for wearable items.


// Colorize any wearable items
for (new i=MaxClients+1; i <= maxents; i++)
{
if(!IsValidEntity(i)) continue;

decl String:netclass[32];
GetEntityNetClass(i, netclass, sizeof(netclass));

if(strcmp(netclass, "tf_wearable") == 0)
{
if(GetEntDataEnt2(i, g_wearableOffset) == client)
{
SetEntityRenderMode(i, RENDER_TRANSCOLOR);
SetEntityRenderColor(i, color[0], color[1], color[2], color[3]);
SetEntityRenderMode(client, RENDER_TRANSCOLOR);
SetEntityRenderColor(client, color[0], color[1], color[2], color[3]);
}
}
if(strcmp(netclass, "tf_wearable_demoshield") == 0)
{
if(GetEntDataEnt2(i, g_shieldOffset) == client)
{
SetEntityRenderMode(i, RENDER_TRANSCOLOR);
SetEntityRenderColor(i, color[0], color[1], color[2], color[3]);
SetEntityRenderMode(client, RENDER_TRANSCOLOR);
SetEntityRenderColor(client, color[0], color[1], color[2], color[3]);
}
}
}

Last edited by desert420; 05-11-2012 at 19:24.
desert420 is offline