Raised This Month: $ Target: $400
 0% 

SetEntityRenderColor TF2 Alpha


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 07-16-2008 , 03:35   SetEntityRenderColor TF2 Alpha
Reply With Quote #1

Im trying to use SetEntityRenderColor to set the alpha on a player to make them invisible. It the Alpha thing doesnt seem to do anything at all, can anyone offer any suggestions on this?
Arg! is offline
GManNickG
Junior Member
Join Date: Feb 2008
Old 07-16-2008 , 09:28   Re: SetEntityRenderColor TF2 Alpha
Reply With Quote #2

Code:
    SetEntityRenderMode(client, RENDER_TRANSCOLOR);
    SetEntityRenderColor(client, 255, 255, 255, 128);
Those lines, 128 is the alpha. Here's what I used to restore:

Code:
    SetEntityRenderMode(client, RENDER_NORMAL);
    SetEntityRenderColor(client, 255, 255, 255, 255);
GManNickG is offline
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 07-16-2008 , 19:01   Re: SetEntityRenderColor TF2 Alpha
Reply With Quote #3

why thank you ill test this out!
Arg! is offline
Arg!
Veteran Member
Join Date: Jul 2008
Location: Australia
Old 07-22-2008 , 20:35   Re: SetEntityRenderColor TF2 Alpha
Reply With Quote #4

This works wonderfully by the way.
__________________
Arg! is offline
blade81
Senior Member
Join Date: Apr 2005
Old 08-04-2008 , 06:47   Re: SetEntityRenderColor TF2 Alpha
Reply With Quote #5

Hi, i've tried this on css and the alpha thing doesn't work. How can i change alpha on css?
__________________
blade81 is offline
Greyscale
SourceMod Plugin Approver
Join Date: Dec 2007
Location: strYoMommasHouse[you];
Old 08-04-2008 , 12:19   Re: SetEntityRenderColor TF2 Alpha
Reply With Quote #6

Quote:
Originally Posted by GManNickG View Post
Code:
    SetEntityRenderMode(client, RENDER_TRANSCOLOR);
    SetEntityRenderColor(client, 255, 255, 255, 128);
Those lines, 128 is the alpha. Here's what I used to restore:

Code:
    SetEntityRenderMode(client, RENDER_NORMAL);
    SetEntityRenderColor(client, 255, 255, 255, 255);
Works in CSS

Straight from serverdefense:

Code:
new red = GetConVarInt(cvarSPRed);
        new green = GetConVarInt(cvarSPGreen);
        new blue = GetConVarInt(cvarSPBlue);
        new alpha = GetConVarInt(cvarSPAlpha);
        
        SetEntityRenderMode(index, RENDER_TRANSCOLOR);
        SetEntityRenderColor(index, red, green, blue, alpha);
Works perfect
__________________
Greyscale is offline
blade81
Senior Member
Join Date: Apr 2005
Old 08-09-2008 , 11:15   Re: SetEntityRenderColor TF2 Alpha
Reply With Quote #7

@ Grey
you were right it was my fault. I used thirdperson perspective to check it out but changing alpha has no effect to thirdperson.
__________________
blade81 is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode