Making Player Say something as if they typed it

Ok, so I am trying to make it so that the player says a chat message. So rather than using this:


chat.AddText

I want it so it says like

TomTheDuck: Yea, Sending Chat messages are fun.

Now I know that I could put the player infront of the actual message, but because this is going to use darkrp I need the local chat around them to see it.

Thanks

-Tom

(I know basic lua, but even after googling, I couldn’t find this)

Update: Ok, So using this code


RunConsoleCommand("say", "Your Number Is", math.random( 1, 400 ) )

their are “” inbetween the text string and the math.random

RunConsoleCommand(“say”, “string”)
// clientside

meta(player):Say(“string”)
// serverside

Will try out, Thanks for quick reply

[editline]4th May 2016[/editline]

Works Perfectly, Thank you very much!

[editline]4th May 2016[/editline]

Update: Ok, So using this code


RunConsoleCommand("say", "Your Number Is", math.random( 1, 400 ) )

their are “” inbetween the text string and the math.random

[editline]4th May 2016[/editline]

Nevermind Fixed, was missing …