Garry's Mod Wiki

NPC:PlaySentence

  number NPC:PlaySentence( string sentence, number delay, number volume )

Description

Forces the NPC to play a sentence from scripts/sentences.txt

Arguments

1 string sentence
The sentence string to speak.
2 number delay
Delay in seconds until the sentence starts playing.
3 number volume
The volume of the sentence, from 0 to 1.

Returns

1 number
Returns the sentence index, -1 if the sentence couldn't be played.