Files
DayZ-Epoch/dayz_code/compile/player_music.sqf
2013-05-26 12:23:31 -05:00

11 lines
341 B
Plaintext

private ["_sound","_num","_length","_pause"];
while {!r_player_dead} do {
_num = round(random 35);
_sound = "z_suspense_" + str(_num);
_length = getNumber(configFile >> "cfgMusic" >> _sound >> "Duration");
_pause = ((random 5) + 2) + _length;
if (!r_player_unconscious and !r_pitchWhine) then {
playMusic _sound;
};
sleep _pause;
};