Zum Hauptinhalt springen

Attach3DTextLabelToVehicle

Description

Attaches a 3D Text Label to a specific vehicle.

NameDescription
Text3D:textidThe 3D Text Label you want to attach.
parentidThe vehicle you want to attach the 3D Text Label to.
Float:offsetXThe Offset-X coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0).
Float:offsetYThe Offset-Y coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0).
Float:offsetZThe Offset-Z coordinate of the player vehicle (the vehicle is 0.0, 0.0, 0.0).

Returns

This function does not return any specific values.

Examples

new
Text3D:gVehicle3dText[MAX_VEHICLES], // Creating the TextLabel for later use
gVehicleId;

public OnGameModeInit()
{
gVehicleId = CreateVehicle(510, 0.0, 0.0, 15.0, 5, 0, 120); // Creating the Vehicle.
gVehicle3dText[gVehicleId] = Create3DTextLabel("Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1);
Attach3DTextLabelToVehicle(gVehicle3dText[gVehicleId], gVehicleId, 0.0, 0.0, 2.0); // Attaching Text Label To Vehicle.
return 1;
}

public OnGameModeExit()
{
Delete3DTextLabel(gVehicle3dText[gVehicleId]);
return 1;
}