mcer Posted June 9, 2013 Share Posted June 9, 2013 I can't put local MilitaryCount = countPlayersInTeam ( Military ) In this GUIlabel (Don't appear when i put "MilitaryCount" in the code) MilitaryN = guiCreateLabel(104, 427, 70, 19, "Number", false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) I want to replace "number" With the number of a specific team. Please help. Link to comment
DNL291 Posted June 9, 2013 Share Posted June 9, 2013 MilitaryN = guiCreateLabel(104, 427, 70, 19, MilitaryCount, false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) Or: guiSetText(MilitaryN, MilitaryCount) Link to comment
mcer Posted June 9, 2013 Author Share Posted June 9, 2013 MilitaryN = guiCreateLabel(104, 427, 70, 19, MilitaryCount, false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) Or: guiSetText(MilitaryN, MilitaryCount) It does not work. D: Link to comment
iPrestege Posted June 9, 2013 Share Posted June 9, 2013 -- # Client Side .. MilitaryN = guiCreateLabel(104, 427, 70, 19, MilitaryCount, false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) addEventHandler('onClientRender',root, function ( ) local Count = countPlayersInTeam ( getTeamFromName ( 'Military' ) ) guiSetText ( MilitaryN,tostring ( Count ) ) end ) Link to comment
mcer Posted June 9, 2013 Author Share Posted June 9, 2013 -- # Client Side .. MilitaryN = guiCreateLabel(104, 427, 70, 19, MilitaryCount, false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) addEventHandler('onClientRender',root, function ( ) local Count = countPlayersInTeam ( getTeamFromName ( 'Military' ) ) guiSetText ( MilitaryN,tostring ( Count ) ) end ) Doesn't work too D: Link to comment
iPrestege Posted June 9, 2013 Share Posted June 9, 2013 Are you sure you have team called ''Military' ? Also use debugscript 3 to tell us what's the problem . Link to comment
DNL291 Posted June 9, 2013 Share Posted June 9, 2013 It should work. Make sure that 'MilitaryCount' is really returning the players in the team. Link to comment
mcer Posted June 9, 2013 Author Share Posted June 9, 2013 (edited) Debugscript: Bad argument @ 'guiSetText [Expected gui-element at argument 1,got nil] With this -- # Client Side .. MilitaryN = guiCreateLabel(104, 427, 70, 19, MilitaryCount, false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) addEventHandler('onClientRender',root, function ( ) local Count = countPlayersInTeam ( getTeamFromName ( 'Military' ) ) guiSetText ( MilitaryN,tostring ( Count ) ) end ) Edited June 9, 2013 by Guest Link to comment
iPrestege Posted June 9, 2013 Share Posted June 9, 2013 Debugscript: We can't see this image please use another upload site . like imgur . Link to comment
mcer Posted June 9, 2013 Author Share Posted June 9, 2013 Debugscript: We can't see this image please use another upload site . like imgur . See it again . Link to comment
mcer Posted June 9, 2013 Author Share Posted June 9, 2013 Debugscript tells me the error is here: guiSetText ( MilitaryN,tostring ( Count ) ) Bad argument @ 'guiSetText [Expected gui-element at argument 1,got nil] Link to comment
WASSIm. Posted June 9, 2013 Share Posted June 9, 2013 try this: MilitaryN = guiCreateLabel(104, 427, 70, 19, "", false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) addEventHandler('onClientRender',root, function ( ) local Count = countPlayersInTeam ( getTeamFromName ( 'Military' ) ) guiSetText ( MilitaryN, Count ) end ) Link to comment
mcer Posted June 9, 2013 Author Share Posted June 9, 2013 try this: MilitaryN = guiCreateLabel(104, 427, 70, 19, "", false, TeaSelectorWin) guiLabelSetColor(MilitaryN, 106, 105, 109) addEventHandler('onClientRender',root, function ( ) local Count = countPlayersInTeam ( getTeamFromName ( 'Military' ) ) guiSetText ( MilitaryN, Count ) end ) Finally!!, Thanks all Link to comment
iPrestege Posted June 9, 2013 Share Posted June 9, 2013 Oh There's an argument on create the label i don't see it lol . 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