DAZZLE'S UPGRADE PACK

If you haven't already done so, upgrade your game by downloading Dazzle's all-in-one upgrade pack. It comes with everything you need for today's servers. Does your blue bar freeze when joining servers? Do you lag in games? Do you get an annoying siren in Phobik's Servers? This is what you need. CLICK HERE TO DOWNLOAD.

In-game binds/hotkeys

Modding questions, answers, help.....

Moderators: Warfare, Moderator, Admin

DJ Wings
Need Major Repair
Need Major Repair
Posts: 895
Joined: Thu Dec 28, 2006 9:01 am
Location: Places... Places.

In-game binds/hotkeys

Post by DJ Wings »

Pitcure this situation: You have hotkeys for everything imaginable. But, at some point right in the middle of a game, you realize you're going to be saying "/ping 56k" a lot. ( :razz: ) And you wish you'd thought of a hotkey for it. So, you type "/bind p /ping 56k". From then until you quit the game (after which you can just add it to your hotkeys), pressing P will ping poor old 56k Lag Man.
Here's the code to do it:

Code: Select all

function MessageHud_Edit::eval(%this)
{
   %text = trim(%this.getValue());
   if(%text !$= "")
   {
      %ops = restWords(%text);
      if(firstWord(%text) $= "/bind")
      {
         moveMap.bindCmd(keyboard,getSubStr(%ops, 0, 1),"","commandToServer('messageSent',\""@restWords(%ops)@"\");");
         %text = restWords(%ops);
         MessageHud.close();
         return;
      }
      if(MessageHud.isTeamMsg)
         commandToServer('teamMessageSent', %text);
      else
         commandToServer('messageSent', %text);
   }
   MessageHud.close();
}
You don't need to be playing on a server with ACAS installed to use this code. You don't even need it installed on your computer, this has nothing to do with ACAS. You can also put chat messages there instead of codes... but I SERIOUSLY don't recommend it.
EDIT: I forgot to mention... Your ignore script won't work if you have this installed.
Never really gone, never really part of the game.

Who is online

Users browsing this forum: ClaudeBot [Bot] and 17 guests