Ui::getTextScreenWidth
Syntax
```js mp.game.ui.getTextScreenWidth(p0); ```
Required Arguments
- p0: <font color="blue">Boolean</font>
Return value
- <font color="green">float</font>
Example
```js const getTextWidth = (text, font, scale) => {
mp.game.ui.setTextEntryForWidth("STRING");
mp.game.ui.addTextComponentSubstringPlayerName(text);
mp.game.ui.setTextFont(font);
mp.game.ui.setTextScale(scale * 1.25, scale);
return mp.game.ui.getTextScreenWidth(true);
}; ```