Post: [Script] - Make Your Person Say Something..
08-14-2011, 11:34 PM #1
Correy
I'm the Original
(adsbygoogle = window.adsbygoogle || []).push({}); there's a few ways of doing this..
the full way which Activision used or the way i'm showing you..

if you want to use the Activision way i will just give you the .gsc file
You must login or register to view this content.

add this to the top of your GSC
    
#include maps\mp\gametypes\_quickmessages;


now, you need the say commads.. here they are
    
mp_cmd_followme
mp_cmd_movein
mp_cmd_fallback
mp_cmd_suppressfire
mp_cmd_attackleftflank
mp_cmd_attackrightflank
mp_cmd_holdposition
mp_cmd_regroup
mp_stm_enemyspotted
mp_stm_enemiesspotted
mp_stm_iminposition
mp_stm_areasecure
mp_stm_watchsix
mp_stm_sniper
mp_stm_needreinforcements
mp_rsp_yessir
mp_rsp_nosir
mp_rsp_onmyway
mp_rsp_sorry
mp_rsp_greatshot
mp_rsp_comeon


now, you need to add it to a code..
    
self doQuickMessage(SOUNDNAME, "");


now, the SOUNDNAME is one of the codes about, the "" is for the activision way which requires precacheString but i you can take the "" out i think.
here's an example..

    
self doQuickMessage(mp_rsp_comeon);
self doQuickMessage("mp_rsp_comeon", "");


let me know if you want a script of toggle all these, it's not hard.
(adsbygoogle = window.adsbygoogle || []).push({});
08-15-2011, 12:03 AM #2
It's better to just write a small talk function. You don't need to #include the gsc. as it has an init() function.. you don't need to precache the sounds either..
That's how I did it in MW2 as well...
if you use playsoundonplayers("whatever"); you can play them music.. I use the Russian victory music in my patch.. Smile

Oh, and you missed some, theres more talk strings than you posted..
08-15-2011, 12:13 AM #3
Correy
I'm the Original
Originally posted by x. View Post
It's better to just write a small talk function. You don't need to #include the gsc. as it has an init() function.. you don't need to precache the sounds either..
That's how I did it in MW2 as well...
if you use playsoundonplayers("whatever"); you can play them music.. I use the Russian victory music in my patch.. Smile

Oh, and you missed some, theres more talk strings than you posted..


ah, well we learn new things everday.. i know there's more but i found them after i posted, but thanks anyway Winky Winky
08-15-2011, 12:32 AM #4
Blackstorm
Veni. Vidi. Vici.
Originally posted by x. View Post
It's better to just write a small talk function. You don't need to #include the gsc. as it has an init() function.. you don't need to precache the sounds either..
That's how I did it in MW2 as well...
if you use playsoundonplayers("whatever"); you can play them music.. I use the Russian victory music in my patch.. Smile

Oh, and you missed some, theres more talk strings than you posted..


You do need to include, unless you're doing something like self thread maps\mp\gametypes\_quickmessages::doQuickMessage( sound );.
08-15-2011, 02:50 AM #5
Correy
I'm the Original
Originally posted by Blackstorm View Post
You do need to include, unless you're doing something like self thread maps\mp\gametypes\_quickmessages::doQuickMessage( sound );.


yes but isn't he using a completely different code, playsoundonplayers..
08-15-2011, 04:17 AM #6
Blackstorm
Veni. Vidi. Vici.
Originally posted by Correy View Post
yes but isn't he using a completely different code, playsoundonplayers..


If you use the built in functions no need to include then.
08-15-2011, 04:20 AM #7
Correy
I'm the Original
Originally posted by Blackstorm View Post
If you use the built in functions no need to include then.


ahh, okay.. but tha's if it is in the game :confused:
08-15-2011, 04:25 AM #8
Blackstorm
Veni. Vidi. Vici.
Originally posted by Correy View Post
ahh, okay.. but tha's if it is in the game :confused:


PlaySoundOnPlayers isn't even a function, he was probably making a small example reference.
08-15-2011, 04:27 AM #9
Correy
I'm the Original
Originally posted by Blackstorm View Post
PlaySoundOnPlayers isn't even a function, he was probably making a small example reference.


ah, okay.. i get you Winky Winky
08-15-2011, 07:21 AM #10
Originally posted by Blackstorm View Post
PlaySoundOnPlayers isn't even a function, he was probably making a small example reference.


Er, yes it is Smile

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 View Post
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 .. Winky Winky

The following user thanked x_DaftVader_x for this useful post:

Correy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo