Need urgent help.
#1

Hello there, I've been struggling for a while now to fix this issue, and I don't know if this issue is my fault or the plugin's fault. So I'll put it simple - I use both Create3DTextLabels and CreateDynamic3DTextLabels. Now before you say anything, I want to explain something;

- I have an AFK system, where every second, the text label created over a player's head is updated with the time he's been AFK. It uses regular Create3DTextLabels.
- If I use CreateDynamic3DTextLabels on the AFK labels, then other labels, which are created straight from my gamemode (OnGameModeInit), disappear over time.

I have a feeling that their ID's get mixed up somehow, and the wrong ones get deleted when I destroy the AFK labels.

So basically I use both of them and they minimally disappear, but they still do. I was wondering if anyone has had a similar issue and are willing to give me a fix.
Reply
#2

You should only use dynamic label since you are using streamer plugin. Mix those two types is a very bad idea. Why? Simply because you need to use differents functions for each type. You will agree that having only one type is simpler.
If your labels doesn't dispear when they should, they doesn't get edit anymore or stuff like that is completly "your fault". By that, I mean IDs are mixed. It certainly due to a bad system architecture. Often, people do an array with 1 dimension for storing label's id, an another for label color, etc.. which, often, lead to this kind of problems. "enum" are made to group related "variables".
Reply
#3

I think the problem is that you are using them both, you shouldn't it happened with me once on createobject and create dynamicobject half object got removed itself, so use one of them Create3DTextLabels or CreateDynamic3DTextLabels, this might fix your problem.

edit: oops, too late
Reply
#4

Thanks for the answers guys, but I already explained that I tried using ONLY the dynamic labels, and the problem was even worse than it is right now with using both of them. The system architecture isn't bad, I use this function

Quote:

DestroyLabel(&STREAMER_TAG_3D_TEXT_LABEL id)
{
new label = DestroyDynamic3DTextLabel(id);
id = INVALID_DYNAMIC_3D_TEXT_ID;
return label;
}

To delete the labels, and after this I also set the variable to INVALID_DYNAMIC_3D_TEXT_ID, which is defiend as

Quote:

#define INVALID_DYNAMIC_3D_TEXT_ID STREAMER_TAG_3D_TEXT_LABEL INVALID_STREAMER_ID

Maybe it has something to do with the AFK labels being constantly deleted/created, as if people go AFK and come back really quick, it can mix something up with the streamer update rate? Thanks in advance
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)