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

[SOLVED] Sprite color


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 08-15-2015 , 04:50   [SOLVED] Sprite color
Reply With Quote #1

Hello! I want to create a Trail Plugin for CSGO, i use this code:

PHP Code:
stock CreateTrail clienttexturergbalphaFloatsize ) {

    if ( !
texture )
        return;

    new 
entityToFollow GetPlayerWeaponSlot(client2);
    if (
entityToFollow == -1)
        
entityToFollow client;

    new 
TempColorArray ];
    
TempColorArray ] = r;
    
TempColorArray ] = g;
    
TempColorArray ] = b;
    
TempColorArray ] = alpha;

    
TE_SetupBeamFollow(entityToFollow,
                        
texture,
                        
0,
                        
1.0,
                        
size,
                        
size,
                        
1,
                        
TempColorArray);
    
TE_SendToAll();


Good, i have RGB and Alpha, but i don't want to set color, i have this sprite:


And is already colored, how to type in code without set color ?
Thank you !

Last edited by hadesownage; 08-15-2015 at 05:53. Reason: Solved
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
KissLick
Veteran Member
Join Date: Nov 2012
Location: void
Old 08-15-2015 , 04:56   Re: Sprite color
Reply With Quote #2

try all set to 255
KissLick is offline
TheUnderTaker
Senior Member
Join Date: Dec 2013
Location: Israel
Old 08-15-2015 , 04:56   Re: Sprite color
Reply With Quote #3

Can you explain a bit more please?
__________________
SourcePawn, C# and C++ Programmer.

My plugin list
TheUnderTaker is offline
m_bNightstalker
Senior Member
Join Date: Jan 2015
Location: JWD
Old 08-15-2015 , 05:02   Re: Sprite color
Reply With Quote #4

Quote:
Originally Posted by KissLick View Post
try all set to 255
as he said, set r,g,b&alpha too 255

if you set all to 255 but red channel to 0 it will "remove"/not display the red colors which mean the fire would look green/blue but with less intense.
m_bNightstalker is offline
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 08-15-2015 , 05:42   Re: Sprite color
Reply With Quote #5

Good, i puted 255, 255, 255, 255 and with "fire sprite" isn't showing, probably is a problem in stock.
I tired with another sprite (dollar sprite) and i got this:

Image

How to remove the white parts ? I want only to show the "dollars".

Last edited by hadesownage; 08-15-2015 at 05:43.
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
Miu
Veteran Member
Join Date: Nov 2013
Old 08-15-2015 , 05:45   Re: Sprite color
Reply With Quote #6

your sprite looks like it doesn't have transparency
Miu is offline
hadesownage
AlliedModders Donor
Join Date: Jun 2013
Location: Romania, Iași
Old 08-15-2015 , 05:53   Re: Sprite color
Reply With Quote #7

Yes, you're right. I solved with another sprite !
Thank you for all !
hadesownage is offline
Send a message via Yahoo to hadesownage Send a message via Skype™ to hadesownage
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 01:40.


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