[QUOTE]local TextEntry = vgui.Create( "DTextEntry", frameb )
TextEntry:SetPos( 70, 30 )
TextEntry:SetSize( 75, 85 )
TextEntry:SetText( "Type Name Here" )
TextEntry.OnEnter = function( self )
ply:ConCommand ("say /name new player" ...self:GetValue()... " ")
end
[/QUOTE]
Thats the code i have atm
but how do I make it so it pastes the self:GetValue on concommand
[QUOTE]TextEntry.OnEnter = function( self )
ply:ConCommand ("say /name new player" ...self:GetValue()... " ")
end[/QUOTE]
Lua uses 3 dots (...) as a vararg element wich can be passed to functions, to put values in a string, use two dots (..).
[QUOTE=whitestar;51220959]Lua uses 3 dots (...) as a vararg element wich can be passed to functions, to put values in a string, use two dots (..).[/QUOTE]
Thank you
Sorry, you need to Log In to post a reply to this thread.