Poll

How should it be layed out?

Name - commands they suggested
30 (76.9%)
no names, just commands
9 (23.1%)

Total Members Voted: 39

Author Topic: Console Command List  (Read 72918 times)

Open config/client/config.cs.

Every line beginning with moveMap.bind( has three parameters. The third one is a function name. Any function listed there can be called with functionName(1) to simulate the bound key being pressed, or functionName(0) to simulate it being released.

Every line begining with moveMap.bindCmd has four parameters. The third is what to do when the key is pressed, the fourth is what to do when released.

From this list you can discover jet(), jump(), crouch(), and countless others.



However, it also shows how to create custom commands. Note that you enter these in the console, and then they will automatically save when you quit. How about
Code: [Select]
moveMap.bindCmd(keyboard, "ctrl j", "Canvas.PushDialog(JoinServerGui);", "");To quickly review the server list?

And perhaps you may find
Code: [Select]
moveMap.bindCmd(keyboard, "alt j", "", "jet(1);");useful, to turn jets on, and leave them on, without requiring you to hold the mouse button down.


Note that this is the absolute worst way to add a keybind, it is best to use the proper route of adding it to the configuration menu if you are writing an add-on, however this method is useful for quickly adding a button mid-game that only you will ever need/use. If you actually plan on releasing anything, please, do it right the first time and just add it to the option menu.

Type setModPaths(getModPaths()); exec("add-ons/[add-on name]/server.cs"); Into the console to load an add-on. You will need to reset the mission, simply change the map and it will be working.

Heres how to make yourself different sizes client-sided (it will work in ANY server!):

serverConnection.getControlOb ject().setScale("num1 num2 num3");

replace num1, num2 and num3 with numbers.

Heres how to make yourself different sizes client-sided (it will work in ANY server!):

serverConnection.getControlOb ject().setScale("num1 num2 num3");

replace num1, num2 and num3 with numbers.

It doesn't show that to anyone else on the server.



for(%i=0;%i<getDataBlockGroupSize();%i++) { %db = getDataBlock(%i); echo(%db.getName() SPC "(" @ %db.getClassName() @ ")"); } - list all datablocks

echo(getDataBlockGroupSize()); - show amount of datablocks



for(%i=0;%i<getNumActivePackages();%i++) echo(getActivePackage(%i)); - list all activated packages

for(%i=$numClientPackages;%i<getNumActivePackages();%i++) echo(getActivePackage(%i)); - list all server-sided active packages

for(%i=0;%i<$numClientPackages;%i++) echo(getActivePackage(%i)); - list all client-sided active packages

echo(getNumActivePackages()); - show amount of activated packages

echo(getNumActivePackages() - $numClientPackages); - show amount of server-sided activated packages

echo($numClientPackages); - show amount of client-sided activated packages



echo(getBrickCount()); - show amount of bricks

echo(getClipboard()); - show the contents of your clipboard

setClipboard("hello, world"); - set the contents of your clipboard to hello, world

echo(getComputerName()); - show the name of your computer

echo(getCurrentMinuteOfYear()); - show which minute in this year it is

echo(getCurrentYear()); - show which year it is

echo(getDateTime()); - show the current date and time

echo(getDayOfYear()); - show which day of the year it is

echo(getRandom()); - show a random floating-point number

echo(getRandom(5, 8)); - show a random number from 5 to 8

echo(getSimTime() / 60); - show how many minutes Blockland has been running

echo(getTotalRam()); - show how much RAM your computer has

Port, please post in normal text, not like this.

Why? It helps separate what is actual code and what isn't.

floating-point number is like:

1.24

Am I correct?



for(%i=0;%i<getDataBlockGroupSize();%i++) { %db = getDataBlock(%i); echo(%db.getName() SPC "(" @ %db.getClassName() @ ")"); } - list all datablocks

echo(getDataBlockGroupSize()); - show amount of datablocks



for(%i=0;%i<getNumActivePackages();%i++) echo(getActivePackage(%i)); - list all activated packages

for(%i=$numClientPackages;%i<getNumActivePackages();%i++) echo(getActivePackage(%i)); - list all server-sided active packages

for(%i=0;%i<$numClientPackages;%i++) echo(getActivePackage(%i)); - list all client-sided active packages

echo(getNumActivePackages()); - show amount of activated packages

echo(getNumActivePackages() - $numClientPackages); - show amount of server-sided activated packages

echo($numClientPackages); - show amount of client-sided activated packages



echo(getBrickCount()); - show amount of bricks

echo(getClipboard()); - show the contents of your clipboard

setClipboard("hello, world"); - set the contents of your clipboard to hello, world

echo(getComputerName()); - show the name of your computer

echo(getCurrentMinuteOfYear()); - show which minute in this year it is

echo(getCurrentYear()); - show which year it is

echo(getDateTime()); - show the current date and time

echo(getDayOfYear()); - show which day of the year it is

echo(getRandom()); - show a random floating-point number

echo(getRandom(5, 8)); - show a random number from 5 to 8

echo(getSimTime() / 60); - show how many minutes Blockland has been running

echo(getTotalRam()); - show how much RAM your computer has

Is there also a get function to know how many players are in a server? Yeah i know, i can see it if i press F2, but i wanna know how to do it into console.

listClients(); - show a list of all players on the server (only as host)

echo(getBrickCount()); - show the amount of bricks on the server (only as host)