Jump to content
suffer4real

[DOCUMENT] Server commands

Recommended Posts

Today I want to show you how to execute useful commands in the debug console.

To open the debug console just login as an admin. You can do that by typing "#login yourpw" in the chat.

You can find your password in the arma3 server config file. 

If you successfully logged in, press ESC and you'll see the DEBUG Console. 

 

General Information:

Executing a command locally will run it for you only.

Executing a command globally will run that command for everyone.

Executing a command servers-side will run it for the server.

 

The following commands are all written to be executed locally.

Important: I take NO guarantee that the commands will work or won't do any harm to your server. I tested them all but I am probably not the best scripter in the world. If you have ANY additions please answer to this thread and I will happily add them to this thread.

 

-------------------------------------------------------------------------------------------

Set your current CASH

life_cash = 400000;


Set your current ATM Balance

life_atmcash = 400000;

and for 4.4 (thanks to AlaskaVet)
 

life_atmbank = 10000;


Give yourself a licence

license_civ_rebel = true;

Possible values for the licence:

license_cop_air


license_cop_swat
license_cop_cg
license_civ_driver
license_civ_air
license_civ_heroin
license_civ_marijuana
license_civ_gang
license_civ_boat
license_civ_oil
license_civ_dive
license_civ_truck
license_civ_gun
license_civ_rebel
license_civ_coke
license_civ_diamond
license_civ_copper
license_civ_iron
license_civ_sand
license_civ_salt
license_civ_cement
license_med_air
license_civ_home

 

If you execute one of the next 3 things execute this command AFTER them to refresh your HUD

[] call life_fnc_hudUpdate;

Set your current thirst (100 is not thirsty)

life_thirst = 100;

Set your current hunger (100 is not hungry)

life_hunger = 100;

Heal yourself 

player setDamage 0;

Setting your carry weight to zero allows you to buy infinite amounts of things for your "z-Inventory" if you run it every time your max carry-weight is reached

life_carryWeight = 0;

Give yourself a z-Item

[true,"cannabis",1] call life_fnc_handleInv;

Alternatives for the "cannabis" part: (these are not all possibilities) 

  • oil / oilp
  • diamond / diamondc
  • heroin / heroinp
  • copper / copper_r
  • iron / iron_r
  • sand / glass
  • salt / salt_r
  • cocaine / cocainep
  • cannabis / marijuana
  • heroin / heroinu 
  • cement / rock
  • water

Look at the object you want to destroy and execute this command and it will make BOOM

cursorTarget setDamage 1;

Repair the object you are looking at (this also works with players which equals to healing)

cursorTarget setDamage 0;

Repair the vehicle you are sitting in

vehicle player setDamage 0;

Drop a SmokeShell at the current player position (good for marking positions)

_smoke = "SmokeShell" createVehicle position player; 

Alternatives for "SmokeShell"

  • SmokeShellGreen
  • SmokeShellRed
  • SmokeShellBlue
  • SmokeShellOrange
  • SmokeShellYellow
  • SmokeShellPurple 

Alternatively you can attach the SmokeShell to yourself (or the car you are in) which creates a nice smog-tail when you move

_smoke = "SmokeShell" createVehicle position player;
if (vehicle player != player) then {
	_smoke attachTo [vehicle player, [-0.6,-1,0]];
    } else {
    _smoke attachTo [player, [0,-0.1,1.5]];
};

Unrestrain yourself when a cop restrained you

player setVariable["restrained",FALSE,TRUE];

Delete the object in front of you

deleteVehicle cursorTarget;

Create a vehicle or another object in front of you

_toSpawn = "O_G_Quadbike_01_F" createVehicle position player;

Replace O_G_Quadbike_01_F with whatever you want. A list of vehicle names can be found here:

http://wiki.7thcavalry.us/wiki/ARMA_3_Vehicles

 

Give yourself a weapon

player addWeaponGlobal "arifle_Katiba_F"; 

A list of weapon names can be found here: 

https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Weapons

 

Give yourself magazines

player addMagazineGlobal "30Rnd_556x45_Stanag_Tracer_Green";

List of magazines can be found here too (next to the weapons):

https://community.bistudio.com/wiki/Arma_3_CfgWeapons_Items

 

You can also use this command to give you a weapon and the correct magazines at the same time (arifle_SDAR_F can be any weapon and 6 is the amount of magazines)

_weapon = [player, "arifle_SDAR_F", 6] call BIS_fnc_addWeapon;

Skip the time for x hours (execute this globally and keep in mind it will produce lag)

skipTime 5;

Replace the 5 with any number between 1 and 23 

 

Execute a command for a specific player:

