Help with class section BG sound
#1

This is code...
Код:
SetupPlayerForClassSelection(playerid)
{
  PlayerPlaySound(playerid, 1097, 258.4893,-41.4008,1002.0234);
 	SetPlayerInterior(playerid,14);
	SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
	SetPlayerFacingAngle(playerid, 270.0);
	SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
	SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}

public OnPlayerRequestClass(playerid, classid)
{
  SetupPlayerForClassSelection(playerid);
  return 1;
}

public OnGameModeInit()
{
  SetGameModeText("Balkan");
  ShowPlayerMarkers(1);
  ShowNameTags(1);
  AllowAdminTeleport(1);
  
  AddPlayerClass(83,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//1
  AddPlayerClass(84,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//2
  AddPlayerClass(131,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//3
  AddPlayerClass(171,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//4
  AddPlayerClass(287,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//5
  AddPlayerClass(227,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//6
  AddPlayerClass(264,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//7
  AddPlayerClass(256,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//8
  AddPlayerClass(19,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//9
  AddPlayerClass(18,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//10
  AddPlayerClass(17,1320.0809,1261.2794,10.8203,0.7322,10,0,0,0,0,0);//11
I put this code
Код:
PlayerPlaySound(playerid, 1097, 258.4893,-41.4008,1002.0234);
here
Код:
SetupPlayerForClassSelection(playerid)
{
  PlayerPlaySound(playerid, 1097, 258.4893,-41.4008,1002.0234);
 	SetPlayerInterior(playerid,14);
	SetPlayerPos(playerid,258.4893,-41.4008,1002.0234);
	SetPlayerFacingAngle(playerid, 270.0);
	SetPlayerCameraPos(playerid,256.0815,-43.0475,1004.0234);
	SetPlayerCameraLookAt(playerid,258.4893,-41.4008,1002.0234);
}
and my question is when i select player/class how to make then sound stop, when i select?
Reply
#2

onplayerspawn add this

Код:
  PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
it will stop the sound
Reply
#3

thanx
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)