# dxDrawMaterialLine3D (Client)

> Draws an image stretched along a line in the 3D world for one frame.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Screen drawing
- **URL**: https://wiki.mymp.gg/en/dxDrawMaterialLine3D

## Syntax

```lua
bool dxDrawMaterialLine3D(float startX, startY, startZ, float endX, endY, endZ, texture|dui material, float width [, bool flipUV = false, color color = tocolor(255, 255, 255), string|bool stage = postfx, float faceTowardX, faceTowardY, faceTowardZ = nil])
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `startX, startY, startZ` | `float` | Start point in the world, the top of the image. A vec3 also works. |
| `endX, endY, endZ` | `float` | End point in the world, the bottom of the image. A vec3 also works. |
| `flipUV` | `bool` | Flip the image. Can be left out. *(default: `false`)* |
| `material` | `texture\|dui` | The image: a texture, render target, screen source or dui. |
| `width` | `float` | Width of the strip, in world units. |
| `color` | `color` | Colour multiplied with the image, a `tocolor` value. *(default: `tocolor(255, 255, 255)`)* |
| `stage` | `string\|bool` | When to draw: `prefx`, `postfx` or `postgui`, or a boolean (`true` means `postgui`). *(default: `postfx`)* |
| `faceTowardX, faceTowardY, faceTowardZ` | `float` | Point the image's face turns to. Without it, the image faces the camera. A vec3 also works. *(default: `nil`)* |

## Returns

`true` once the drawing is queued.

## Example

```lua
local sign = engineCreateTexture("images/sign.png")

addEventHandler("onClientRender", root, function()
    dxDrawMaterialLine3D(2488, -1666, 16, 2488, -1666, 14, sign, 2)
end)
```

### Note

`prefx` and `postfx` draw the same way: only `postgui` changes the layer.

## See also

- [dxDrawMaterialSectionLine3D (Client)](https://wiki.mymp.gg/en/dxDrawMaterialSectionLine3D.md): Draws part of an image stretched along a line in the 3D world for one frame.
- [dxDrawLine3D (Client)](https://wiki.mymp.gg/en/dxDrawLine3D.md): Draws a line in the 3D world for one frame. The line faces the camera.
- [engineCreateTexture (Client)](https://wiki.mymp.gg/en/engineCreateTexture.md): Creates a texture from an image file in the resource or from image bytes in memory. The texture exists on this client only.
- [dxCreateRenderTarget (Client)](https://wiki.mymp.gg/en/dxCreateRenderTarget.md): Creates a render target: an image the dx functions can draw into and that can be used like any other image.
