Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FUNCION sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FUNCTION is made especially for www.forum.sa-mp.com
- * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this MAP without my permission.
- */
- [CENTER][B][COLOR="DarkOrange"][SIZE="6"][] AudioStreamForALL[/SIZE][/COLOR][/B][/CENTER]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Informacio:[/SIZE][/B][/COLOR]
- [B][COLOR="DarkOrange"]es una simple funcion con la que puedes mandar un un audio a todos los usuarios que esten en el mismo interior y virtualworld que se encuentre el que coloca la funcion.[/COLOR][/B]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Native:[/SIZE][/B][/COLOR]
- [pawn]
- native PlayAudioStreamForALL(playerid, url[]);
- native StopAudioStreamForALL(playerid);
- [/pawn]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Funcion:[/SIZE][/B][/COLOR]
- [pawn]
- stock PlayAudioStreamForALL(playerid, url[]) {
- //native PlayAudioStreamForALL(playerid, url[]);
- if(IsPlayerConnected(playerid)) {
- StopAudioStreamForPlayer(playerid);
- PlayAudioStreamForPlayer(playerid, url);
- for(new player, j = GetMaxPlayers(); player != j; player++) {
- if(!IsPlayerConnected(player)) continue;
- if(GetPlayerInterior(playerid) == GetPlayerInterior(player) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(player)) {
- if(IsPlayerConnected(player) && (player != playerid) && IsPlayerStreamedIn(playerid,player)) {
- StopAudioStreamForPlayer(player);
- PlayAudioStreamForPlayer(player, url);
- }
- }
- }
- } return true;
- }
- stock StopAudioStreamForALL(playerid) {
- //native StopAudioStreamForALL(playerid);
- if(IsPlayerConnected(playerid)) {
- StopAudioStreamForPlayer(playerid);
- for(new player, j = GetMaxPlayers(); player != j; player++) {
- if(!IsPlayerConnected(player)) continue;
- if(GetPlayerInterior(playerid) == GetPlayerInterior(player) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(player)) {
- if(IsPlayerConnected(player) && (player != playerid) && IsPlayerStreamedIn(playerid,player)) {
- StopAudioStreamForPlayer(player);
- }
- }
- }
- } return true;
- }
- [/pawn]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Ejemplo de Uso:[/SIZE][/B][/COLOR]
- [pawn]
- #include <a_samp>
- #include <zcmd>
- COMMAND:audio(playerid, params[]) {
- PlayAudioStreamForALL(playerid, "http://www.tu_sonico.com/audio.mp3");
- return true;
- }
- COMMAND:parar(playerid, params[]) {
- StopAudioStreamForALL(playerid);
- return true;
- }
- [/pawn]
- [COLOR="DarkOrchid"][B][SIZE="4"][] Creditos:[/SIZE][/B][/COLOR]
- [COLOR="DarkOrange"][B][SIZE="3"]OTACON[/SIZE][/B][/COLOR]
- /*
- * ## LEASE ATENTAMENTE PARA NO CONVERTIRSE EN LAMMER!!.: :D ##
- *
- * Estè Simple FUNCION esta hecho especialmente para www.forum.sa-mp.com
- * NO Publicar estè FUNCION en Otros foros de SA-MP y hacerse pasar por el creador del CODE.
- *
- * Codigo Creado Por OTACON
- *
- * CREDITOS:
- * OTACON: Realizacion y Idea de creacion del code.
- * TÙ: Modificacion libremente respetando lo mencionado ;).
- *
- * NOTA: Menos Creditos para los que me los critican.. JO'PUTAS! :D xD ;)
- *
- * Prohibido TOTALMENTE el Robo de Créditos o la
- * Publicación de este FUNCION sin Mi Permiso.
- */
- /*
- * ## READ CAREFULLY TO AVOID BECOMING LAMMER!.: :D ##
- *
- * This simple FUNCTION is made especially for www.forum.sa-mp.com
- * DO NOT Post the FUNCTION in Other SAMP forums and impersonating the creator of the CODE.
- *
- * Code Created By OTACON
- *
- * CREDITS:
- * OTACON: Idea Making and code creation.
- * YOUR: Modification freely respecting the above ;).
- *
- * NOTE: Less Credits for those who criticize me.. JO'PUTAS! :D xD ;)
- *
- * FULLY spaces Theft Credit or
- * Publication of this MAP without my permission.
- */
Add Comment
Please, Sign In to add comment