SA-MP Forums Archive
Help with class section BG sound - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with class section BG sound (/showthread.php?tid=123316)



Help with class section BG sound - nastoe - 25.01.2010

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?


Re: Help with class section BG sound - Deat_Itself - 25.01.2010

onplayerspawn add this

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


Re: Help with class section BG sound - nastoe - 25.01.2010

thanx