Advertisement
Z1z

FS AUDIO - Z1z

Z1z
Nov 15th, 2017
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.69 KB | None | 0 0
  1. #include <a_samp>
  2. #include <sscanf>
  3. #include <zcmd>
  4. // feel free to edit this FS as you want, but dont remove the credits !! <3
  5. #define    COLOR_ERROR                0xFF0000AA
  6. #define COLOR_YELLOW           0xFFFF00AA
  7. /*
  8. M A D E   B Y    Z1z, you can find me on Skype: renan.araujo279
  9. Git: github.com/NoFaith
  10. */
  11. public OnFilterScriptInit()
  12. {
  13.     print("\n********************************************");
  14.     print("SIMPLE AUDIO STREAM FOR SAMP - made by Z1z - ultra-h.com");
  15.     print("**********************************************\n");
  16.     return 1;
  17. }
  18.  
  19. CMD:playsong(playerid, params[])
  20. {
  21.     //new adminname[49];
  22.     if(isnull(params)) return SendClientMessage(playerid, COLOR_ERROR, "[ XxX ] CMD: /playsong [URL]");
  23.     for(new u; u < MAX_PLAYERS; u++)
  24.     {
  25.         PlayAudioStreamForPlayer(u, params);
  26.     }
  27.     SendClientMessageToAll(COLOR_YELLOW, "An admin put a song, to stop, type: /stopsong");
  28.     return 1;
  29. }
  30. //It would look better if I put a box to type the CMD to play the song....but i wanted to make it simple.
  31.  
  32. CMD:stopsong(playerid, params[])
  33. {
  34.     StopAudioStreamForPlayer(playerid);
  35.     SendClientMessage( playerid, COLOR_YELLOW, "[ XxX ] You stopped the current song");
  36.     return 1;
  37. }
  38.  
  39. CMD:ssongtoall(playerid, params[])
  40. {
  41.     new adminname[24], string[128];
  42.     GetPlayerName(playerid, adminname, 24);
  43.  
  44.     if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_ERROR, "[ XxX ] You are not allowed");
  45.     for( new u; u < MAX_PLAYERS; u++ )
  46.     {
  47.     StopAudioStreamForPlayer( u );
  48.     }
  49.     format(string,sizeof(string),"[ > ] The admin %s stopped the song", adminname );
  50.     SendClientMessage(playerid, COLOR_YELLOW, string);
  51.     return 1;
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement