This topic was marked solved by its starter, on January 1st, 04:11 PM
« [BUG/CRASH] Build Mode
[Bug] CreateMarker

Pun1sh3r

  • Wiki Contributor
  • Posts: 30
[Bug] CreateMarker
«  »
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:
Code: [Select]
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

  • LU Developer
  • Posts: 30
[Bug] Re: CreateMarker
« Reply #1,  »
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:

Code: [Select]
CreateMarker(player.UniqueWorld, Vector(496.481, -84.883, 10.0304), 4, RGBA(255, 0, 0, 255), 0);

Pun1sh3r

  • Wiki Contributor
  • Posts: 30
[Bug] Re: CreateMarker
« Reply #2,  »
Quote from AdTec_224 on December 30th, 2020, 01:59 AM
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:

Code: [Select]
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

  • VC:MP Beta Tester
  • LU-DM Team
  • Posts: 405
[Bug] Re: CreateMarker
« Reply #3,  »
Quote from Pun1sh3r on December 31st, 2020, 05:12 PM
Quote from AdTec_224 on December 30th, 2020, 01:59 AM
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:

Code: [Select]
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 LU-DM Team Discord: https://discord.gg/PFwem6J