Downloads containing soundZ.mut

Downloads
Name Author Game Mode Rating
JJ2+ Only: SoundZ szmol96 Mutator 5 Download file

File preview

/**SoundZ by szmol96**/
/**Using spam kicker is recommended**/
/**Credit goes to Sir Ementaler for his help.**/
#pragma require "ahahah.wav" //Don't forget to require all your sounds
#pragma require "lol.wav"
#pragma require "scatman.wav"
#pragma require "clap.wav"
#pragma require "holyshit.wav"
#pragma require "hihihi.wav"
#pragma require "roger.wav"
#pragma require "negative.wav"
#pragma require "followme.wav"

#pragma name "SoundZ"

const array<string> soundNames = {"ahahah", "lol", "scatman", "clap", "holyshit", "hihihi", "roger", "negative", "followme"}; //These are the names of the sounds you type into chat.
const array<SOUND::Sample> sounds = {SOUND::INTRO_BLOW, SOUND::INTRO_BOEM1, SOUND::INTRO_BOEM2, SOUND::INTRO_BRAKE, SOUND::INTRO_END, SOUND::INTRO_GRAB, SOUND::INTRO_GREN1, SOUND::INTRO_GREN2, SOUND::INTRO_GREN3}; //These are the original JJ2 samples to be replaced by the mutator's sounds

void makeSound(SOUND::Sample sound) {
	jjSamplePriority(sound);
}

void onLevelLoad() { //The mutator's sounds are loaded here. You can have other sounds loaded
	jjSampleLoad(SOUND::INTRO_BLOW, "ahahah.wav");
	jjSampleLoad(SOUND::INTRO_BOEM1, "lol.wav");
	jjSampleLoad(SOUND::INTRO_BOEM2, "scatman.wav");
	jjSampleLoad(SOUND::INTRO_BRAKE, "clap.wav");
	jjSampleLoad(SOUND::INTRO_END, "holyshit.wav");
	jjSampleLoad(SOUND::INTRO_GRAB, "hihihi.wav");
	jjSampleLoad(SOUND::INTRO_GREN2, "negative.wav");
	jjSampleLoad(SOUND::INTRO_GREN1, "roger.wav");
	jjSampleLoad(SOUND::INTRO_GREN3, "followme.wav");

	jjAlert("Type ||!soundz available ||||||for available sounds.");
}

void onChat(int clientID, string &in stringReceived, CHAT::Type chatType) {
	for(uint i = 0; i < sounds.length; i++) {
		if (stringReceived == "!soundz " + soundNames[i] && stringReceived != "!soundz available") makeSound(sounds[i]);
	}
}

bool onLocalChat(string &in stringReceived, CHAT::Type chatType) {
	for(uint i = 0; i < sounds.length; i++) {
		if (stringReceived == "!soundz available") jjAlert(soundNames[i]);
	}
	return false;
}