warning Not Translated
This page has not been translated into the language that your browser requested yet. The English content is being shown as a fallback.
If you want to contribute a translation for this page then please click here.
TextDrawGetPreviewVehCol
warning
This function was added in omp v1.1.0.2612 and will not work in earlier versions!
Description
Gets the preview vehicle colors of a 3D preview textdraw.
Name | Description |
---|---|
Text:textid | The ID of the textdraw to get the vehicle colors of. |
&colour1 | A variable into which to store the colour1, passed by reference. |
&colour2 | A variable into which to store the colour2, passed by reference. |
Examples
new Text:gMyTextdraw;
public OnGameModeInit()
{
gMyTextdraw = TextDrawCreate(320.0, 240.0, "_");
TextDrawFont(gMyTextdraw, TEXT_DRAW_FONT_MODEL_PREVIEW);
TextDrawUseBox(gMyTextdraw, true);
TextDrawBoxColor(gMyTextdraw, 0x000000FF);
TextDrawTextSize(gMyTextdraw, 40.0, 40.0);
TextDrawSetPreviewModel(gMyTextdraw, 411);
TextDrawSetPreviewVehCol(gMyTextdraw, 6, 8);
new colour1, colour2;
TextDrawGetPreviewVehCol(gMyTextdraw, colour1, colour2);
// colour1 = 6
// colour2 = 8
return 1;
}
Related Functions
- TextDrawSetPreviewModel: Set the 3D preview model of a textdraw.
- TextDrawSetPreviewRot: Set rotation of a 3D textdraw preview.
- TextDrawFont: Set the font of a textdraw.
Related Callbacks
- OnPlayerClickTextDraw: Called when a player clicks on a textdraw.