1427 {
1428 Magazine magazine = Magazine.Cast(this);
1429 int pop_sounds_count = 6;
1430 string pop_sounds[ 6 ] = { "ammopops_1","ammopops_2","ammopops_3","ammopops_4","ammopops_5","ammopops_6" };
1431
1432
1434 string sound_name = pop_sounds[ sound_idx ];
1435 g_Game.CreateSoundOnObject(
this, sound_name, 20,
false);
1436
1437
1438 magazine.ServerAddAmmoCount(-1);
1439
1440
1441 float min_temp_to_explode = 100;
1442
1443 if (magazine.GetAmmoCount() > 0 && GetTemperature() >= min_temp_to_explode)
1444 {
1446 }
1447 }
static proto int RandomInt(int min, int max)
Returns a random int number between and min [inclusive] and max [exclusive].