HyperGaming Network

Other Forums => Development => Old Forum Boards => Scrapyard => Coding => Topic started by: Tea on 16-08-2009

Title: How to say stuff in chat with Lua?
Post by: Tea on 16-08-2009
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?
Title: Re: How to say stuff in chat with Lua?
Post by: Horsey on 24-08-2009
RunConsoleCommand( "say", "hi" );

Running a console command | the function | the arguements
Title: Re: How to say stuff in chat with Lua?
Post by: CortezV on 24-10-2009
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.
Title: Re: How to say stuff in chat with Lua?
Post by: 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 )
Title: Re: How to say stuff in chat with Lua?
Post by: CortezV on 26-10-2009
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?
Title: Re: How to say stuff in chat with Lua?
Post by: Horsey on 27-10-2009
Yes.. I used to.
Title: Re: How to say stuff in chat with Lua?
Post by: CortezV on 27-10-2009
Quote from: Horsey on 27-10-2009
Yes.. I used to.

Whats up broski? have you been doing lately?
Title: Re: How to say stuff in chat with Lua?
Post by: CortezV on 12-11-2009
Lol