Post: [tut] How to put Elite Mossys player speak into patch.
02-09-2011, 07:54 AM #1
RusterG
The one and Only
(adsbygoogle = window.adsbygoogle || []).push({}); Don't be afraid to post a comment, help keep this thread on the first page, so we can help out more people!

put this code onPlayerSpawned()

    self.Spam=0;


This code does not go into your GSC this code contains the inputs.

    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;
}}


The inputs look like this: mp_cmd_suppressfire


Here are all of the inputs that are contained within the code above.

    
mp_stm_sniper

mp_cmd_holdposition

mp_cmd_suppressfire

mp_cmd_followme

mp_cmd_movein

mp_rsp_sorry

mp_stm_areasecure

mp_rsp_greatshot

mp_cmd_regroup

mp_stm_needreinforcements


What the player says is indicated at the end of each input

EXAMPLE:

mp_stm_needreinforcements - Notice at the end it says needreinforcements this means the player will say Need Reinforcements etc.....


Put this code into a GSC this is what you will put all the functions as.
    
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;
}


now on the menu you put it in this is how it should be laid out.

menu.namer[1]="Hold Position";
menu.funcs[1]=::doSpeak;
menu.namer[1]="mp_cmd_holdposition";
menu.namer[2]="Suppressing Fire!";
menu.funcs[2]=::doSpeak;
menu.input[2]="mp_cmd_suppressfire";

etc...

where you put the input varies, depending on the menu your putting them in...


For Example...

menuHost(){
menu=spawnStruct();
menu.namer=[];
menu.funcs=[];
menu.input=[];
menu.namer[0]="Host";
menu.namer[1]=".....";
menu.namer[2]=".....";
menu.namer[3]=".....";
menu.funcs[1]=::.....;
menu.funcs[2]=::.....;
menu.funcs[3]=::.....;
menu.input[1]=......;
menu.input[2]=......;
menu.input[3]=......;

etc....

well that should do it, if you get lost, this tut wasn't clear enough, get an error or your stuck just quote this thread and i will try to help you's the best i can...

ENJOY
Credits:
Elite Mossy (made the code)
I take absolutely no credit for the making of this code!!!
(adsbygoogle = window.adsbygoogle || []).push({});

The following 6 users say thank you to RusterG for this useful post:

.DeadlyMoDz25, Ju1cy, Mw2Freak13, oO-GKUSH-Oo, ViiZiiKz, xELiT3_Sn1PaXx
02-17-2011, 07:07 PM #11
x-FuRY-x
< ^ > < ^ >
Thanks for the code Ruster, and thank you too Derek for improving it Smile You are both awesome
02-18-2011, 10:22 AM #12
RusterG
The one and Only
Originally posted by Glasbey View Post
Thanks for the code Ruster, and thank you too Derek for improving it Smile You are both awesome


thanks nd i would just like to make sure you know its not my code its elite mossys...

i just made an easy guide to put it into your patch Smile

The following user thanked RusterG for this useful post:

hdc89

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo