Author Topic: Say It BIG!!!  (Read 6131 times)

Offline X4A_US_Wannabe

  • Rank: Private
  • *
  • Posts: 137
    • http://www.x4aftermath.com
Say It BIG!!!
« on: July 21, 2008, 08:08:15 pm »
After getting help from Patmansan on getting the 'typewriter' type text to display who is flying the AC130 (Link to that thread), I thought it would be cool to be able to create a new command montior feature, using the typewriter style font.

Screen shot of the end result:


As you can see, 33 to 34 characters are the max you can use without covering/hiding any of the on screen items.  Color codes (single or mulitple) can be used an still remain the 33 to 34 characters.  

Interested?  Let's get started.....

1. Open '_ex_cmdmonitor.gsc' located in your /fs_game/extreme/ folder.
2. At the bottom of the long list of 'setdvar' add the following to line 33:

setdvar("SayBig","");

So it looks like this:
Code: [Select]

setdvar("sayall", "");
setdvar("sayallcenter", "");
setdvar("switchplayerallies", "");
setdvar("switchplayeraxis", "");
setdvar("botallies", "");
setdvar("botaxis", "");
setdvar("SayBig", ""); //ADD  

   
Note: I place an //ADD at the end of anything I've added to the original code.  Help's in locating my changes that are not part of the eXtreme original files.

2.  At line 79 add the following:
v_SayBig = getdvar("SayBig");

So it looks like this:
Code: [Select]

v_SayAll = getdvar("sayall");
v_SayAllCenter = getdvar("sayallcenter");
v_SwitchPlayerAllies = getdvar("switchplayerallies");
v_SwitchPlayerAxis = getdvar("switchplayeraxis");
v_BotAllies = getdvar("botallies");
v_BotAxis = getdvar("botaxis");
v_SayBig = getdvar("SayBig"); //ADD


3. Add at line 111 the following (thanks for point my missing step Joker ):
if(v_SayBig != "") thread SayBig(v_Saybig); //ADD

So it looks like this:
Code: [Select]

if(v_SwitchPlayerAxis != "") thread switchSide(v_SwitchPlayerAxis, "axis");
if(v_BotAllies != "") thread addBot("allies");
if(v_BotAxis != "")  thread addBot("axis");
if(v_SayBig != "") thread SayBig(v_Saybig);//ADD


   

4. Scroll down to the bottom of the file, and add the following code:

Code: [Select]

//ADD
SayBig(Message)
{
players = level.players;
      for(i = 0; i < players.size; i++)
      {
         if(players[i] != self)
            players[i] thread maps\mp\gametypes\_hud_message::oldnotifyMessage(Message);
      }
setdvar("SayBig","");
}


How to use:  
Works the same as sayallcenter...  simply place your own text after the rcon command.  (/rcon set saybig)

BONUS:
You can add a custom sound to play when using this feature, (or the sayallcenter) if you want to get the servers attention.

Simply add the following line to your SayBig thread:

thread extreme\_ex_utils::playSoundLoc("mycustomsnd",(0,0,0));

So it looks like this:
Code: [Select]

//ADD
SayBig(Message)
{
thread extreme\_ex_utils::playSoundLoc("mycustomsnd",(0,0,0));
players = level.players;
      for(i = 0; i < players.size; i++)
      {
         if(players[i] != self)
            players[i] thread maps\mp\gametypes\_hud_message::oldnotifyMessage(Message);
      }
setdvar("SayBig","");
}


Where "mycustomsnd" is the name of your sound file located in the extreme.csv file.

To get your custom sound to work, you will have to have the RAW files that Joker released a few weeks ago.

Part 1:

Navagate to the /ff/soundaliases folder.  Open extreme.csv file.

Under the heading #eXtreme+, locate and copy the "wickedsick" line.

Paste it to the blank line below. So you now have 2 lines that are exactally the same.

Now change 'wickedsick' (the one you pasted) to the name of your custom sound.  ie:mycustomsnd

Finally, change the extreme/wickedsick.mp3 to your actual sound file name. ie: mycustomsnd.mp3

So it now looks like this:
Code: [Select]

mycustomsnd,,extreme/mycustomsnd.mp3,1,,music,,,,,auto2d,streamed,,,master,all_mp,,,,,,music,nowetlevel fulldrylevel,,,,,,


Save the file.


Part 2:

In the RAW files.. locate the IWD folder.  In this folder, navagate to the /sound/extreme folder.  Here is where you'll place your custom sound file.

Part 3:

Using the instructions given with the RAW files, complile a new mod.ff and z_x4.iwd file.  Make sure to place the newly created files on the server as well as your redirect for your clients to download.

I've tried to make this as easy as possible for all users.  I have no where near the coding abilities of the eXtreme team, and there could possibly be a simplier way to achieve what I have offered here.

Enjoy!!

Offline Joker{eXtreme}

  • Rank: Private
  • *
  • Posts: 6108
    • http://www.mycallofduty.com
Say It BIG!!!
« Reply #1 on: July 21, 2008, 08:37:38 pm »
Hey buddy -- right around line 106 there should be

Code: [Select]
if(v_SayBig != "") thread SayBig();

Offline X4A_US_Wannabe

  • Rank: Private
  • *
  • Posts: 137
    • http://www.x4aftermath.com
Say It BIG!!!
« Reply #2 on: July 21, 2008, 09:28:28 pm »
You are so right.. I have it at line 111

I'll edit my post to include the change.

Should look like:

Code: [Select]

if(v_SwitchPlayerAxis != "") thread switchSide(v_SwitchPlayerAxis, "axis");
if(v_BotAllies != "") thread addBot("allies");
if(v_BotAxis != "")  thread addBot("axis");
if(v_SayBig != "") thread SayBig(v_Saybig);//ADD


Offline PvtWhoOkid

  • Rank: Private
  • *
  • Posts: 425
    • http://www.tya-clan.com
Say It BIG!!!
« Reply #3 on: July 22, 2008, 12:26:14 am »
Worked like a charm. I'm loving it :D

Offline PvtGomerPyle

  • Rank: Private
  • *
  • Posts: 577
Say It BIG!!!
« Reply #4 on: July 22, 2008, 11:50:34 am »
AWESOME Wannabe!!!
I changed the sound to DOMINATING...It will make a nice taunt during the game...
Thanks for the excellent Tut and sharing it :wink:  :wink:

Offline PvtGomerPyle

  • Rank: Private
  • *
  • Posts: 577
Say It BIG!!!
« Reply #5 on: July 23, 2008, 01:13:37 pm »
You mentioned color in the first part of your thread. How do I get the messages in say green? I tried inserting ^2 before my message but it would take a number after ^

Offline Shoemaker

  • Rank: Private
  • *
  • Posts: 15
Say It BIG!!!
« Reply #6 on: July 23, 2008, 05:13:50 pm »
Aha a great idea, but at the moment I cannot get it to work.  I believe I have done all the script stuff correct but I am a rcon noob.  Being a relaxed small server we have not had the need to ever use it  :D for messaging or kicking.

So I wondered if you could explain for a real dummy what I need to type in console to get this great idea to work.

Thanks for your understanding  :wink:

Shoe

Offline PvtGomerPyle

  • Rank: Private
  • *
  • Posts: 577
Say It BIG!!!
« Reply #7 on: July 23, 2008, 05:20:58 pm »
Just follow the set by step instructions shown above. Save the original files that you have to alter in case you make a mistake...

It's pretty straight forward...

Offline PatmanSan

  • Administrator
  • Rank: Private
  • *****
  • Posts: 2527
Say It BIG!!!
« Reply #8 on: July 23, 2008, 05:34:58 pm »
Quote from: "Shoemaker"
So I wondered if you could explain for a real dummy what I need to type in console to get this great idea to work.


