Przejdź do głównej zawartości

PlayerTextDrawSetPreviewVehCol

Description

Set the color of a vehicle in a player-textdraw model preview (if a vehicle is shown).

NameDescription
playeridThe ID of the player whose player-textdraw to change.
PlayerText:textidThe ID of the player's player-textdraw to change.
colour1The color to set the vehicle's primary color to.
colour2The color to set the vehicle's secondary color to.

Returns

This function does not return any specific values.

Examples

new PlayerText:gTextDraw[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
gTextDraw[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "_");
PlayerTextDrawFont(playerid, gTextDraw[playerid], TEXT_DRAW_FONT_MODEL_PREVIEW);
PlayerTextDrawUseBox(playerid, gTextDraw[playerid], true);
PlayerTextDrawBoxColor(playerid, gTextDraw[playerid], 0x000000FF);
PlayerTextDrawTextSize(playerid, gTextDraw[playerid], 40.0, 40.0);

PlayerTextDrawSetPreviewModel(playerid, gTextDraw[playerid], 411);
PlayerTextDrawSetPreviewVehCol(playerid, gTextDraw[playerid], 3, 6);

PlayerTextDrawShow(playerid, gTextDraw[playerid]);
return 1;
}

Notes

warning

The textdraw MUST use the font TEXT_DRAW_FONT_MODEL_PREVIEW and be showing a vehicle in order for this function to have effect.