Attaching 3D Text Labels with Incognitos Streamer -
Giovanni - 28.12.2011
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.
Re: Attaching 3D Text Labels with Incognitos Streamer -
Sasino97 - 28.12.2011
Any compiler errors?
AW: Re: Attaching 3D Text Labels with Incognitos Streamer -
Giovanni - 28.12.2011
Quote:
Originally Posted by [GF]Sasino97
Any compiler errors?
|
No, there aren't.
Re: Attaching 3D Text Labels with Incognitos Streamer -
Ash. - 28.12.2011
What is in the variable called "vehiclestring"?
Respuesta: Attaching 3D Text Labels with Incognitos Streamer -
Sharingan... - 28.12.2011
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]);
Re: Respuesta: Attaching 3D Text Labels with Incognitos Streamer -
Ash. - 28.12.2011
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.
AW: Re: Attaching 3D Text Labels with Incognitos Streamer -
Giovanni - 29.12.2011
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!