ViRuZGamiing Posted December 29, 2013 Author Posted December 29, 2013 Will getTeamFromPlayer(player) also work? "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
Castillo Posted December 29, 2013 Posted December 29, 2013 There's no such function. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
TAPL Posted December 30, 2013 Posted December 30, 2013 Will getTeamFromPlayer(player) also work? getPlayerTeam getTeamName
ViRuZGamiing Posted December 30, 2013 Author Posted December 30, 2013 local text_h = dxGetFontHeight ( 1, "bankgothic" ) addEventHandler("onClientRender",root, function ( ) local name_X = 350 local team_X = 700 local ping_X = 950 local name_Y = 200 local namend_Y = 700 if ( not getKeyState ( "tab" ) ) then return end if ( name_Y > namend_Y ) then return end dxDrawRectangle(250, 100, 800, 600, tocolor(0, 100, 255, 150), false) dxDrawText("Belgium-Reallife", 250, 100, 1050, 200, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true, false, false) dxDrawLine(250, 200, 1050, 200, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(550, 200, 550, 700, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(850, 200, 850, 700, tocolor(255, 255, 255, 255), 1, false) --dxDrawText("Team1", 550, 200, 850, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) --dxDrawText("Ping1", 850, 200, 1050, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) for _, player in ipairs ( getElementsByType ( "player" ) ) do dxDrawText ( getPlayerName ( player ), name_X, name_Y, name_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) dxDrawText ( tostring ( getPlayerPing ( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) dxDrawText ( tostring ( getPlayerTeam( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) name_Y = ( name_Y + text_h * 1.5 ) end end ) @TAPL wouldn't this work too? "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
TAPL Posted December 30, 2013 Posted December 30, 2013 This will draw user data of the team element, you need getTeamName.
ViRuZGamiing Posted December 30, 2013 Author Posted December 30, 2013 Now I see false instead of the user's team. "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
ViRuZGamiing Posted December 30, 2013 Author Posted December 30, 2013 It's the code i've posted above yours "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
ViRuZGamiing Posted December 30, 2013 Author Posted December 30, 2013 Thx TAPL It works now "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
ViRuZGamiing Posted December 30, 2013 Author Posted December 30, 2013 bad player pointer, dxDrawText ( tostring ( getTeamName ( getPlayerTeam ( localPlayer ) ) ), team_X, name_Y, team_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "bankgothic" ) "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
GTX Posted December 30, 2013 Posted December 30, 2013 Use "player" instead of localPlayer. dxDrawText ( tostring ( getTeamName ( getPlayerTeam ( player ) ) ), team_X, name_Y, team_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "bankgothic" ) Do you require a paid scripter? Contact me! (Unavailable) Currently I am experienced in Lua, PHP, HTML, CSS, SQL and JS. Developer and owner of https://projectbea.st - Project Beast
ViRuZGamiing Posted December 30, 2013 Author Posted December 30, 2013 didn't work too "If debugging is the process of removing software bugs, then programming must be the process of putting them in."
TAPL Posted December 30, 2013 Posted December 30, 2013 local text_h = dxGetFontHeight ( 1, "bankgothic" ) addEventHandler("onClientRender",root, function ( ) local name_X = 350 local team_X = 700 local ping_X = 950 local name_Y = 200 local namend_Y = 700 if ( not getKeyState ( "tab" ) ) then return end if ( name_Y > namend_Y ) then return end dxDrawRectangle(250, 100, 800, 600, tocolor(0, 100, 255, 150), false) dxDrawText("Belgium-Reallife", 250, 100, 1050, 200, tocolor(255, 255, 255, 255), 2.00, "bankgothic", "center", "center", false, false, true, false, false) dxDrawLine(250, 200, 1050, 200, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(550, 200, 550, 700, tocolor(255, 255, 255, 255), 1, false) dxDrawLine(850, 200, 850, 700, tocolor(255, 255, 255, 255), 1, false) --dxDrawText("Team1", 550, 200, 850, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) --dxDrawText("Ping1", 850, 200, 1050, 700, tocolor(255, 255, 255, 255), 1.00, "bankgothic", "center", "top", false, false, true, false, false) for _, player in ipairs ( getElementsByType ( "player" ) ) do dxDrawText ( getPlayerName ( player ), name_X, name_Y, name_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) dxDrawText ( tostring ( getPlayerPing ( player ) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) dxDrawText ( tostring ( getTeamName(getPlayerTeam( player )) ), ping_X, name_Y, ping_X * 1.2, name_Y * 1.2, tocolor ( 255, 255, 255, 255 ), 1.0, "pricedown" ) name_Y = ( name_Y + text_h * 1.5 ) end end )
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