Forums Index >> Modding >> Need to add more Hot keys, Please help !
Page : <1> :
Just copy the datablock:
MoveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', "/tm PASS");"); }
moveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', "/tm PASS");"); }
moveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', "/tm PASS");"); }
Ect...
//Quotetoggler script by Master TMO
//Press Ctrl-T to load the messages.
function swapHotKeys(%val)
{
if(%val)
{
commandToServer('messageSent',"/ QuoteToggler® Messages Loaded.");
for(%i = 0;%i < 13; %i++)
{
if(strlen($HK[%i])>0)
GlobalActionMap.bindCmd(keyboard, "F" @ %i, "","commandToServer('messageSent',"" @ $HK[%i] @ "");");
else
GlobalActionMap.bindCmd(keyboard, "F" @ %i, "","");
}
if(strlen($HK[%i])>0)
//GlobalActionMap.bindCmd(mouse, button1, "","commandToServer('messageSent',"" @ $HK[%i] @ "');");
GlobalActionMap.bindCmd(mouse, button1, "","commandToServer('messageSent',"" @ $HK[%i] @ "");");
else
GlobalActionMap.bindCmd(mouse, button1, "","");
}
}
moveMap.bind(keyboard,"ctrl t",swapHotKeys);
$HK[1] = "F1 Message";
$HK[2] = "F2 Message";
$HK[3] = "F3 Message";
$HK[4] = "F4 Message";
$HK[5] = "F5 Message";
$HK[6] = "F6 Message";
$HK[7] = "F7 Message";
$HK[8] = "F8 Message";
$HK[9] = "F9 Message";
$HK[10] = "F10 Message";
$HK[11] = "F11 Message";
$HK[12] = "F12 Message";
$HK[13] = "Right Mouse button message"; //This is the right mouse button
//Quotetoggler script by Master TMO
Just paste this at the bottom of your Main.CS file and change the F-key messages to be whatever you want.
Last edited: Tuesday, January 11, 2005 at 6:23:39 AM
So I would have to delete what I have all ready right ? I thought you were on Mac also MASTER TMO or doesn't that matter ? Also can I change it from the F keys to regular keys ? B)
Last edited: Tuesday, January 11, 2005 at 6:50:19 AM
I'm on a PC using XP as well. This code is pretty well hardcoded to the Function keys I'm afraid.
But you've already got the code to set up individual keys (like R) to a hotkey message. Just duplicate the line like this:
moveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', "/tm PASS");");
moveMap.bindCmd(keyboard, "T", "","commandToServer('messageSent', "/tm HELP");");
Hey lthanks fellas this is a great tip
Roo
Ok I have a problem. Here is what I have done,
{
if(%val)
{
for(%i = 0;%i < PlayGui.getCount(); %i++)
{
%obj = PlayGui.getObject(%i);
if(%obj.getClassName()$="GuiShapeNameHud")
{
%obj.visible = !%obj.visible;
return;
}
}
}
}
moveMap.bind(keyboard,"ctrl n",toggleNames);
MoveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', "/tm PASS");");
moveMap.bindCmd(keyboard, "T", "","commandToServer('messageSent', "/tm Need AMMO");");
moveMap.bindCmd(keyboard, "Q", "","commandToServer('messageSent', "hi all");"); }
Exec("game/client/scripts/radarZoom.cs");
exec("game/server/scripts/Antidiver.cs.dso");
//exec("game/client/ui/ZRadar.cs");
The problem is, only the team pass one works what am I doing wrong ?
Not positive without testing it on my system, but try this:
MoveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', ""/tm PASS"");");
moveMap.bindCmd(keyboard, "T", "","commandToServer('messageSent', ""/tm Need AMMO"");");
moveMap.bindCmd(keyboard, "Q", "","commandToServer('messageSent', ""hi all"");");
Well I tried that and no luck the only one that works is ,
MoveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', ""/tm PASS"");");
Last edited: Wednesday, January 12, 2005 at 10:32:41 AM
What happens if you move the T mapping above the R mapping?
Ok when I moved those on top of my "R" key, they all stopped working ! :[
Last edited: Wednesday, January 12, 2005 at 10:58:03 AM
Have you removed the } from the end of the Q line?
Actually, just move it to the next line. It appears to be ending a block that you don't have the beginning of copied, so I don't know what it is for.
Last edited: Wednesday, January 12, 2005 at 11:12:05 AM
Last resort is for you to send me a copy of your entire Main.CS file for checking this evening.
I will send a copy to you right now. Thanks Master TMO for helping me with this. B)
Bump
Sorry - didn't have any time last night to look at it. Got home just before the PS8 game, and then was busy after it too. Will try again tonight.
Thank you ! B)
Contact Master TMO or me if you need help with this ! Look in our profiles ! B)
Last edited: Thursday, January 13, 2005 at 8:06:02 PM
Page : <1> :
This thread has been locked
Ok I need to add some more Hot keys and every thing I have tried is not working. So here is what I have,
moveMap.bindCmd(keyboard, "R", "","commandToServer('messageSent', "/tm PASS");"); }
Exec("game/client/scripts/radarZoom.cs");
exec("game/server/scripts/Antidiver.cs.dso");
//exec("game/client/ui/ZRadar.cs");
So how do I add more Hot keys please ? Oh by the way I am on a PC with Windows XP. B)
Last edited: Tuesday, January 11, 2005 at 6:12:53 AM