Ui::getTextScreenWidth
Syntax
mp.game.ui.getTextScreenWidth(p0);
Required Arguments
- p0: Boolean
Return value
- float
Example
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);
};