〜ように言う/頼む/注意する
To tell/ask/remind someone to do something (relaying a request indirectly)machine translation
FormationVerb dictionary form/ない-form + ように + 言う・頼む・注意する・伝える
〜ように言う is used to report a request, command, or reminder indirectly: 母は子どもに早く寝るように言った (the mother told her child to go to bed early). Instead of quoting verbatim with 「早く寝なさい」と言った, the speaker just relays the content of the request.
The verb at the end sets the nuance: 言う (tell), 頼む (ask), 注意する (remind, warn), 伝える (pass on a message). To relay a "don't do it" request, use the ない-form + ように: 遅れないように言ってください (please tell them not to be late). This pattern very often pairs with the passive you learned at N4: 医者に飲まないように言われた (I was told by the doctor not to drink).
Don't confuse it with ようにする・ようになる (N4) — those are about the subject's own efforts or changes, while ように言う always involves one person conveying a request to another. Compared with the direct quotation 〜と言う, ように言う can only be used for utterances that have the nature of a request; it is not used to report ordinary information.
Examples
医者に、お酒を飲まないように言われました。
I was told by my doctor not to drink alcohol.
母は子どもに、早く寝るように言いました。
The mother told her child to go to bed early.
友達に、明日の朝電話するように頼みました。
I asked my friend to call me tomorrow morning.