SA-MP Forums Archive
Attaching CreateDynamic3DLabelText to the vehicle - 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: Attaching CreateDynamic3DLabelText to the vehicle (/showthread.php?tid=528478)



Attaching CreateDynamic3DLabelText to the vehicle - Vlad_Dredd - 28.07.2014

How to attach the CreateDynamic3DLabelText into the car?
And I like that stuck and it does not show.


Re: Attaching CreateDynamic3DLabelText to the vehicle - BroZeus - 28.07.2014

see this carefully
pawn Код:
Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
for example u want to attach text label to say car id 1
so it will be like this
Quote:

CreateDynamic3DTextLabel(text[], color, x, y,z, drawdistance, INVALID_PLAYER_ID, 1);




Re: Attaching CreateDynamic3DLabelText to the vehicle - Threshold - 28.07.2014

Код:
native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
Notice the 'attachedvehicle' parameter, this is the value in which the label will be attached per vehicle id.

Example:
pawn Код:
new car = CreateVehicle(411, 1000.0, 2000.0, 40.0, 90.0, 0, 0, -1);
CreateDynamic3DTextLabel("My Car", 0xFF0000FF, 0.0, 0.0, 0.0, 20.0, .attachedvehicle = car);
Will attach a red text label saying "My Car" to the vehicle with the id saved in 'car'.

So CreateVehicle(model, x, y, z, drawdistance, .attachedvehicle = yourvehicleidhere);


Re: Attaching CreateDynamic3DLabelText to the vehicle - Vlad_Dredd - 28.07.2014

Thank you very much!