How to say stuff in chat with Lua?

Started by Tea, 16-08-2009

0 Members and 1 Guest are viewing this topic.

Tea

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?


Horsey

#1
RunConsoleCommand( "say", "hi" );

Running a console command | the function | the arguements

CortezV

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."

Horsey

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 )

CortezV

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."

Horsey


CortezV

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."

CortezV

#7
Lol


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