_uid = getPlayerUID player;  if(_uid == "THE_PID_OF_THE_PLAYER") then{     THE_FUNCTION();};

Replace THE_PID_OF_THE_PLAYER with the PID of the player which should execute the function and replace THE_FUNCTION(); with the function you want to be executed for him.

 

God Mode as suggested by midgetgrimm

player allowDamage false;

Teleport yourself to the point you are clicking at on the map as suggested by isevenbe (You can even sit in a vehicle)

Execute this once, then open the Map and just single click on a spot.

onmapsingleclick "vehicle player setpos _pos"

Teleport yourself into the air, and get a parachute

player addBackpack "B_Parachute"; player setPos [getPos player select 0, getPos player select 1, 101];

Revive the player you are looking at (no need to be medic, or to have a specific item)

[[name player],"life_fnc_revived",cursorTarget,FALSE] spawn life_fnc_MP;

Pull the driver out of the vehicle you are sitting in (useful for parachuting out of a helicopter when you are alone)

moveOut driver vehicle player;

Create an earthquake for yourself (execute globally for everyone to see it). This does no harm! It's just a nice effect.

[] spawn BIS_fnc_earthquake;

Get infinite ammunition

player addeventhandler ["fired", {(_this select 0) setvehicleammo 1}]

 

Edited by suffer4real
  • Like 1

Share this post


Link to post
Share on other sites
12 minutes ago, UltimaA380 said:

atm cash, both for 4.4 and whatever the other one was, the weapon add thing, none work.

Have you enabled the debug console on your server?

Share this post


Link to post
Share on other sites
1 hour ago, blackfisch said:

You have fo add 

F(call,ANYONE)

in your CfgRemoteExec.hpp at "class Commands" to enable the debug console in 4.X

I did that nothing changed although I was able to execute commands when doing the benchmark command thing

Share this post


Link to post
Share on other sites
11 hours ago, Michael Cameron said:

whats the command to unlock a car?

 

To get the keys use

life_vehicles set[count life_vehicles,cursorTarget];

 

To Lock and Unlock it use

[cursorTarget,0] remoteExec ["life_fnc_lockVehicle",cursorTarget];// Lock it
[cursorTarget,2] remoteExec ["life_fnc_lockVehicle",cursorTarget];// Unlock It

 

Share this post


Link to post
Share on other sites
On 24/11/2016 at 1:35 AM, Noordo said:

I was wondering if anyone could make a gui for admins with all of these commands? I would not like to spend the money to buy infistar! 

Thanks

why not you?

Share this post


Link to post
Share on other sites

I would like to add life_fnc_MP was removed a long time ago so change 

[[name player],"life_fnc_revived",cursorTarget,FALSE] spawn life_fnc_MP;

to

[name player] remoteExecCall ["life_fnc_revived",cursorTarget];

 

Share this post


Link to post
Share on other sites
3 minutes ago, AndrewBIGMustache said:

How can you remove by command a certain item in your "y" inventory?

Change the "true" to "false" :)

Share this post


Link to post
Share on other sites
On 11/28/2016 at 7:07 AM, Noordo said:

I have no clue on how to make one, i have researched how to but cant figure it out.

 

try looking into "Fusion Menu" easy to modify to include your own functions, and works rather well so long as you have no anti-cheat other than battleye.

used this before buying infistar, and works really well considering it is free. though i did get problems when adding more commands to a certain list(made a weapon list, ammo list and clothing list, where the ammo list stopped working, simply comment out things to debug what causes the error)

if you learn exactly how it works, you can make a really in depth menu, with tons of functions. though it is still only a scroll menu, it will do the job good enough, even managed to get ban functionality into it, but could not make it only show to an admin(one who logged on to the server using "#login pswd") it can also rather easily add custom menu's to different admins, by simply making a few changes, i for one had ALL functions i added, while anyone else only had about 50%

i can send you my files if you like, and still need it :)

Share this post


Link to post
Share on other sites
6 hours ago, Pesoen said:

try looking into "Fusion Menu" easy to modify to include your own functions, and works rather well so long as you have no anti-cheat other than battleye.

used this before buying infistar, and works really well considering it is free. though i did get problems when adding more commands to a certain list(made a weapon list, ammo list and clothing list, where the ammo list stopped working, simply comment out things to debug what causes the error)

if you learn exactly how it works, you can make a really in depth menu, with tons of functions. though it is still only a scroll menu, it will do the job good enough, even managed to get ban functionality into it, but could not make it only show to an admin(one who logged on to the server using "#login pswd") it can also rather easily add custom menu's to different admins, by simply making a few changes, i for one had ALL functions i added, while anyone else only had about 50%

i can send you my files if you like, and still need it :)

Yes please that would be wonderful! :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×