Attach3DTextLabelToVehicle
From SA-MP Wiki
Attach3DTextLabelToVehicle
Warning: This function was added in SA-MP version 0.3. It is not available in previous versions.
Attaches a 3D Text Label to a specific vehicle.
(Text3D:id, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
| Text3D:id | The 3D Text Label you want to attach. |
| vehicleid | The vehicle you want to attach the 3D Text Label to. |
| OffsetX | The Offset-X coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0).. |
| OffsetY | The Offset-Y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0).. |
| OffsetZ | The Offset-Z coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0).. |
This function does not return a specific value.
public OnGameModeInit ( ) { new vehicle_id, Text3D:vehicle3Dtext; //Creating TextLabel vehicle3Dtext = Create3DTextLabel( "Example Text", 0xFF0000AA, 0.0, 0.0, 0.0, 50.0, 0, 1 ); //Creating the Vehicle vehicle_id = CreateVehicle( 510, 0.0. 0.0, 15.0, 5, 0, 120 ); //Attaching Text Label To Vehicle Attach3DTextLabelToVehicle( vehicle3Dtext, vehicle_id, 0.0, 0.0, 2.0); }
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- Create3DTextLabel: Creates a 3D Text Label.
- Delete3DTextLabel: Destroys a specific 3D Text Label.
- Attach3DTextLabelToPlayer: Attaches a 3D Text Label to a specific player.
- Update3DTextLabelText: Changes a 3D Text Label.
- CreatePlayer3DTextLabel: Creates a 3D Text Label for a specific player.
- DeletePlayer3DTextLabel: Destroys a 3D Text Label for a specific player.
- UpdatePlayer3DTextLabelText: Changes a 3D Text Label for a specific player.
