Attach3DTextLabelToVehicle

From SA-MP Wiki

Jump to: navigation, search

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.


Parameters:
(Text3D:id, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ)
Text3D:idThe 3D Text Label you want to attach.
vehicleidThe vehicle you want to attach the 3D Text Label to.
OffsetXThe Offset-X coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0)..
OffsetYThe Offset-Y coordinate of the player vehicle (the vehicle is 0.0,0.0,0.0)..
OffsetZThe 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.


Personal tools
In other languages