Raised This Month: $51 Target: $400
 12% 

SetEntityRenderColor with RPG or map


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Clamouzes
Junior Member
Join Date: May 2013
Old 12-16-2015 , 08:43   SetEntityRenderColor with RPG or map
Reply With Quote #1

Hi,

Today i have an errors, i create small plugin for color the player but if RPG is active or maps with invisibily, the color don't work and player are invisible.

PHP Code:
SetEntityRenderColor(client255000); 
With rpg or also : (Red bar is HP)

http://puu.sh/lXENY/979ce32ad7.jpg

with not rpg : (Red bar is HP)

http://puu.sh/lXEQt/f700c25fed.jpg

I need you, bye.
Clamouzes is offline
sdz
Senior Member
Join Date: Feb 2012
Old 12-17-2015 , 03:19   Re: SetEntityRenderColor with RPG or map
Reply With Quote #2

PHP Code:
stock SetEntityRenderColor(entityr=255g=255b=255a=255
This:
PHP Code:
SetEntityRenderColor(client255000); 

should be

PHP Code:
SetEntityRenderColor(client25500255); 
A = Alpha, it's how translucent(?) the entity is. (How visible it would be, so to speak.)

Last edited by sdz; 12-17-2015 at 03:20.
sdz is offline
Clamouzes
Junior Member
Join Date: May 2013
Old 12-18-2015 , 12:30   Re: SetEntityRenderColor with RPG or map
Reply With Quote #3

I try and it's okay

But i have a new problem, if player is invisible ? If he choose colors, he not invisible.

You see the color but not invisible, you have a solution for me ?

Ty in advance
Clamouzes is offline
Addicted.
AlliedModders Donor
Join Date: Dec 2013
Location: 0xA9D0DC
Old 12-18-2015 , 17:22   Re: SetEntityRenderColor with RPG or map
Reply With Quote #4

Don't let invisible players pick colors?
Addicted. is offline
Miu
Veteran Member
Join Date: Nov 2013
Old 12-18-2015 , 17:40   Re: SetEntityRenderColor with RPG or map
Reply With Quote #5

Set alpha to 255 if you want them to be visible and 0 if not
Miu is offline
Clamouzes
Junior Member
Join Date: May 2013
Old 12-19-2015 , 09:39   Re: SetEntityRenderColor with RPG or map
Reply With Quote #6

I need if player are stealth in rpg he are stealth with color how i can do this ?
Clamouzes is offline
Peace-Maker
SourceMod Plugin Approver
Join Date: Aug 2008
Location: Germany
Old 12-19-2015 , 12:39   Re: SetEntityRenderColor with RPG or map
Reply With Quote #7

You need to modify both plugins to not touch the alpha when you only want to change the color and the other way around to leave the color alone when you want to change the alpha.

smlib has a stock for that. Just pass -1 if you don't want to change the value.
__________________
Peace-Maker is offline
Clamouzes
Junior Member
Join Date: May 2013
Old 12-21-2015 , 08:54   Re: SetEntityRenderColor with RPG or map
Reply With Quote #8

PHP Code:
public Action:Timer_Marron(Handle:timerclient)
{    
    
int color[4];
    
Entity_GetRenderColor(clientcolor);
    
Entity_SetRenderColor(client51250color[3]);

I use that with timer_repeat for save when player is dead, but alpha changed ! with other alpha i don't understand.

PHP Code:
public Action:Command_marron(clientargs)
    {
        
g_marron[client] = CreateTimer(10Timer_MarronclientTIMER_REPEAT);
        
Client_SetThirdPersonMode(clienttrue);
        
g_3rd[client] = CreateTimer(2.0Timer_3rdclient);
    } 
Clamouzes 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 00:07.


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