Skip to content

Commit

Permalink
added option to set pin of an exile vehicle #33
Browse files Browse the repository at this point in the history
  • Loading branch information
ole committed Nov 1, 2017
1 parent a741ea5 commit a78813d
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 15 deletions.
Binary file modified @AdminToolkit/addons/admintoolkit.pbo
Binary file not shown.
Binary file modified @AdminToolkit/addons/admintoolkit.pbo.admintoolkit.bisign
Binary file not shown.
Binary file modified @AdminToolkitServer/addons/admintoolkit_server.pbo
Binary file not shown.
Binary file modified @AdminToolkitServer/addons/admintoolkit_servercfg.pbo
Binary file not shown.
Binary file modified @MissionFile/Exile.Tanoa.pbo
Binary file not shown.
26 changes: 18 additions & 8 deletions source/admintoolkit_servercfg/extension/ExileMod.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,39 @@ try
_object call ExileServer_object_vehicle_database_insert;
_object call ExileServer_object_vehicle_database_update;

[_playerObject, "toastRequest", ["SuccessTitleOnly", [format["%1 Spawned!", _params] ]]] call ExileServer_system_network_send_to;
[_playerObject, "toastRequest", ["SuccessTitleOnly", [format["%1 Spawned!", _params] ]]] call ExileServer_system_network_send_to;
[_playerObject, "dynamicTextRequest", [format ["UNLOCK PIN: %1", _tmp2], 0, 2, "#ffffff"]] call ExileServer_system_network_send_to;
};
case 'exile_setvehiclepin': {
_tmp = _params select 1;
_object = objectFromNetId (_params select 0);
_object setVariable ["ExileAccessCode", _tmp];
_object call ExileServer_object_vehicle_database_update;

_tmp2 = typeof _object;

[_playerObject, "toastRequest", ["SuccessTitleOnly", [format["PIN %1 set to %2", _tmp, _tmp2] ]]] call ExileServer_system_network_send_to;
};
case 'exile_repvehicle':
{
_tmp = objectFromNetId _params;
_tmp setDamage 0;
_object = objectFromNetId _params;
_object setDamage 0;

[_playerObject, "toastRequest", ["SuccessTitleOnly", [format["%1 Repaired!", _params] ]]] call ExileServer_system_network_send_to;
};
case 'exile_destvehicle':
{
_tmp = objectFromNetId _params;
_tmp setDamage 100;
_object = objectFromNetId _params;
_object setDamage 100;

[_playerObject, "toastRequest", ["SuccessTitleOnly", [format["%1 Destroyed!", _params] ]]] call ExileServer_system_network_send_to;
};
case 'exile_delvehicle':
{
_tmp = objectFromNetId _params;
_object = objectFromNetId _params;
// _params =vehicle class name
_tmp call ExileServer_object_vehicle_remove;
deleteVehicle _tmp;
_object call ExileServer_object_vehicle_remove;
deleteVehicle _object;

[_playerObject, "toastRequest", ["SuccessTitleOnly", [format["%1 Deleted!", _params] ]]] call ExileServer_system_network_send_to;
};
Expand Down
22 changes: 15 additions & 7 deletions source/mission_file/atk/extension/ExileMod.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ AdminToolkit_OnExecute = {
_data = lbData [RscAdminToolkitDetailList_IDC, lbCurSel RscAdminToolkitDetailList_IDC];

switch (AdminToolkit_Action) do {
case "exile_repvehicle": {
['exile_repvehicle', _data] call AdminToolkit_doAction;
};
case "exile_destvehicle": {
['exile_destvehicle', _data] call AdminToolkit_doAction;
};
case "exile_repvehicle";
case "exile_destvehicle";
case "exile_delvehicle": {
['exile_delvehicle', _data] call AdminToolkit_doAction;
[AdminToolkit_Action, _data] call AdminToolkit_doAction;
};
case "exile_setvehiclepin": {
[AdminToolkit_Action, [_data, AdminToolkit_Params]] call AdminToolkit_doAction;
};
case "exile_getvehicle": {
[AdminToolkit_Action] call AdminToolkit_doAction;
Expand Down Expand Up @@ -56,6 +55,14 @@ AdminToolkit_ExileMod_loadDetails = {
[RscAdminToolkitDetailList_IDC, _list, _filter] call AdminToolkit_uiList;
_show = true;
};
case "exile_setvehiclepin": {
_list = nearestObjects [player, ["Car", "Tank", "Helicopter", "Plane"], 50];
[RscAdminToolkitDetailList_IDC, _list, _filter] call AdminToolkit_uiList;

(_display displayCtrl RscAdminToolkitParamLabel_IDC) ctrlSetStructuredText parseText "<t color='#FF0066'>Enter a valid PIN here (E.g. 1234):</t>";
(_display displayCtrl RscAdminToolkitParam_IDC) ctrlShow true;
_show = true;
};
case "exile_getmoney": {
(_display displayCtrl RscAdminToolkitParamLabel_IDC) ctrlSetStructuredText parseText "<t color='#FF0066'>How much Money, Sir? (E.g. 10000):</t>";
(_display displayCtrl RscAdminToolkitParam_IDC) ctrlShow true;
Expand All @@ -72,6 +79,7 @@ _result = [
['Repair (nearby)', 'exile_repvehicle'],
['Destroy (nearby)', 'exile_destvehicle'],
['Remove (nearby)', 'exile_delvehicle'],
['Set Vehicle PIN (nearby)', 'exile_setvehiclepin'],
['Perm Spawn', 'exile_getvehicle'],
['Get Money', 'exile_getmoney'],
['Get Respect', 'exile_getscore'],
Expand Down

0 comments on commit a78813d

Please sign in to comment.