1476 {
1477 Magazine magazine = Magazine.Cast(this);
1478 int pop_sounds_count = 6;
1479 string pop_sounds[ 6 ] = { "ammopops_1","ammopops_2","ammopops_3","ammopops_4","ammopops_5","ammopops_6" };
1480
1481
1482 int sound_idx = Math.RandomInt(0, pop_sounds_count - 1);
1483 string sound_name = pop_sounds[ sound_idx ];
1485
1486
1487 magazine.ServerAddAmmoCount(-1);
1488
1489
1490 float min_temp_to_explode = 100;
1491
1492 if (magazine.GetAmmoCount() > 0 && GetTemperature() >= min_temp_to_explode)
1493 {
1495 }
1496 }
proto native SoundOnVehicle CreateSoundOnObject(Object source, string sound_name, float distance, bool looped, bool create_local=false)
proto native CGame GetGame()