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, 11:37 PM #38
ps3gamefreak55
Do a barrel roll!
Ha love the codes: "doswallowwhengivinghead()" :P. on the way down to sending this i saw about 500 other messages saying the same thing so idk why im bothering saying this again ha :P
01-30-2011, 11:45 PM #39
Slay No More
Who’s Jim Erased?
Originally posted by another user
doGiveHead();
LOL!
Thats epic i lol'd hard
01-31-2011, 01:29 AM #40
Woof
...hmm
yet another good code Smile
btw- loving the thread names :tits:
+rep'd
02-06-2011, 12:06 AM #41
oO-GKUSH-Oo
< ^ > < ^ >
I think it was made for unexperienced coders to get confused lol
02-06-2011, 07:06 PM #42
LightModz
League Champion
same im confuzed :'(

The following user thanked LightModz for this useful post:

The InvadeR
02-06-2011, 07:40 PM #43
I've been looking for something like this for agesHappy
02-06-2011, 07:59 PM #44
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


NICE! i find the function names abit desturbing tho lol,
"soSwallowWhenGivingHead"

"doGiveHead"

LMFAO!!
02-07-2011, 05:04 PM #45
RusterG
The one and Only
Originally posted by deckie123 View Post
OMG i dnt like posts like this its confusing plz be more exact.. and ppl stop saying thank you when you no dam well you dont even no how to put it in a patch smh. dam fanboys and suck ups i bet you guys will swallowwhengivinghead();


"suck ups" yeah alright mate, he made an awsome code and it deserves a thank you, the same as anyone else who makes a code thats worth thanking, it doesn't matter if you can put it in your patch or not.....


thats why you ask someone who knows how to put it into your patch, and get help from them, don't call people suck ups just because there thanking someone for a job well done....
02-07-2011, 05:11 PM #46
sanjx1
Do a barrel roll!
thanks 4 the code , i will defo use it

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo