• User Say Variable in Chat command
    3 replies, posted
Alright so I'm having trouble with a command to make the user say in chat. Right now i have this. ply:ConCommand( "say Help Please." ) but I want a variable to be posted in there. The Variable is made when a button is clicked, my variable "v.PrintName" Why do i want to post it as the user is saying it in chat? It will then be logged with Blogs and that's the outcome i need. Any help would be appreciated!
[QUOTE=xsickxskills;51131440]Alright so I'm having trouble with a command to make the user say in chat. Right now i have this. ply:ConCommand( "say Help Please." ) but I want a variable to be posted in there. The Variable is made when a button is clicked, my variable "v.PrintName" Why do i want to post it as the user is saying it in chat? It will then be logged with Blogs and that's the outcome i need. Any help would be appreciated![/QUOTE] Uhh [lua]ply:ConCommand( "say " .. stringVar )[/lua] ? Bceause if this is all you need I'd suggest [URL="https://www.lua.org/pil/3.4.html"]Googling[/URL] before making a thread
I'd recommend using [img]http://wiki.garrysmod.com/favicon.ico[/img] [url=http://wiki.garrysmod.com/page/Player/Say]Player:Say[/url] as well.
Sorry i did google, for about 2 hours and couldnt find the answer i was looking for and didnt realize that i could do .. stringvar after it like that. Thought there was some other command i was skimming over or something. concommand was just an easy fix so i used it.
Sorry, you need to Log In to post a reply to this thread.