1. Создаём форвард:
Code
forward OnPlayerMusic();
2. Создаём глобально-переменную для всех игроков:
Code
new PlayMusic[MAX_PLAYERS];
3. В public OnGameModeInit() вставляем запуск таймера:
Code
public OnPlayerMusic()
{
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(!IsPlayerConnected(i)) continue;
{
if(PlayerToPoint(дистанция, i, x, y, z) && PlayMusic[i] == 0)// где x y z пишите координаты
{
PlayerPlaySound(i,id музыки,x, y, z);// где x y z пишите координаты.
PlayMusic[i] = 1;
}
else if(!PlayerToPoint(дистанция, i, x, y, z) && PlayMusic[i] == 1)// где x y z пишите координаты
{
PlayerPlaySound(i,id музыки(STOP),x, y, z);// где x y z пишите координаты
PlayMusic[i] = 0;
}
}
}
}
ID Звуков указоны ниже
1002 - weak hit
1009 - crash
1020 - constant machinery noise
1021 - machinery
1022 - motor, stopping
1027 - weaker hit
1035 - garage door opening
1039 - ?
1052 - blip A
1053 - blip B
1054 - blip A (same as 1052)
1055 - blip B (same as 1053)
1056 - race - green light sound
1057 - race - red light sound (start sound)
1058 - selection sound
1062 - *background music*
1068 - *background music*
1076 - *background music*
1083 - map - place a marker
1084 - map - remove a marker
1085 - blip C
1095 - loud hit
1097 - *background music*
1100 - metallic fence rattle A
1101 - metallic fence rattle B
1130 - punch A
1131 - hit wooden object?
1132 - camera click
1133 - machinery
1134 - spray can
1135 - hit
1136 - punch B
1137 - high-pitch blip A
1138 - high-pitch blip A
1139 - high-pitch blip A
1140 - crash A
1141 - crash B
1142 - stadium background noise
1144 - splash
1145 - ?
1147 - car horn
1148 - crash C
1149 - blip (same as 1052?)
1150 - selection sound
1153 - garage door opening (same as 1035)
1159 - explosion
1163 - two-feet stomp (after jumping)
1165 - bigger garage (hangar?) doors
1183 - *background music*
1185 - *background music*
1187 - *background music*
1190 - slap