Loader

How to say stuff in chat with Lua?

Started by Tea, 16-08-2009

0 Members and 1 Guest are viewing this topic.

Ive tried everything i could think of, ply:runconsolecommand( 'say text' ) but it only accepts it as a command, print("say text") only puts it into console, ive tried ply:printmessage(HUD_PRINTTALK.."say text") still nothing, any help?


24-08-2009 #1 Last Edit: 24-08-2009 by Horsey
RunConsoleCommand( "say", "hi" );

Running a console command | the function | the arguements

function == Hi
Hi == Fuckyou
print ( "Bro hi" )

so run that in console you'll get "Bro Fuckyou"

I think thats right, Hi being the variable, Fuckyou being the value. printing the message in console, Hi should equal out to say Fuckyou.


Thom's Law
"Nothing can not produce something. If there was ever a time when there was nothing, there would STILL be nothing."

That'll print "Bro hi" because hi is still in the quotes.

function HelloIt()

local Hi = "Fuck you"

print( "Bro" .. Hi )

end
concommand.Add( "PrintIt", HelloIt )

Quote from: Horsey on 24-10-2009
That'll print "Bro hi" because hi is still in the quotes.

function HelloIt()

local Hi = "Fuck you"

print( "Bro" .. Hi )

end
concommand.Add( "PrintIt", HelloIt )


Wait... Horsey...

Are you the lua coder from TnB and that other community Flaky's in?


Thom's Law
"Nothing can not produce something. If there was ever a time when there was nothing, there would STILL be nothing."


Quote from: Horsey on 27-10-2009
Yes.. I used to.

Whats up broski? have you been doing lately?


Thom's Law
"Nothing can not produce something. If there was ever a time when there was nothing, there would STILL be nothing."

12-11-2009 #7 Last Edit: 12-11-2009 by CortezV
Lol


Thom's Law
"Nothing can not produce something. If there was ever a time when there was nothing, there would STILL be nothing."