Alt TextLabel api has two issues. One that I i did not created any TextLabels it still gets some unknown labels (Alt.GetAllTextLabels and if you remove and create text label it takes used label id it could be the main issue with those Random created labels. I made this with VirtualEntity on streamIn StreamOut
Create label:
ITextLabel textLabel = Alt.CreateTextLabel($"iNFO {InfoData}", "Arial", 30, 1, entity.Position, new Rotation(0,0,0), new Rgba(255, 255, 180, 180), 0, new Rgba(0, 0, 0, 0), false, 0);
textLabel.IsFacingCamera = true;
Alt.Log($"Created TextLabel Id {textLabel.Id} | Remote: {textLabel.RemoteId}");
entity.SetMetaData("LabelId", textLabel.Id);
Remove label:
entity.GetMetaData("LabelId", out uint lebelId);
Alt.Log($"Remove Text Label {lebelId}");
foreach (ITextLabel label in Alt.GetAllTextLabels())
{
Alt.Log($"label Id {label.Id} | Remote: {label.RemoteId}");
if(label.Id == lebelId)
{
label.Destroy();
Alt.Log($"REMOVED");
}
}
For example after game launched i entered streaming range of virtualentity and created label then exit streaming range and removed label, but it stayed visible and logs can tell there is more labels that i did not created
When i try to create again it gives ID 2 and still on exit it wont remove label from game.
Alt TextLabel api has two issues. One that I i did not created any TextLabels it still gets some unknown labels (Alt.GetAllTextLabels and if you remove and create text label it takes used label id it could be the main issue with those Random created labels. I made this with VirtualEntity on streamIn StreamOut
Create label:
Remove label:
For example after game launched i entered streaming range of virtualentity and created label then exit streaming range and removed label, but it stayed visible and logs can tell there is more labels that i did not created
When i try to create again it gives ID 2 and still on exit it wont remove label from game.