[Bug] CreateMarker

Started by Pun1sh3r, Dec 30, 2020, 12:59 AM

Previous topic - Next topic

Pun1sh3r

Description
Create a Marker with Marker ID 0 and with a RED or any other Color and it wont always have the correct set Color.

Reproducible
Sometimes

What you were doing when the bug happened
Testing

What you think caused the bug
I guess the Color is mixed up? If you set RED Color RGB(255,0,0) then it will sometimes have Pink Color, if you set RGB(242, 125, 253) it will have sometimes White Color

Example Code:
local Marker1 = -1;
local Count = 0;
if(cmd == "marker")
{
if(Count == 0)
{
if(Marker1 != -1)
{
DestroyMarker(Marker1);
Marker1 = -1;
}
Marker1 = CreateMarker(player.UniqueWorld, Vector(496.481, -84.883, 10.0304), 4, RGB(242, 125, 253), 0);
ClientMessage("0: Marker Created!", player, 255, 255, 255);
Count = 1;
}
else if(Count == 1)
{
if(Marker1 != -1)
{
DestroyMarker(Marker1);
Marker1 = -1;
}
Marker1 = CreateMarker(player.UniqueWorld, Vector(480.481, -70.883, 10.0304), 4, RGB(242, 125, 253), 0);
ClientMessage("1: Marker Created!", player, 255, 255, 255);
Count = 0;
}
return 1;
}

AdTec_224

As far as I'm aware it's not a bug, you're just not using the function correctly. It's RGBA not RGB, so the correct line of code for a red marker should be:

CreateMarker(player.UniqueWorld, Vector(496.481, -84.883, 10.0304), 4, RGBA(255, 0, 0, 255), 0);

Pun1sh3r

Quote from: AdTec_224 on Dec 30, 2020, 01:59 AMAs far as I'm aware it's not a bug, you're just not using the function correctly. It's RGBA not RGB, so the correct line of code for a red marker should be:

CreateMarker(player.UniqueWorld, Vector(496.481, -84.883, 10.0304), 4, RGBA(255, 0, 0, 255), 0);

Seems to be working without any Bugs, thanks for your Help! Took the example from Thijn Wiki and it's there with RGB only.

Does ARGB also works or only RGBA?

rww

Quote from: Pun1sh3r on Dec 31, 2020, 05:12 PM
Quote from: AdTec_224 on Dec 30, 2020, 01:59 AMAs far as I'm aware it's not a bug, you're just not using the function correctly. It's RGBA not RGB, so the correct line of code for a red marker should be:

CreateMarker(player.UniqueWorld, Vector(496.481, -84.883, 10.0304), 4, RGBA(255, 0, 0, 255), 0);

Seems to be working without any Bugs, thanks for your Help! Took the example from Thijn Wiki and it's there with RGB only.

Does ARGB also works or only RGBA?

If i remember, Thijn wiki is outdated, use this -> http://wiki.adtec.ovh/
Join to Irrelevant Club Discord: https://discord.gg/MsPPZ5uV4X