# engineGetMaterialSwitches (Client)

> Lists the static switches of a material's shader, with the value each one has in it.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Client
- **Category**: Materials and shaders
- **URL**: https://wiki.mymp.gg/en/engineGetMaterialSwitches

## Syntax

```lua
table engineGetMaterialSwitches(material material)
```

## Parameters

| Name | Type | Description |
| --- | --- | --- |
| `material` | `material` | The material. |

## Returns

A table of switch name → `true` or `false`, plus `textures`, a hex string with one bit per shader texture that has an image. Empty when the material has no shader.

## Example

```lua
local material = engineCreateMaterial("surface")
for name, value in pairs(engineGetMaterialSwitches(material)) do
    outputDebugString(name .. " = " .. tostring(value))
end
```

## See also

- [engineGetShaderSwitches (Client)](https://wiki.mymp.gg/en/engineGetShaderSwitches.md): Lists the static switches (bool parameters) of a shader or preset, with each one's default.
- [engineSetMaterialValue (Client)](https://wiki.mymp.gg/en/engineSetMaterialValue.md): Sets a material's value: a shader parameter, a static switch or the render target of a TARGET_n output.
