Attaching 3D Text Labels with Incognitos Streamer
#1

I somehow can't get this stuff working.
I load all my vehicles out of text files, that all works fine. But I somehow can not attach 3D Text Labels to them. In my code I got following line:

pawn Код:
VehicleInfo[idx][vLabel] = CreateDynamic3DTextLabel(vehiclestring,c_red,0.0,0.0,0.0,40.0,INVALID_PLAYER_ID,VehicleInfo[idx][vID]);
The last parameter of CreateDynamic3DTextLabel which I used is for the vehicle you want to attach the label to.

Those vehicles are being created a bit earlier with following line:

pawn Код:
VehicleInfo[idx][vID] = CreateVehicle( ... )

I am kind of stuck right now and I don't really know what I am doing wrong.
Reply
#2

Any compiler errors?
Reply
#3

Quote:
Originally Posted by [GF]Sasino97
Посмотреть сообщение
Any compiler errors?
No, there aren't.
Reply
#4

What is in the variable called "vehiclestring"?
Reply
#5

Maybe because it's under the car, try to putting a little height with the z coord. Like this:
pawn Код:
VehicleInfo[idx][vLabel] = CreateDynamic3DTextLabel(vehiclestring,c_red,0.0,0.0,0.8,40.0,INVALID_PLAYER_ID,VehicleInfo[idx][vID]);
Reply
#6

Quote:
Originally Posted by Sharingan...
Посмотреть сообщение
Maybe because it's under the car, try to putting a little height with the z coord. Like this:
pawn Код:
VehicleInfo[idx][vLabel] = CreateDynamic3DTextLabel(vehiclestring,c_red,0.0,0.0,0.8,40.0,INVALID_PLAYER_ID,VehicleInfo[idx][vID]);
The x, y, and z co-ordinates are irrelevant when attaching text labels to players or vehicles.
Also, even if it were "under the car", they'd still be visible as text labels are visible through vehicles, whether testlos is enabled or not.
Reply
#7

Quote:
Originally Posted by funky1234
Посмотреть сообщение
What is in the variable called "vehiclestring"?
It just shows informations about the vehicle, like the owner etc.:

pawn Код:
format(vehiclestring,sizeof(vehiclestring),"Owner: %s",VehicleInfo[idx][vOwner]);


Edit:

I have found the bug. The part where this code was located didn't get fully loaded (some parts, but not all of them). I have fixed this now.


Thanks for your fast help though, I really appreciate that!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)