Ana içeriğe geç

PlayerTextDrawGetPreviewVehCol

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 player-textdraw.

NameDescription
playeridThe ID of the player.
PlayerText:textidThe ID of the player-textdraw to get the vehicle colors of.
&colour1A variable into which to store the colour1, passed by reference.
&colour2A variable into which to store the colour2, passed by reference.

Examples

new PlayerText:pTextdraw[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
pTextdraw[playerid] = CreatePlayerTextDraw(playeird, 320.0, 240.0, "_");
PlayerTextDrawFont(playerid, pTextdraw[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, pTextdraw[playerid], true);
PlayerTextDrawBoxColor(playerid, pTextdraw[playerid], 0x000000FF);
PlayerTextDrawTextSize(playerid, pTextdraw[playerid], 40.0, 40.0);
PlayerTextDrawSetPreviewModel(playerid, pTextdraw[playerid], 411);
PlayerTextDrawSetPreviewVehCol(playerid, pTextdraw[playerid], 6, 8);

new colour1, colour2;
PlayerTextDrawGetPreviewVehCol(playerid, pTextdraw[playerid], colour1, colour2);
// colour1 = 6
// colour2 = 8
return 1;
}