This commit is contained in:
Bjanski 2016-07-30 10:35:55 +02:00
parent d113445fef
commit 3896765c15
3 changed files with 89 additions and 89 deletions

View File

@ -1,4 +1,4 @@
eventHandler !="ExAd_ACTION_PARACHUTE_DETACH = (findDisplay 46) displayAddEventHandler ["KeyDown",{"
eventHandler !="ExAd_ACTION_PARACHUTE_DETACH = (findDisplay 46) displayAddEventHandler [\"KeyDown\",{"
compile !="call compile format[\"_messageParameters call ExAd_fnc_%1;\",_messageName]" !="call compile format['%1 = if(isLocalized \"%1\")then{localize \"%1\"}else{\"%3"
createVehicle !="_parachuteObject = createVehicle [\"Steerable_Parachute_F\", getPosATL player, [], 0, \"CAN_COLLIDE\"]"
addAction !="ExAd_ACTION_PARACHUTE = player addaction [format"

View File

@ -1,84 +1,84 @@
#Installation Instructions
* Move "DeployVehicle" into your "mpmissions\Exile.Tanoa\ExAdClient\XM8\Apps\" folder.
* Navigate and open "mpmissions\Exile.Tanoa\config.cpp" insert the classes "PackDeployedVehicle" into appropriate parent classes.
```cpp
class CfgInteractionMenus
{
class Car
{
targetType = 2;
target = "Car";
class Actions
{
class PackDeployedVehicle: ExileAbstractAction
{
title = "Pack Vehicle";
condition = "call ExAd_XM8_DV_fnc_canPack";
action = "call ExAd_XM8_DV_fnc_pack";
};
};
};
class Bikes
{
targetType = 2;
target = "Bicycle";
class Actions
{
class PackDeployedVehicle: ExileAbstractAction
{
title = "Pack Bike";
condition = "call ExAd_XM8_DV_fnc_canPack";
action = "call ExAd_XM8_DV_fnc_pack";
};
};
};
};
```
* Move over and pack exad_dv into "@ExileServer\addons\"
* Add deploy classes into CfgXM8 in "mpmissions\Exile.Tanoa\config.cpp" and add them to the extraApps array; E.g.
```cpp
class CfgXM8
{
extraApps[] = {"ExAd_Bike","ExAd_Quad"};
class ExAd_Bike
{
title = "Deploy Bike";
config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf";
bambiState = 0;
vehicleClass = "Exile_Bike_MountainBike";
recipe[] = {{"Exile_Item_ExtensionCord",-1}};
packable = 1;
autoCleanUp = 1;
quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle";
};
class ExAd_Quad
{
title = "Deploy Quad";
bambiState = 0;
vehicleClass = "Exile_Bike_QuadBike_Fia";
recipe[] = {{"Exile_Item_ExtensionCord",1}};
packable = 1;
quickFunction = "['ExAd_Quad'] call ExAd_XM8_DV_fnc_spawnVehicle";
};
};
```
## How to use
Each class added to the CfgXM8 will represent a vehicle possible to deploy and add commit a "More" button to it.
One of the deploy classes needs to include the config script so all needed functions will be prepared and read to memory.
### Options
* title = "Deploy Bike"; -- Button title
* bambiState = 0; -- Bambistate required || 1 = True / 0 = False
* vehicleClass = "Exile_Bike_MountainBike"; -- CfgVehicles class name of desired vehicle
* recipe[] = {
{"Exile_Item_ExtensionCord",-1}
}; -- items needed to craft vehicle, first class name then amount (-1 means required but will not be taken from inventory)
* packable = 1; -- Deployed vehicle can be pack again || 1 = True / 0 = False
* autoCleanUp = 1; -- Server monitize crafted vehicles and despawn if idle to long. || 1 = True / 0 = False
* quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; -- Function that is binded to the button if slide is not neccessary.
#Installation Instructions
* Move "DeployVehicle" into your "mpmissions\Exile.Tanoa\ExAdClient\XM8\Apps\" folder.
* Navigate and open "mpmissions\Exile.Tanoa\config.cpp" insert the classes "PackDeployedVehicle" into appropriate parent classes.
```cpp
class CfgInteractionMenus
{
class Car
{
targetType = 2;
target = "Car";
class Actions
{
class PackDeployedVehicle: ExileAbstractAction
{
title = "Pack Vehicle";
condition = "call ExAd_XM8_DV_fnc_canPack";
action = "call ExAd_XM8_DV_fnc_pack";
};
};
};
class Bikes
{
targetType = 2;
target = "Bicycle";
class Actions
{
class PackDeployedVehicle: ExileAbstractAction
{
title = "Pack Bike";
condition = "call ExAd_XM8_DV_fnc_canPack";
action = "call ExAd_XM8_DV_fnc_pack";
};
};
};
};
```
* Move over and pack exad_dv into "@ExileServer\addons\"
* Add deploy classes into CfgXM8 in "mpmissions\Exile.Tanoa\config.cpp" and add them to the extraApps array; E.g.
```cpp
class CfgXM8
{
extraApps[] = {"ExAd_Bike","ExAd_Quad"};
class ExAd_Bike
{
title = "Deploy Bike";
config = "ExadClient\XM8\Apps\DeployVehicle\config.sqf";
bambiState = 0;
vehicleClass = "Exile_Bike_MountainBike";
recipe[] = {{"Exile_Item_ExtensionCord",-1}};
packable = 1;
autoCleanUp = 1;
quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle";
};
class ExAd_Quad
{
title = "Deploy Quad";
bambiState = 0;
vehicleClass = "Exile_Bike_QuadBike_Fia";
recipe[] = {{"Exile_Item_ExtensionCord",1}};
packable = 1;
quickFunction = "['ExAd_Quad'] call ExAd_XM8_DV_fnc_spawnVehicle";
};
};
```
## How to use
Each class added to the CfgXM8 will represent a vehicle possible to deploy and add commit a "More" button to it.
One of the deploy classes needs to include the config script so all needed functions will be prepared and read to memory.
### Options
* title = "Deploy Bike"; -- Button title
* bambiState = 0; -- Bambistate required || 1 = True / 0 = False
* vehicleClass = "Exile_Bike_MountainBike"; -- CfgVehicles class name of desired vehicle
* recipe[] = {
{"Exile_Item_ExtensionCord",-1}
}; -- items needed to craft vehicle, first class name then amount (-1 means required but will not be taken from inventory)
* packable = 1; -- Deployed vehicle can be pack again || 1 = True / 0 = False
* autoCleanUp = 1; -- Server monitize crafted vehicles and despawn if idle to long. || 1 = True / 0 = False
* quickFunction = "['ExAd_Bike'] call ExAd_XM8_DV_fnc_spawnVehicle"; -- Function that is binded to the button if slide is not neccessary.

View File

@ -42,13 +42,13 @@ while {_title != ""} do
_display = uiNameSpace getVariable ["RscExileXM8", displayNull];
_pW = 0.025; _pH = 0.04;
_slide = ctrlParentControlsGroup (_display displayCtrl _count2);
{
private["_ctrl","_pos","_logo"];
_ctrl = (_display displayCtrl _count2);
private["_ctrl","_pos","_logo","_function"];
_ctrl = _display displayCtrl _count2;
_pos = ctrlPosition _ctrl;
_slide = ctrlParentControlsGroup _ctrl;
_logo = if(isText(missionConfigFile >> "CfgXM8" >> _x >> "logo"))then{getText(missionConfigFile >> "CfgXM8" >> _x >> "logo")}else{"ExAdClient\Core\Img\logo.paa"};
[_display,_slide,([_x,format["AppIcon%1",_count2]] call ExAd_fnc_getNextIDC),[(_pos select 0) + 1.5 * _pW, (_pos select 1) + 0.625 * _pH, 3 * _pW, 3 * _pH],_logo,[1,1,1,1],false,true,""] call ExAd_fnc_createPicture;