Music at gameplay?
#1

HI!!
one little noob question:
Is it possible to play music at: OnPlayerSpawn, or OnPlayerRequestSpawn??
i have ever heared something about playplayersound(playerid, blahblah)
but i can't script veeeeery good,
pls anybody gimme a code? THANX!
cya.
ps, sorry for my GREAT english ^^ joke
Reply
#2

Yes, you can use PlayerPlaySound, add it to wherever you want it, and later, play an empty sound to stop the music.
https://sampwiki.blast.hk/wiki/PlayerPlaySound

Sound IDs are listed here:
https://sampwiki.blast.hk/wiki/SoundID
Reply
#3

Quote:
Originally Posted by player007
Yes, you can use PlayerPlaySound, add it to wherever you want it, and later, play an empty sound to stop the music.
https://sampwiki.blast.hk/wiki/PlayerPlaySound

Sound IDs are listed here:
https://sampwiki.blast.hk/wiki/SoundID
thanx yo
Reply
#4

Just add the sound you want under OnPlayerRequestSpawn


pawn Код:
public OnPlayerRequestClass(playerid,classid)
PlayerPlayerSOund9playerid,soundid,0.0,0.0,0.0);//The sound that you want to play
And then
pawn Код:
public OnPlayerSpawn(playerid)
PlayPlayerSOund(playerid,soundid,0.0,0.0,0.0); //a blank sound , any sound id or maybe a slap sound
Adding a slap sound at spawn will stop the music sound ... Try it
Credits to SAMP Wiki
Reply
#5

Quote:
Originally Posted by Peter Corneile
Just add the sound you want under OnPlayerRequestSpawn


pawn Код:
public OnPlayerRequestClass(playerid,classid)
PlayerPlayerSOund9playerid,soundid,0.0,0.0,0.0);//The sound that you want to play
And then
pawn Код:
public OnPlayerSpawn(playerid)
PlayPlayerSOund(playerid,soundid,0.0,0.0,0.0); //a blank sound , any sound id or maybe a slap sound
Adding a slap sound at spawn will stop the music sound ... Try it
Credits to SAMP Wiki
also thanx. i tryed it, and it works! ^^
Reply
#6

No Problem
Reply
#7

ey what do i need to include
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)