• Make Players say the string of a ListView Element
    2 replies, posted
Hello! Can someone tell me how to make the local Player say the content/string of a DListView Element? I just cant get it to work :( My attempt: [lua]DermaListView.OnClickLine = function(parent, line, isselected) local sayit = (line:GetValue(1)) //LocalPlayer():ConCommand("say " , (line:GetValue(1))) RunConsoleCommand("say ", sayit()) DermaPanel:Close() end[/lua]
[QUOTE=iRzilla;26610943][lua]RunConsoleCommand("say ", sayit())[/lua] Clever. ¬__¬ Use the example code provided on the wiki page ([url]http://wiki.garrysmod.com/?title=DListView.OnRowSelected):[/url] [lua] lView.OnRowSelected = function(panel , line) RunConsoleCommand("Say" , lView:GetLine(line):GetValue(1)) end [/lua][/QUOTE] Thank you!
Sorry, you need to Log In to post a reply to this thread.