SA-MP Forums Archive
Music - 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: Music (/showthread.php?tid=596927)



Music - RaajParker - 24.12.2015

Guys i am mapping and scripting a nightclub i need to knoiw how to add music when spawn and it should be like cmd
ex - /music thn it will stream a audio in nightclub and when i exit /exitclub it should stop music how to make


Re: Music - SupperRobin6394 - 24.12.2015

Use ******


Re: Music - RaajParker - 24.12.2015

Quote:
Originally Posted by SupperRobin6394
Посмотреть сообщение
Use ******
Ok ik thx


Re: Music - lucamsx - 24.12.2015

@SupperRobin6394 - no comment.

Use PlayAudioStreamForPlayer and StopAudioStreamForPlayer. Optionally, you can also create a zone and check if the player is in the zone so the music will be on/off depending on player's location.


Re: Music - Amunra - 24.12.2015

Try this
PHP код:
CMD:music(playerid,params[])// if used zcmd.inc
{
    
PlayAudioStreamForPlayer(playerid,"urldownloadlink");//Place your url download link of the song
    
SendClientMessage(playerid,"You have play Music ! Enjoy ");
    return 
1;

When you want to stop music

PHP код:
CMD:stopmusic(playerid,params[])// if used zcmd.inc
{
    
StopAudioStreamForPlayer(playerid);
    
SendClientMessage(playerid,"You have stoped the music ! ");
    return 
1;




Re: Music - RaajParker - 25.12.2015

Thx u guys i have made it with

/on /off thx once more