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.
02-07-2011, 07:04 PM #47
xHunteerZz
★ xHunteerZz--™ ☆
I dont think i have ever saw a elite mossy post/Thread without a thanks Cool Man (aka Tustin)
02-07-2011, 07:05 PM #48
HtD
Dark Knight
Lol what does the character say?
02-08-2011, 02:42 PM #49
RusterG
The one and Only
Originally posted by TheEliteMossy View Post
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


WOOHOO i figured it out FINALLY, god dang it, i can't believe how simple it was lol, i always look for the most obvious things last lol, **** knows why tho lol...

Hey Mossy mind if i post up a guide telling people how to do this properly mate?

i dunno if you want it to be hard for the noob coders or not, so thats why im asking lol... Happy

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo