SA-MP Forums Archive
Mixed 3D Text Labels - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Mixed 3D Text Labels (/showthread.php?tid=536462)



Mixed 3D Text Labels - ranme15 - 09.09.2014

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


Re: Mixed 3D Text Labels - MikeEd - 09.09.2014

we cant help you without any code


Re: Mixed 3D Text Labels - ranme15 - 09.09.2014

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.


Re: Mixed 3D Text Labels - MikeEd - 09.09.2014

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

How is PNL retrieved?


Re: Mixed 3D Text Labels - ranme15 - 09.09.2014

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.


Re: Mixed 3D Text Labels - MikeEd - 09.09.2014

Its right if its on OnGameModeInit

Show your eInfo Enum.


Re: Mixed 3D Text Labels - ranme15 - 09.09.2014

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



Re: Mixed 3D Text Labels - Pottus - 09.09.2014

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


Re: Mixed 3D Text Labels - Vince - 09.09.2014

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.


Re: Mixed 3D Text Labels - ranme15 - 10.09.2014

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