Originally posted by Blackstorm
PlaySoundOnPlayers isn't even a function, he was probably making a small example reference.
Er, yes it is
Try this ( use it like that without self or player in front of it..
PlaySoundOnPlayers("mp_victory_soviet");
There are lots of built in sound and print functions that you can use..
Here are a few of them..
playSoundOnPlayers( sound, team )
play_sound_on_tag( alias, tag )
printOnTeam(text, team)
printBoldOnTeam(text, team)
printBoldOnTeamArg(text, team, arg)
printAndSoundOnEveryone( team, otherteam, printFriendly, printEnemy, soundFriendly, soundEnemy, printarg )
_playLocalSound( soundAlias )
playSoundToTeam( soundAlias, team, self );
play_sound_in_space (alias, origin, master)
fire_effect()
---------- Post added at 08:11 AM ---------- Previous post was at 08:03 AM ----------
Originally posted by Correy
yes but isn't he using a completely different code, playsoundonplayers..
What I meant was. Make a function like this
Chat(soundalias, saytext ){
self playSound(soundalias );
self sayAll(saytext);}
Then you can just switch whatever sound you want. A lot of the sounds work, some don't though. Look back at the MW2 patches by Mossy and Dt etc.. they all used this method..
BTW, in your OP, thats what the second set of "" do. It prints on screen with your name next to when you say the sound alias.
EDIT: This probably works without any precache or #include
self doSound( soundAlias );
with any of the bits with "" around below..
level.bcSounds["reload"] = "inform_reloading_generic";
level.bcSounds["frag_out"] = "inform_attack_grenade";
level.bcSounds["flash_out"] = "inform_attack_flashbang";
level.bcSounds["smoke_out"] = "inform_attack_smoke";
level.bcSounds["conc_out"] = "inform_attack_stun";
level.bcSounds["c4_plant"] = "inform_attack_thwc4";
level.bcSounds["claymore_plant"] = "inform_plant_claymore";
level.bcSounds["kill"] = "inform_killfirm_infantry";
level.bcSounds["casualty"] = "inform_casualty_generic";
---------- Post added at 08:21 AM ---------- Previous post was at 08:11 AM ----------
^^ I have no idea what is going on there with the double post thing... it wasn't me ..