A simple question. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: A simple question. (
/showthread.php?tid=130466)
A simple question. -
MrIncredible - 27.02.2010
look this means to set the player's colour ? right ?
SetplayerColor(palyerid)
How about
SetPlayerMarker ?
And how to make some one to havea invisible colour in the radar ? but with a specific color when he talks ?
Re: A simple question. -
Babul - 27.02.2010
the color formats are stored in 24 bits. 8 bits (256 variations) for each channel: R(ed), G(reen), B(lue) and the A(lpha).
if you want to set the color of a player, you will get used to write them as hex notation, f.ex:
0xRR GG BB AA
0f=(2^4)-1=15
ff=(2^
-1=255
Код:
0xffffffff // thats white (255 red, 255 green, 255 blue and 255 alpha (opacity)), so its fully visible on radar
if you modify the last 2 characters of the value (0xffffffff) to 0x00, then the blip on radar will change to full transparency:
0xffffff00 // white in chat, not visible on radar.
0xff0000ff // full visible red (R=255, G=0, B=0, A=255) in chat and radar
0x00ff00ff // green in chat and radar
you know that problem: 2 blips are at the same position, and the recently drawn overlays the other. so a green blip could overdraw a red one, so the red changes to invisible... how to solve that? simply set the alpha (transluency) to 0x7f:
Код:
0xff00007f
0x00ff007f
those 2 colors, filtered with the alpha value 0x7f (127), will add the half of each content and mix to a dark yellow:
thats the resulting color as it will be displayed at the radar.
i figured out an alpha value of 0xbf (191) is good for all player colors, it dosnt harm the chat color at all, almost forgot to mention that...
Re: A simple question. -
MrIncredible - 27.02.2010
Oo0o0o0o now i get it ! Thanks map .. i just have to change them ... Thanks a lot !
Re: A simple question. -
Babul - 27.02.2010
iam glad it helped you a bit ^^