Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ole1986/a3-admintoolkit
AdminToolkit for Arma 3 (ATK) - Extensions, Moderators, Godmode, Vehicle, global chat
https://github.com/ole1986/a3-admintoolkit
admin administration admintoolkit arma3 moderator tool
Last synced: 21 days ago
JSON representation
AdminToolkit for Arma 3 (ATK) - Extensions, Moderators, Godmode, Vehicle, global chat
- Host: GitHub
- URL: https://github.com/ole1986/a3-admintoolkit
- Owner: ole1986
- Created: 2015-11-07T17:33:25.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T11:19:04.000Z (about 5 years ago)
- Last Synced: 2024-12-07T07:22:48.648Z (about 1 month ago)
- Topics: admin, administration, admintoolkit, arma3, moderator, tool
- Language: SQF
- Homepage: http://www.exilemod.com/topic/7690-admintoolkit-for-arma-3-v222-exile-edition
- Size: 31.9 MB
- Stars: 36
- Watchers: 15
- Forks: 13
- Open Issues: 8
-
Metadata Files:
- Readme: README.MissionFile.md
Awesome Lists containing this project
README
# Extending AdminToolkit features
**PLEASE NOTE: This README is ONLY important for Extension configuration or development**
**PLEASE NOTE: Make sure you have read the README.<ExtensionName>.sqf for extensions installation instruction**
The AdminToolkit takes advantage of the MissionFile concept allowing you to add additional features.
- Extending the Menu Menu
- adding additional action command (client/server side)
- customize QuickButton actions
- (...)
Build your own Extension (Guide)To achieve this, the configuration class `CfgAdminToolkitCustomMod` is required in your `config.cpp` located in your MissionFile.
Below is an excerpt of the current `CfgAdminToolkitCustomMod`.```
class CfgAdminToolkitCustomMod {
/* Exclude some main menu items
* To only show the menus loaded from an extension, use:
*
* ExcludeMenu[] = {"Players", "Vehicles", "Weapons" , "Other"};
*/
ExcludeMenu[] = {};
/* Load an additional sqf file as MOD */
Extensions[] = {
/**
* Usage: {"", ""}
* add a new menu entry called My Extension into main menu */
{"My Extension", "MyExtension"}
};/* 4 Quick buttons allowing to add any action you want - See example below*/
QuickButtons[] = {
/* send a message to everyone using the parameter text field */
{"Restart Msg", "['messageperm', ['Server Restart in X minutes']] call AdminToolkit_doAction"},
/* Quickly get a Helicopter */
{"Heli", "['getvehicle', ['B_Heli_Light_01_armed_F']] call AdminToolkit_doAction"},
/*4 button*/
{"Empty", "['Command', ['Variable #1', 'Variable #2']] call AdminToolkit_doAction"}
};
};
```**ExcludeMenu[]**
This property is used to hide the default menu entries.
Useful when you only want to display your extension.**Extensions[]**
This property is used to load additional extensions (*.sqf files) located in the MissionFile `atk\extensions` folder.
On server side it will also include the same file from its `extensions` folder to execute global commands.**QuickButtons[]**
Allows you to overwrite the four quick buttons with some custom commands
## Build your own extension
This is a Step-by-step guide on how to build your own extension.
In this guide you will learn how to add a new Menu entry, add new action commands, pass them to the server and finally execute custom code (from server)- First, make sure you have copied the above mentioned `CfgAdminToolkitCustomMod` into the config.cpp.
- Now, add the following line into the Extensions[] property: `{"My Extension", "MyExtension"}````
Extensions[] = {
/* add a new menu entry called My Extension into main menu */
{"My Extension", "MyExtension"}
};
```- Once the menu is selected, it searches for the sqf file "MyExtension.sqf" in `atk\extension\MyExtension.sqf`. So, lets create this now:
As you can see, we have added to actions- The first (myext_hellotomyself) is a local call to showMessage only.
The second (and more interesting) action is passed to the server.- Now we need to setup the server to accept the action "myext_helloserver".
```
// extension\MyExtension.sqf (located in admintoolkit_servercfg.pbo)private['_playerObject','_request', '_params'];
_playerObject = _this select 0;
_request = _this select 1; // is supposed to be the action command (myext_helloserver)
_params = _this select 2; // is the text: "some secret text to the server"// to keep it simple output every action and parameter into servers log file (so check the log once you execute your custom action)
diag_log format["[ADMINTOOLKIT-MYEXTENSION]: The action is %1 and the parameter is %2", _request, str _params];
```