PlayerPlaySound
#1

i can't hear sound in this plz help me:
Код:
public OnPlayerRequestClass(playerid,classid){
	SetPlayerInterior(playerid,17);
	SetPlayerPos(playerid,480.8415,-14.3506,1000.6797);
	SetPlayerFacingAngle(playerid,271.6728);
	SetPlayerCameraPos(playerid,491.7506,-13.9768,1001.6797);
	SetPlayerCameraLookAt(playerid,480.8415,-14.3506,1000.6797);
	PlayerPlaySound(playerid,1097,491.7506,-13.9768,1001.6797);
	ApplyAnimation(playerid,"DANCING","dance_loop",4.0,1,0,0,0,0);
	if(classid==0){
	    PlayerPlaySound(playerid,1097,491.7506,-13.9768,1001.6797);
	    ApplyAnimation(playerid,"DANCING","dance_loop",4.0,1,0,0,0,0);}
	return 1;}
Reply
#2

Код:
public OnPlayerRequestClass(playerid,classid)
{
	SetPlayerInterior(playerid,17);
	SetPlayerPos(playerid,480.8415,-14.3506,1000.6797);
	SetPlayerFacingAngle(playerid,271.6728);
	SetPlayerCameraPos(playerid,491.7506,-13.9768,1001.6797);
	SetPlayerCameraLookAt(playerid,480.8415,-14.3506,1000.6797);
	PlayerPlaySound(playerid,1097,0.0,0.0,0.0);
	ApplyAnimation(playerid,"DANCING","dance_loop",4.0,1,0,0,0,0);
	return 1;
}
Reply
#3

not work.
Reply
#4

Maybe ur Ingame volume is disabled?
Reply
#5

volume is enabled.
Reply
#6

Why are you using the same functions with the same parameters twice?
Use 0.0 as parameter for no position:
Код:
public OnPlayerRequestClass(playerid,classid)
{
	PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
	SetPlayerInterior(playerid, 17);
	SetPlayerPos(playerid, 480.8415, -14.3506, 1000.6797);
	SetPlayerFacingAngle(playerid, 271.6728);
	SetPlayerCameraPos(playerid, 491.7506, -13.9768, 1001.6797);
	SetPlayerCameraLookAt(playerid, 480.8415, -14.3506, 1000.6797);
	ApplyAnimation(playerid, "DANCING", "dance_loop", 4.0, 1, 0, 0, 0, 0);
	if(classid == 0)
	{
	    // Do something
	}
	return 1;
}
But I doubt that the sound will play when it's used in OnPlayerRequestClass(), so try putting the function under the OnPlayerConnect() callback (or somewhere else) instead:
Код:
public OnPlayerConnect(playerid)
{
	PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
	return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)