Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Killsounds V0.5
- //By 3lionz
- //
- //Special thanks to:
- //Nighthawk043
- //RockeyRex
- //Functions to call when:
- addMessageCallback("MsgJoinWelcome", KillSounds_reset);
- addMessageCallback("MsgPracticeEnd", KillSounds_reset);
- addMessageCallback("MsgPlayerKill", KillSounds_addkd);
- //Set values
- if(!isObject(KillSounds))
- {
- new ScriptObject(KillSounds)
- {
- PlayerName = "null";
- Gkills = 0;
- Skills = 0;
- };
- }
- //Reset values
- function KillSounds_reset(%a, %b, %c, %d)
- {
- if(%c !$= "")
- {
- KillSounds.Skills = 0;
- //KillSounds.Gkills = 0;
- KillSounds.PlayerName = KillSounds_strip(%c);
- }
- }
- //Debug
- function KillSounds_strip(%name)
- {
- echo("KSDebug: ",stripColorCodes(replaceTeamStrings(detag(%name))));
- return stripColorCodes(replaceTeamStrings(detag(%name)));
- }
- function KillSounds_addkd(%msgType, %msgString, %c, %d)
- {
- //If you die, reset kill streak
- if(KillSounds_strip(%c) $= KillSounds.PlayerName)
- {
- KillSounds.Skills = 0;
- KillSounds.Skills--;
- }
- if(KillSounds_strip(%d) $= KillSounds.PlayerName)
- {
- //If you kill someone, add to killstreak
- KillSounds.Skills++;
- //Groupkills is glitchy, come back later.
- //KillSounds.Gkills++;
- //If there is one kill, play "FirstBlood"
- /* if(KillSounds.Gkills $= 1)
- {
- sfxPlayOnce(FirstBlood);
- } */
- if(KillSounds.Skills $= 3)
- {
- sfxPlayOnce(KillingSpree);
- }
- if(KillSounds.Skills $= 4)
- {
- sfxPlayOnce(Rampage);
- }
- if(KillSounds.Skills $= 5)
- {
- sfxPlayOnce(Dominating);
- }
- if(KillSounds.Skills $= 6)
- {
- sfxPlayOnce(Unstoppable);
- }
- if(KillSounds.Skills $= 7)
- {
- sfxPlayOnce(Godlike);
- }
- if(KillSounds.Skills >= 8 && KillSounds.Skills < 15)
- {
- sfxPlayOnce(Ownage);
- }
- if(KillSounds.Skills >= 15)
- {
- sfxPlayOnce(MJ1284);
- }
- echo("KS: Solo Kills: ", KillSounds.Skills);
- //echo(KillSounds.Gkills);
- }
- }
- //Add the sounds :)
- package KillSounds
- {
- function Audio::initialize( )
- {
- parent::initialize( );
- new SFXProfile(FirstBlood)
- {
- filename = "mods/autoexec/KillSounds/firstblood.wav";
- description = AudioGui;
- preload = true;
- };
- new SFXProfile(KillingSpree)
- {
- filename = "mods/autoexec/KillSounds/Killing_Spree.wav";
- description = AudioGui;
- preload = true;
- };
- new SFXProfile(Rampage)
- {
- filename = "mods/autoexec/KillSounds/Rampage.wav";
- description = AudioGui;
- preload = true;
- };
- new SFXProfile(Dominating)
- {
- filename = "mods/autoexec/KillSounds/Dominating.wav";
- description = AudioGui;
- preload = true;
- };
- new SFXProfile(Unstoppable)
- {
- filename = "mods/autoexec/KillSounds/Unstoppable.wav";
- description = AudioGui;
- preload = true;
- };
- new SFXProfile(GodLike)
- {
- filename = "mods/autoexec/KillSounds/GodLike.wav";
- description = AudioGui;
- preload = true;
- };
- new SFXProfile(Ownage)
- {
- filename = "mods/autoexec/KillSounds/Ownage.wav";
- description = AudioGui;
- preload = true;
- };
- new SFXProfile(MJ1284)
- {
- filename = "mods/autoexec/KillSounds/MJ1284.wav";
- description = AudioGui;
- preload = true;
- };
- }
- };
- activatepackage(KillSounds);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement