SA-MP Forums Archive
Is it Possible to get a speach - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is it Possible to get a speach (/showthread.php?tid=371327)



Is it Possible to get a speach - manishmulchandani11 - 23.08.2012




Is it Possible to get a speach Like " OnPlayerConnect " Welcome to United City Roleplay " ? if you know please share with me...


Re: Is it Possible to get a speach - Akira297 - 23.08.2012

Some people have recordings over there, text-to-speech from the control panel and have it uploaded to a site and just have it "OnPlayerConnect"

PlayAudioStreamForPlayer(playerid, [ url] ]



Re: Is it Possible to get a speach - clarencecuzz - 23.08.2012

There is an alternative, let me give you a code for it. Please wait for an edit.

EDIT:
Remove [url] tags if they appear, I can't seem to remove them in some cases.
pawn Код:
public OnPlayerConnect(playerid)
{
    PlayAudioStreamForPlayer(playerid, "http://translate.******.com/translate_tts?tl=en&q=Welcome%20to%20united%20city%20roleplay");
    return 1;
}
Код:
PlayAudioStreamForPlayer(playerid, "http://translate.******.com/translate_tts?tl=en&q=Welcome%20to%20united%20city%20roleplay");
You can change /translate_tts?tl=en&q=... to whatever you want it to say. Change 'Welcome to united city roleplay' to whatever you want the server to say.

Example:
Код:
PlayAudioStreamForPlayer(playerid, "http://translate.******.com/translate_tts?tl=en&q=I like gta");
will obviously say, "I like GTA."

This is a tactic used by many server owners. NOTE: The link will appear for other players, unless you want to use an alternative plugin/system that does not use URLs.