Need help -
OssiBaba - 26.12.2013
I make a one event place
I want that if someone come there automatically songs play
Please guide me how i set that
This is codes of that place
Код:
CreateObject(19128, 842.67010, -2049.13647, 11.67430, 0.00000, -92.00000, 269.15125);
Help me pls
I want to play this song there
http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3
Re: Need help -
VenomMancer - 26.12.2013
Try this :
Re: Need help -
SilentSoul - 26.12.2013
Try by yourself first.
1) Use OnPlayerUpdate callback.
2)
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint (Detect if the player in custom area.)
3)
https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer (Player audio for him.)
Re: Need help -
iJumbo - 26.12.2013
pawn Код:
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3", 842.67010, -2049.13647, 11.67430, 100.0, 1);
Mixed with IsPlayerInRangeOfPoint
Re: Need help -
OssiBaba - 26.12.2013
Can you provide me full code
Please
Like israngeplayerpoint and playaudiostream pls
Re: Need help -
VenomMancer - 26.12.2013
Quote:
Originally Posted by OssiBaba
Can you provide me full code
Please
Like israngeplayerpoint and playaudiostream pls
|
pawn Код:
public OnGameModeInit()
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3", 842.67010, -2049.13647, 11.67430, 100.0, 1);
return 1;
}
Re: Need help -
SilentSoul - 26.12.2013
This section for people who got some problems with their script. by the way i hope you learn.
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 20.0, 842.67010, -2049.13647, 11.67430))
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3", 842.67010, -2049.13647, 11.67430, 100.0, 1);
}
return 1;
}
Re: Need help -
VenomMancer - 26.12.2013
Quote:
Originally Posted by SilentSoul
This section for people who got some problems with their script. by the way i hope you learn.
pawn Код:
public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 20.0, 842.67010, -2049.13647, 11.67430)) { PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3", 842.67010, -2049.13647, 11.67430, 100.0, 1); } else return StopAudioStreamForPlayer(playerid); return 1; }
|
This will good ?
pawn Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 20.0, 842.67010, -2049.13647, 11.67430))
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3");
} else return StopAudioStreamForPlayer(playerid); // <<< Will make when the player not on the event place the music will auto stoped !
return 1;
}
Re: Need help - Patrick - 26.12.2013
Quote:
Originally Posted by SilentSoul
This section for people who got some problems with their script. by the way i hope you learn.
pawn Код:
public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 20.0, 842.67010, -2049.13647, 11.67430)) { PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3", 842.67010, -2049.13647, 11.67430, 100.0, 1); } return 1; }
|
Quote:
Originally Posted by VenomMancer
This will good ?
pawn Код:
public OnPlayerUpdate(playerid) { if(IsPlayerInRangeOfPoint(playerid, 20.0, 842.67010, -2049.13647, 11.67430)) { PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3"); } else return StopAudioStreamForPlayer(playerid); // <<< Will make when the player not on the event place the music will auto stoped ! return 1; }
|
That will play every time
OnPlayerUpdate gets called, I suggest using
streamer and use
OnPlayerEnter/ExitDynamicArea
Re: Need help -
OssiBaba - 27.12.2013
Код:
public OnPlayerUpdate(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 20.0, 842.67010, -2049.13647, 11.67430))
{
PlayAudioStreamForPlayer(playerid, "http://www.woo55.com/adata/11069/ow59LUN3ODCf.129.mp3");
} else return StopAudioStreamForPlayer(playerid); // <<< Will make when the player not on the event place the music will auto stoped !
return 1;
}
I am using this codes but songs play 3-9 times and no one understand the song
I mean songs are playing at a time 5 times