Once every map:
/rcon login <your_rcon_password>

Every time you need it:
/rcon set saybig <what_you_want_to_say>

Offline X4A_US_Wannabe

  • Rank: Private
  • *
  • Posts: 137
    • http://www.x4aftermath.com
Say It BIG!!!
« Reply #9 on: July 23, 2008, 05:40:36 pm »
When your using a color, the number you enter (in this case 2) will not be present (visible).  Your text however, should now be in Green as you type.

Offline PvtGomerPyle

  • Rank: Private
  • *
  • Posts: 577
Say It BIG!!!
« Reply #10 on: July 23, 2008, 05:45:16 pm »
Ah.... I see...the invisible numbers ....like n my wife's check book...lol

Thanks man :wink:

Offline PvtGomerPyle

  • Rank: Private
  • *
  • Posts: 577
Say It BIG!!!
« Reply #11 on: July 23, 2008, 05:52:48 pm »
Hey Shoe
Ignore my last post... Bad habit of not reading everything...lol

To piggyback on what Patman said try adding this to you command line:

+rcon login xx

x is the rcon password  you set in your server.cfg

This way you just have to type:

/rcon set say big Nice shot!!!

Offline Shoemaker

  • Rank: Private
  • *
  • Posts: 15
Say It BIG!!!
« Reply #12 on: July 23, 2008, 06:47:17 pm »
Thanks guys.

It ain't working so I guess I have made a mess adding the changes to gsc file but cannot see where after checking and double checking.  I have not done anything about the sound stuff as that don't interest me.

Any chance of adding a "proper working" gsc version to this thread  ?  Just in-case there are other people with my skill levels.  If not, no worries, I'll survive.

Thanks again.

Shoe

Offline X4A_US_Wannabe

  • Rank: Private
  • *
  • Posts: 137
    • http://www.x4aftermath.com
Say It BIG!!!
« Reply #13 on: July 23, 2008, 09:13:20 pm »
It's most likely a simple semi-colon or something small.  However, for the easily frustrated, lol, here is the entire _ex_cmdmonitor.gsc.

PLEASE MAKE A COPY OF YOUR ORIGINAL BEFORE YOU USE THIS MODIFIED VERSION!!!!


Code: [Select]

#include extreme\_ex_punishments;

init()
{
// Clears command dvars, just incase
setdvar("sodamachine", "");
setdvar("toilet", "");
setdvar("piano", "");
setdvar("chicken", "");
setdvar("tree", "");
setdvar("tombstone", "");
setdvar("toilet", "");
setdvar("original", "");
setdvar("team", "");
setdvar("disableweapon", "");
setdvar("enableweapon", "");
setdvar("warp", "");
setdvar("lock", "");
setdvar("unlock", "");
setdvar("suicide", "");
setdvar("smite", "");
setdvar("torch", "");
setdvar("fire", "");
setdvar("spank", "");
setdvar("arty", "");
setdvar("endmap", "");
setdvar("sayall", "");
setdvar("sayallcenter", "");
setdvar("switchplayerallies", "");
setdvar("switchplayeraxis", "");
setdvar("botallies", "");
setdvar("botaxis", "");
setdvar("SayBig", ""); //ADD

v_SodaPlayer = undefined;
v_PianoPlayer = undefined;
v_ChickenPlayer = undefined;
v_ToiletPlayer = undefined;
v_TreePlayer = undefined;
v_TombstonePlayer = undefined;
v_OriginalPlayer = undefined;

//make sure only running once
if(isDefined(level.ex_cmdmonon)) return;

level.ex_cmdmonon = true;

while(!level.ex_gameover)
{
if(level.ex_cmdmonitor_models)
{
v_TombstonePlayer = getdvar("tombstone");
v_TreePlayer = getdvar("tree");
v_ChickenPlayer = getdvar("chicken");
v_PianoPlayer = getdvar("piano");
v_ToiletPlayer = getdvar("toilet");
v_SodaPlayer = getdvar("sodamachine");
v_OriginalPlayer = getdvar("original");
}

v_DisableWeaponPlayer = getdvar("disableweapon");
v_EnableWeaponPlayer = getdvar("enableweapon");
v_WarpPlayer = getdvar("warp");
v_LockPlayer = getdvar("lock");
v_UnLockPlayer = getdvar("unlock");
v_SuicidePlayer = getdvar("suicide");
v_SmitePlayer = getdvar("smite");
v_TorchPlayer = getdvar("torch");
v_FirePlayer = getdvar("fire");
v_SpankPlayer = getdvar("spank");
v_ArtyPlayer = getdvar("arty");
v_EndMap = getdvar("endmap");
v_SayAll = getdvar("sayall");
v_SayAllCenter = getdvar("sayallcenter");
v_SwitchPlayerAllies = getdvar("switchplayerallies");
v_SwitchPlayerAxis = getdvar("switchplayeraxis");
v_BotAllies = getdvar("botallies");
v_BotAxis = getdvar("botaxis");
v_SayBig = getdvar("SayBig"); //ADD


if(level.ex_cmdmonitor_models)
{
if(v_TombstonePlayer != "") thread changePlayerModel(v_TombstonePlayer, "tombstone");
if(v_TreePlayer != "") thread changePlayerModel(v_TreePlayer, "tree");
if(v_ChickenPlayer != "") thread changePlayerModel(v_ChickenPlayer, "chicken");
if(v_PianoPlayer != "") thread changePlayerModel(v_PianoPlayer, "piano");
if(v_ToiletPlayer != "") thread changePlayerModel(v_ToiletPlayer, "toilet");
if(v_SodaPlayer != "") thread changePlayerModel(v_SodaPlayer, "sodamachine");
if(v_OriginalPlayer != "") thread changePlayerModel(v_OriginalPlayer, "original");
}

if(v_DisableWeaponPlayer != "") thread setStatusweaponPlayer(v_DisableWeaponPlayer, true);
if(v_EnableWeaponPlayer != "") thread setStatusweaponPlayer(v_EnableWeaponPlayer, false);
if(v_WarpPlayer != "") thread messWithPlayer(v_WarpPlayer, "warp");
if(v_LockPlayer != "") thread messWithPlayer(v_LockPlayer, "lock");
if(v_UnLockPlayer != "") thread messWithPlayer(v_UnLockPlayer, "unlock");
if(v_SuicidePlayer != "") thread messWithPlayer(v_SuicidePlayer, "suicide");
if(v_SmitePlayer != "") thread messWithPlayer(v_SmitePlayer, "smite");
if(v_TorchPlayer != "") thread messWithPlayer(v_TorchPlayer, "torch");
if(v_FirePlayer != "") thread messWithPlayer(v_FirePlayer, "fire");
if(v_SpankPlayer != "") thread messWithPlayer(v_SpankPlayer, "spank");
if(v_ArtyPlayer != "") thread messWithPlayer(v_ArtyPlayer, "arty");
if(v_EndMap != "") thread endMap();
if(v_SayAll != "") thread sayAll(v_SayAll, 0);
if(v_SayAllCenter != "") thread sayAll(v_SayAllCenter, 1);
if(v_SwitchPlayerAllies != "") thread switchSide(v_SwitchPlayerAllies, "allies");
if(v_SwitchPlayerAxis != "") thread switchSide(v_SwitchPlayerAxis, "axis");
if(v_BotAllies != "") thread addBot("allies");
if(v_BotAxis != "")  thread addBot("axis");
if(v_SayBig != "") thread SayBig(v_SayBig); //ADD

wait 5;
}
}

addBot(team)
{
// First clear the buffer
if(team == "allies") setdvar("botallies", "");
else setdvar("botaxis", "");

thread extreme\_ex_bots::addClient(team);
}

setStatusweaponPlayer(PlayerEntID, lever)
{
// First clear the buffer
if(lever) setdvar("disableweapon", "");
else setdvar("enableweapon", "");

// Do we want to set teams
v_team = getdvar("team");
setdvar("team", "");

playerEntID = int(PlayerEntID);
players = level.players;
for (i = 0; i < players.size; i++)
{
player = players[i];
entID = player getEntityNumber();

if(player.sessionstate == "playing" && ((entID == playerEntID) || (playerEntID == -1) || (v_team != "" && player.pers["team"] == v_team)) )
{
if(lever)
{
if(isAlive(player))
{
player thread setWeaponStatus(lever);
player iprintlnbold(&"CMDMONITOR_DISABLEWEAPONS");
if(level.ex_linux) iprintln(&"CMDMONITOR_DISABLEWEAPONSB", player.name);
else iprintln(&"CMDMONITOR_DISABLEWEAPONSB", player);
wait 1;
}
}
else
{
if(isAlive(player))
{
player thread setWeaponStatus(lever);
player iprintlnbold(&"CMDMONITOR_ENABLEWEAPONS");
if(level.ex_linux) iprintln(&"CMDMONITOR_ENABLEWEAPONSB", player.name);
else iprintln(&"CMDMONITOR_ENABLEWEAPONSB", player);
wait 1;
}
}
}
}
}

changePlayerModel(PlayerEntID, mode)
{
//first clear the buffer
setdvar(mode, "");

// Do we want to set teams
v_team = getdvar("team");
setdvar("team", "");

models = [];
pmsg = undefined;
amsg = undefined;

// Setup model's
switch(mode)
{
case "chicken":
models[0] = "chicken";
pmsg = &"CMDMONITOR_CHICKEN";
amsg = &"CMDMONITOR_CHICKENB";
break;

case "sodamachine":
models[0] = "ad_sodamachine";
pmsg = &"CMDMONITOR_SODA";
amsg = &"CMDMONITOR_SODAB";
break;

case "piano":
models[0] = "ch_piano_light";
pmsg = &"CMDMONITOR_PIANO";
amsg = &"CMDMONITOR_PIANOB";
break;

case "toilet":
models[0] = "bathroom_toilet";
pmsg = &"CMDMONITOR_TOILET";
amsg = &"CMDMONITOR_TOILETB";
break;

case "tree":
models[0] = "foliage_red_pine_lg";
pmsg = &"CMDMONITOR_TREE";
amsg = &"CMDMONITOR_TREEB";
break;

case "tombstone":
models[0] = "wetwork_grave4";
pmsg = &"CMDMONITOR_TOMBSTONE";
amsg = &"CMDMONITOR_TOMBSTONEB";
break;

case "original":
models[0] = "original";
pmsg = &"CMDMONITOR_ORIGINAL";
amsg = &"CMDMONITOR_ORIGINALB";
break;

default: return;
}

modeltype = models[randomInt(models.size)];

playerEntID = int(PlayerEntID);
players = getentarray("player", "classname");
for (i = 0; i < players.size; i++)
{
player = players[i];
entID = player getEntityNumber();

if((entID == playerEntID) || (playerEntID == -1))
{
if(isAlive(player))
{
player thread setPlayerModel(v_team, modeltype);
player iprintlnbold(pmsg);
if(level.ex_linux) iprintln(amsg, player.name);
else iprintln(amsg, player);
wait 1;
}
}
}
}

messWithPlayer(PlayerEntID, mode)
{
// First clear the buffer
setdvar(mode, "");

// Do we want to set teams
v_team = getdvar("team");
setdvar("team", "");

pmsg = undefined;
amsg = undefined;

playerEntID = int(PlayerEntID);
players = level.players;
for (i = 0; i < players.size; i++)
{
player = players[i];
entID = player getEntityNumber();

if(playerEntID == -1 && mode == "cheater") return;

if(player.sessionstate == "playing" && ((entID == playerEntID) || (playerEntID == -1) || (v_team != "" && player.pers["team"] == v_team)) )
{
if(isAlive(player))
{
switch(mode)
{
case "warp":
player.health = 0;
player thread doWarp(true);
pmsg = &"CMDMONITOR_WARP";
amsg = &"CMDMONITOR_WARPB";
break;

case "lock":
player thread doAnchor(true);
pmsg = &"CMDMONITOR_LOCK";
amsg = &"CMDMONITOR_LOCKB";
break;

case "unlock":
player thread doAnchor(false);
pmsg = &"CMDMONITOR_UNLOCK";
amsg = &"CMDMONITOR_UNLOCKB";
break;

case "suicide":
player thread doSuicide();
pmsg = &"CMDMONITOR_SUICIDE";
amsg = &"CMDMONITOR_SUICIDEB";
break;

case "smite":
player thread doSmite();
pmsg = &"CMDMONITOR_SMITE";
amsg = &"CMDMONITOR_SMITEB";
break;

case "torch":
player thread doTorch(false);
pmsg = &"CMDMONITOR_TORCH";
amsg = &"CMDMONITOR_TORCHB";
break;

case "fire":
player thread doFire();
pmsg = &"CMDMONITOR_FIRE";
amsg = &"CMDMONITOR_FIREB";
break;

case "spank":
player thread doSpank();
pmsg = &"CMDMONITOR_SPANK";
amsg = &"CMDMONITOR_SPANKB";
break;

case "arty":
player thread doArty();
pmsg = &"CMDMONITOR_ARTY_SELF";
amsg = &"CMDMONITOR_ARTY_ALL";
break;

default: return;
}

player iprintlnbold(pmsg);
if(level.ex_linux) iprintln(amsg, player.name);
else iprintln(amsg, player);
wait 1;
}
}
}
}
sayAll(Message, CenterScreen)
{
if(CenterScreen == 1)
{  
iprintlnbold(Message);
setdvar("sayallcenter", "");
}
else
{
iprintln(Message);
setdvar("sayall", "");

}
}

endMap()
{
// First clear the buffer
setdvar("endmap", "");

// Make the announcement to all players
iprintlnbold(&"CMDMONITOR_ENDMAP");

// End the map gracefully
wait 10;
level thread maps\mp\gametypes\_globallogic::forceEnd();
}

switchSide(playerEntID, side)
{
playerEntID = int(PlayerEntID);

players = level.players;
for (i = 0; i < players.size; i++)
{
player = players[i];
entID = player getEntityNumber();

if((entID == playerEntID) || (playerEntID == -1))
{
if(side != player.pers["team"])
{
player thread maps\mp\gametypes\_teams::changeTeam(side);

if(playerEntID != -1)
{
if(level.ex_linux) iprintln(&"CMDMONITOR_SWITCHSIDES", player.name);
else iprintln(&"CMDMONITOR_SWITCHSIDES", player);
}
player iprintlnbold(&"CMDMONITOR_SWITCHSIDESB");
}
}
}
}
//ADD
SayBig(Message)
{
players = level.players;
      for(i = 0; i < players.size; i++)
      {
         if(players[i] != self)
            players[i] thread maps\mp\gametypes\_hud_message::oldnotifyMessage(Message);
      }
setdvar("SayBig","");
}


Offline Shoemaker

  • Rank: Private
  • *
  • Posts: 15
Say It BIG!!!
« Reply #14 on: July 24, 2008, 03:28:55 am »
Appreciate the above post as it has made it obvious that my problem lies elsewhere.  Just will not work for me so my guess is it is a pb issue ?  I have the rcon password added to my shortcut login and if I type /rcon say blah blah I get the console text on screen. I have tried the examples shown here about /rcon set saybig blah blah and nothing.

I'll keep looking but thanks for your efforts in getting me to this stage :D

Shoe