tokyoghoul Posted June 16, 2019 Share Posted June 16, 2019 (edited) В функции mp.game.graphics.drawText, не отображается полностью текст. mp.events.add('render', () => { let housesData = global.housesData; if(housesData) { if(global.localPlayer.dimension == 0) { for(let i = 0; i < Object.keys(global.housesData).length; i++) { let houseData = housesData; let position = houseData["position"]; let distance = Math.abs(Math.sqrt(Math.pow((position.x - global.localPlayer.position.x),2) + Math.pow((position.y - global.localPlayer.position.y),2)+ Math.pow((position.z - global.localPlayer.position.z),2))); if(distance <= 😎 { let str = `~b~Уровень: ~y~${houseData["level"]}\n`; if(houseData["ownerid"] != 0) { str = str + `~b~Владелец: ~y~${houseData["ownername"]}\n`; } else { str = str + `~b~Цена: ~y~${houseData["cost"]}\n`; } if(houseData["garage"] == 0) { str = str + `~b~Гараж: ~y~нет\n`; } else if(houseData["garage"] == 1) { str = str + `~b~Гараж: ~y~2 места\n`; } else if(houseData["garage"] == 2) { str = str + `~b~Гараж: ~y~6 мест\n`; } else if(houseData["garage"] == 3) { str = str + `~b~Гараж: ~y~10 мест\n`; } str = str + `~b~Дом №: ~y~${houseData["mysqlid"]}\n`; mp.game.graphics.drawText(str, [position.x, position.y, position.z], { font: 0, color: [255, 255, 255, 255], scale: [0.3, 0.3], centre: true }); } } } }}); Отображается до "Дом №", т.е текст полностью не влазит(( Как решить данную проблему? Edited June 16, 2019 by tokyoghoul Link to comment Share on other sites More sharing options...
vaskidze Posted June 16, 2019 Share Posted June 16, 2019 Не проще создать 3d текст ? Link to comment Share on other sites More sharing options...
HEROofMAIDAN Posted June 16, 2019 Share Posted June 16, 2019 (edited) 28 минут назад, vaskidze сказал: Не проще создать 3d текст ? Туда тоже всего ~100 символов влезает, если не меньше. Кекнул с этой жести в render, 10 фпс обеспечены. Делай 2-3 строками Edited June 16, 2019 by HEROofMAIDAN Link to comment Share on other sites More sharing options...
tokyoghoul Posted June 16, 2019 Author Share Posted June 16, 2019 1 минуту назад, HEROofMAIDAN сказал: Туда тоже всего ~100 символов влезает, если не меньше Чё так мало( Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now