Mixed 3D Text Labels
#1

Hey,

I've built a gamemode which uses 3d text labels (tens for now).
For some reason, it started mixing up between each other..
I am not using a streamer, is that the problem?
(My server has like 20~30 3d texts now, just for testing)

Thanks
Reply
#2

we cant help you without any code
Reply
#3

Quote:
Originally Posted by MikeEd
Посмотреть сообщение
we cant help you without any code
I don't think it has anything with the code, since whenever a 3D Text Label has been created, an object should be too.(And the objects are fine).
However, here's a taste:
PHP код:
    eInfo[PNL][Object] = CreateObject(9622720.24146, -2498.8347214.1531090.00000, -90.00000359.95258);
    
eInfo[PNL][Label] = Create3DTextLabel("PANEL"0x008080FF2720.24146, -2498.8347214.1531040.00);
    
eInfo[ID][Object] = CreateObject(32672838.5977, -2448.201219.9220-1.30.00.00.0);
    
eInfo[ID][Label] = Create3DTextLabel("ID"0x008080FF2838.5977, -2448.201219.922040.00);
    
vData[v][Vehicle] = CreateVehicle(vData[v][VehID], vData[v][VehX], vData[v][VehY], vData[v][VehZ], vData[v][Angle], random(2), random(2), -1);
    
vData[v][Label] = Create3DTextLabel(string0x008080FF,  vData[v][VehX], vData[v][VehY], vData[v][VehZ], 40.000);
    
jData[j][ObjID] = CreateObject(GearObjects[jData[j][Item]], jData[j][ItemX], jData[j][ItemY], jData[j][ItemZ]-0.80.00.00.0);
    
jData[j][Label] = Create3DTextLabel(string0x008080FF,  jData[j][ItemX], jData[j][ItemY], jData[j][ItemZ]-0.640.000); 
(This is not the real order, just mixed them up)

By the way, sometimes one text disappears, and another replaces it.
Reply
#4

Thier shouldn't be any problem with 20-30 Labels, try adding debugging messages?

How is PNL retrieved?
Reply
#5

Quote:
Originally Posted by MikeEd
Посмотреть сообщение
Thier shouldn't be any problem with 20-30 Labels, try adding debugging messages?

How is PNL retrieved?
I already tried, it usually happens when I reload the 3d texts (delete & remake).

What do you mean by retrieved? it has been written at OnGameModeInIt though.
Reply
#6

Its right if its on OnGameModeInit

Show your eInfo Enum.
Reply
#7

PHP код:
enum eBaseInfo
{
    
GangZone,
    
PNL[cPNL],
    
ID[IDInfo],
    
Owner[64]
}
new 
eInfo[eBaseInfo]; 
Reply
#8

This is actually normal with 3d text labels they are pretty buggy you should really use the streamer plugin that should fix these issues.
Reply
#9

The only advice I can give is to initialize such variables with their invalid state, e.g. INVALID_3DTEXT_ID. Likewise, when destroying the label, reset the variable with aforementioned value.
Reply
#10

Quote:
Originally Posted by Pottus
Посмотреть сообщение
This is actually normal with 3d text labels they are pretty buggy you should really use the streamer plugin that should fix these issues.
Can you suggest me a good streamer? shall I use Icognito's?
Quote:
Originally Posted by Vince
Посмотреть сообщение
The only advice I can give is to initialize such variables with their invalid state, e.g. INVALID_3DTEXT_ID. Likewise, when destroying the label, reset the variable with aforementioned value.
Eh, tried something, didn't work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)