SoiiNoob Posted March 8, 2012 Share 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 Link to comment
Kenix Posted March 8, 2012 Share Posted March 8, 2012 https://forum.multitheftauto.com/viewtop ... b51ad4fdb0 https://wiki.multitheftauto.com/wiki/Scr ... troduction Link to comment
JR10 Posted March 8, 2012 Share 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. Link to comment
DNL291 Posted March 8, 2012 Share 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 Link to comment
JR10 Posted March 8, 2012 Share Posted March 8, 2012 That won't work, onClientRender doesn't have a player argument. Link to comment
DNL291 Posted March 8, 2012 Share 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. Link to comment
JR10 Posted March 8, 2012 Share 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 ) Link to comment
SoiiNoob Posted March 8, 2012 Author Share Posted March 8, 2012 thanks you guys , but i want some like this Link to comment
Castillo Posted March 8, 2012 Share Posted March 8, 2012 You want to show on player screen the amount of players on his/her team? Link to comment
SoiiNoob Posted March 8, 2012 Author Share Posted March 8, 2012 nope, i want to change the default font with this font (pricedown) Link to comment
Castillo Posted March 8, 2012 Share Posted March 8, 2012 You want to change the font of team name on scoreboard? Link to comment
Castillo Posted March 8, 2012 Share Posted March 8, 2012 Scoreboard has a settings window, you can try changing it there? Link to comment
SoiiNoob Posted March 8, 2012 Author Share Posted March 8, 2012 lol you are right, thanks, but the setting it gonna be public? Link to comment
Castillo Posted March 8, 2012 Share 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. Link to comment
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