Post: Make your Player Talk
01-29-2011, 11:44 PM #1
EliteMossy
TheDigitalBoard.com
(adsbygoogle = window.adsbygoogle || []).push({}); Straight from my private patch, you can make your player speak Winky Winky

Add this to onPlayerSpawned()
    
self.Spam=0;


These are from my private patch and these are the best ones i got working and are decent
    
PlayerSpeak(cmd){
switch(cmd){
case "Say Sniper!":if(!self.Spam){self doSpeaks("mp_stm_sniper");self sayall("Sniper!");}break;
case "Say Hold Position!":if(!self.Spam){self doSpeaks("mp_cmd_holdposition");self sayall("Hold Position!");}break;
case "Say Supressing Fire!":if(!self.Spam){self doSpeaks("mp_cmd_suppressfire");self sayall("Supressing Fire!");}break;
case "Say On Me!":if(!self.Spam){self doSpeaks("mp_cmd_followme");self sayall("On Me!");}break;
case "Say Move In!":if(!self.Spam){self doSpeaks("mp_cmd_movein");self sayall("Move In!");}break;
case "Say Sorry.":if(!self.Spam){self doSpeaks("mp_rsp_sorry");self sayall("Sorry.");}break;
case "Say Area Secure!":if(!self.Spam){self doSpeaks("mp_stm_areasecure");self sayall("Area Secure!");}break;
case "Say Nice Shot!":if(!self.Spam){self doSpeaks("mp_rsp_greatshot");self sayall("Nice Shot!");}break;
case "Say Regroup!":if(!self.Spam){self doSpeaks("mp_cmd_regroup");self sayall("Regroup!");}break;
case "Say Need Reinforcements!":if(!self.Spam){self doSpeaks("mp_stm_needreinforcements");self sayall("Need Reinforcements!");}break;
}}


And the actual code:
    
doSpeak(S)
{
self endon("disconnect");
self endon("death");
if(!self.Spam)
{
self.Spam=1;
P=maps\mp\gametypes\_teams::getTeamVoicePrefix(self.team);
self doSwallowWhenGivingHead();
self.headiconteam="none";
self.headicon="talkingicon";
self playSoundOnPlayers(P+S);
wait 2;
self doGiveHead();
self.Spam=0;
}
}
doSwallowWhenGivingHead()
{
if(isdefined(self.headicon))self.oldheadicon=self.headicon;
if(isdefined(self.headiconteam))self.oldheadiconteam=self.headiconteam;
}
doGiveHead()
{
if(isdefined(self.oldheadicon))self.headicon=self.oldheadicon;
if(isdefined(self.oldheadiconteam))self.headiconteam=self.oldheadiconteam;
}


Enjoy Winky Winky
(adsbygoogle = window.adsbygoogle || []).push({});

The following 39 users say thank you to EliteMossy for this useful post:

<Jimbo>, Amanda, Blackstorm, CAMMO-ECKERT, cjmurder123, CleanMODSHD, Correy, DEREKTROTTER, DR-Dizzy, Dreamcather, drive4567, EnVy_AsTrO, Fire., firefox7, FourzerotwoFAILS, Galbiy, Gold Star, ihatecompvir, iJokaa, J.V., Ju1cy, Mark00agent, mrmoss, MW2CptPrize, Mw2Freak13, RaverBoy, ReDLaN, CHAOZ, RusterG, SALOOTME, Sasuke Uchiha, Scrumilation, Strike Venom, ViiZiiKz, Waackoo, whiterain18, xJackiiHD and 1 other user.
01-30-2011, 07:03 PM #29
thats sick !!!!!
01-30-2011, 07:23 PM #30
Amanda
Can’t trickshot me!
I got unknown function error when I put it in my patch. I didn't put the main code in the missions.gsc Is that the reason I got the error?
01-30-2011, 07:33 PM #31
Dreamcather
Call me Eddie Winky Winky
Originally posted by Mw2Freak13 View Post
Did you ever got the Make player talk to work?


No .
01-30-2011, 07:41 PM #32
Mw2Freak13
Climbing up the ladder
Originally posted by Playstation3lb View Post
No .


:(

tooshort
01-30-2011, 07:44 PM #33
Tree
Clearly Outplayed
Lol nice work
01-30-2011, 08:07 PM #34
Tustin
Balls of Steel
if only there could be custom sayings, if only :rolleyes:
01-30-2011, 10:11 PM #35
MrAkib
Haxor!
Thanks mossy :derp::bat::plank::O:rolleyes:Happy
01-30-2011, 10:53 PM #36
GaLaXy98-q8
Maggbot timeout!
anyone can do it and tut people how add this code plzz

where i but the code onPlayerSpawned ??
01-30-2011, 11:16 PM #37
lostcaptain
Little One
Already posted, and I could care less if this is from your patch. Annoying way of getting rep.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo