SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 16/09/2019, 09:37 PM   #1
Admireal
Big Clucker
 
Join Date: Sep 2016
Posts: 100
Reputation: 5
Default I need int color convert transparent color function

I need int color convert transparent color function
Example
0xAFAFAFFF to 0xAFAFAF77 converter

Last edited by Admireal; 17/09/2019 at 12:24 PM.
Admireal is offline   Reply With Quote
Old 17/09/2019, 02:59 AM   #2
Cromartie
Little Clucker
 
Cromartie's Avatar
 
Join Date: Oct 2018
Location: BRASIL
Posts: 36
Reputation: 7
Default Re: I need int color convert transparent color function

0xAFAFAF00 = Full transparent
Cromartie is offline   Reply With Quote
Old 17/09/2019, 12:24 PM   #3
Admireal
Big Clucker
 
Join Date: Sep 2016
Posts: 100
Reputation: 5
Default Re: I need int color convert transparent color function

I need function
Admireal is offline   Reply With Quote
Old 17/09/2019, 03:07 PM   #4
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 674
Reputation: 110
Default Re: I need int color convert transparent color function

https://wiki.sa-mp.com/wiki/Color_list#Doing_math
more specifically, this line:
pawn Code:
newcolor = (oldcolor & ~0xFF) | alpha;
Calisthenics is offline   Reply With Quote
Old 18/09/2019, 09:12 AM   #5
Admireal
Big Clucker
 
Join Date: Sep 2016
Posts: 100
Reputation: 5
Default Re: I need int color convert transparent color function

Thanks!
Admireal is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparent Color? UserName31 Scripting Help 2 09/08/2014 11:09 PM
Convert HSV color tu RBG xX_Simon_Xx Scripting Help 1 18/07/2012 11:20 PM
Photoshop glass/transparent color DRIFT_HUNTER Everything and Nothing 3 16/05/2011 12:14 PM
How to convert HEX to SAMP color ? RaFsTar Help Archive 10 16/01/2011 11:00 AM
transparent color 02manchestera Help Archive 2 02/04/2010 05:56 PM


All times are GMT. The time now is 06:11 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.