SoiiNoob Posted March 8, 2012 Posted March 8, 2012 (edited) like fail example: function createText () local taxi = getTeamName ("teamtaxi") dxDrawText (taxi, 44, screenHeight - 41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) end function HandleTheRendering ( ) addEventHandler ( "onClientRender", root, createText ) end addEventHandler ( "onClientResourceStart", resourceRoot, HandleTheRendering ) Edited March 8, 2012 by Guest
Kenix Posted March 8, 2012 Posted March 8, 2012 https://forum.multitheftauto.com/viewtop ... b51ad4fdb0 https://wiki.multitheftauto.com/wiki/Scr ... troduction http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
JR10 Posted March 8, 2012 Posted March 8, 2012 You need a team element to use with getTeamName, and you used the team's name already, so just type it in directly in dxDrawText. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
DNL291 Posted March 8, 2012 Posted March 8, 2012 local width,height = guiGetScreenSize() function createText(player) local player = localPlayer local playerTeam = getPlayerTeam(player) local team = getTeamName(playerTeam) if ( team ) then dxDrawText ("Team: "..team.."", width - 210, height - 41, width, height, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) else dxDrawText ("Team: None", width - 210, height - 41, width, height, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) end end addEventHandler ( "onClientRender", root, createText ) addEventHandler( "onClientResourceStart", resourceRoot, createText ) https://wiki.multitheftauto.com/wiki/GuiGetScreenSize https://wiki.multitheftauto.com/wiki/GetPlayerTeam Please do not PM me with scripting related question nor support, use the forums instead.
JR10 Posted March 8, 2012 Posted March 8, 2012 That won't work, onClientRender doesn't have a player argument. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
DNL291 Posted March 8, 2012 Posted March 8, 2012 That won't work, onClientRender doesn't have a player argument. worked for me. single poblem is debugscript flood when someone leaves the team. Please do not PM me with scripting related question nor support, use the forums instead.
JR10 Posted March 8, 2012 Posted March 8, 2012 Oh it will work, but it should be: local width,height = guiGetScreenSize() function createText() local playerTeam = getPlayerTeam(localPlayer) if playerTeam then local team = getTeamName(playerTeam) dxDrawText ("Team: "..team, width - 210, height - 41, width, height, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) else dxDrawText ("Team: None", width - 210, height - 41, width, height, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) end end addEventHandler ( "onClientRender", root, createText ) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
SoiiNoob Posted March 8, 2012 Author Posted March 8, 2012 thanks you guys , but i want some like this
Castillo Posted March 8, 2012 Posted March 8, 2012 You want to show on player screen the amount of players on his/her team? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
SoiiNoob Posted March 8, 2012 Author Posted March 8, 2012 nope, i want to change the default font with this font (pricedown)
Castillo Posted March 8, 2012 Posted March 8, 2012 You want to change the font of team name on scoreboard? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted March 8, 2012 Posted March 8, 2012 Scoreboard has a settings window, you can try changing it there? San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
SoiiNoob Posted March 8, 2012 Author Posted March 8, 2012 lol you are right, thanks, but the setting it gonna be public?
Castillo Posted March 8, 2012 Posted March 8, 2012 If you change it on your side, it'll be changed only for you. But you can change the default settings when a player joins the game. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Castillo Posted March 8, 2012 Posted March 8, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
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