How to play audio?
#1

Hello everyone,

I am RazRLightning and I have my own server, and I script my server by my self.

I just want to ask that how to play a song at the log in screen, like when a player joins and he logins to his account and selects a skin, i want to play a song. I want to play GTA 5 theme song.

Please help me, reply quick.

Thanks.
Reply
#2

https://www.******.co.uk/search?q=samp+play+sound
Reply
#3

That ddn't help me, please just tell me what to write on script.

I want the audio to run automatically when player joins, and automatically turn off when he spawns.

Help me with that
Reply
#4

PlayAudioStreamForPlayer
Reply
#5

If I use this command, will the audio run without typing any command?

I want it to run it automatically, I saw this in other servers!

Please give me an example here at SA-MP Forums.

Use [PAWN CODE]
Reply
#6

Then you just put it under OnPlayerConnect
Reply
#7

pawn Код:
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid,"url of song");
return 1;
}

public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
}
Reply
#8

Quote:
Originally Posted by Aerotactics
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
PlayAudioStreamForPlayer(playerid,"url of song");
return 1;
}

public OnPlayerSpawn(playerid)
{
StopAudioStreamForPlayer(playerid);
}
Thanks you really helped me a lot today!
Reply
#9

Can I also put ******* URL?

I wanna put this song - https://www.youtube.com/watch?v=RubBzkZzpUA
Reply
#10

Quote:
Originally Posted by RazRLightning
Посмотреть сообщение
Can I also put ******* URL?

I wanna put this song - https://www.youtube.com/watch?v=RubBzkZzpUA
no you can't ...
you can only put the links that end with .mp3 or .pls !!!

Try to get download links!
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)