SHOW:
|
|
- or go back to the newest paste.
| 1 | //============================================================================== | |
| 2 | // Youtube Stream Function By Snakeman | |
| 3 | // Youtube Includesi,Snakeman tarafından derlenmiştir | |
| 4 | // http://forum.sa-mp.com/member.php?u=79457 | |
| 5 | // http://www.gtaturk.com/forum/profile/?u=29759 | |
| 6 | // native YoutubeStream(playerid,vlink[]); | |
| 7 | // native YoutubeStopStream(playerid); | |
| 8 | //============================================================================== | |
| 9 | #pragma tabsize 0 | |
| 10 | #define YoutubeStopStreamForPlayer(%1) StopAudioStreamForPlayer(%1) | |
| 11 | stock YoutubeStreamForPlayer(playerid, vlink[]) | |
| 12 | {
| |
| 13 | new videoid[128], mp3link[128]; | |
| 14 | strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15); | |
| 15 | format(mp3link,128,"http://element-samp.net/youtube.php?videoid=%s",videoid); | |
| 16 | PlayAudioStreamForPlayer(playerid,mp3link); | |
| 17 | return 1; | |
| 18 | } | |
| 19 | stock YoutubeStreamForAll(vlink[]) | |
| 20 | {
| |
| 21 | new videoid[128], mp3link[128]; | |
| 22 | strmid(videoid,vlink,strfind(vlink,"v=")+2,strfind(vlink,"v=")+15); | |
| 23 | format(mp3link,128,"http://element-samp.net/youtube.php?videoid=%s",videoid); | |
| 24 | for(new i=0;i<MAX_PLAYERS;i++) PlayAudioStreamForPlayer(i,mp3link); | |
| 25 | return 1; | |
| 26 | } | |
| 27 | stock YoutubeStopStreamForAll() | |
| 28 | {
| |
| 29 | for(new i=0;i<MAX_PLAYERS;i++) StopAudioStreamForPlayer(i); | |
| 30 | return 1; | |
| 31 | } |