Major Hotfix 01042025@1925
This commit is contained in:
parent
c6daf95415
commit
9c1ff847a7
@ -57,7 +57,7 @@ switch (_condition) do {
|
|||||||
case ("payday"): {
|
case ("payday"): {
|
||||||
private _totalPayment = 0;
|
private _totalPayment = 0;
|
||||||
private _paymentToDo = [];
|
private _paymentToDo = [];
|
||||||
private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BIS_fnc_getCfgData;
|
private _payGrades = (missionConfigFile >> "CfgPaygrades" >> "payGrades") call BIS_fnc_getCfgData;
|
||||||
|
|
||||||
{
|
{
|
||||||
private _player = _x;
|
private _player = _x;
|
||||||
|
@ -19,7 +19,7 @@ private _list2 = _dialog displayCtrl 2023003;
|
|||||||
|
|
||||||
lbSetCurSel [2023001, 0];
|
lbSetCurSel [2023001, 0];
|
||||||
|
|
||||||
private _payGrades = (missionConfigFile >> "FORGE_CfgPaygrades" >> "payGrades") call BFUNC(getCfgData);
|
private _payGrades = (missionConfigFile >> "CfgPaygrades" >> "payGrades") call BFUNC(getCfgData);
|
||||||
|
|
||||||
{
|
{
|
||||||
private _index = _list2 lbAdd format ["%1 - $%2", (_x select 0), ((_x select 1) call EFUNC(misc,formatNumber))];
|
private _index = _list2 lbAdd format ["%1 - $%2", (_x select 0), ((_x select 1) call EFUNC(misc,formatNumber))];
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
PREP(addArmoryItem);
|
PREP(addArmoryItem);
|
||||||
PREP(addGarageVehicle);
|
PREP(addGarageVehicle);
|
||||||
PREP(addVirtualVehicle);
|
PREP(addVirtualVehicles);
|
||||||
PREP(initArsenal);
|
PREP(initArsenal);
|
||||||
PREP(openArmory);
|
PREP(openArmory);
|
||||||
PREP(openGarage);
|
PREP(openGarage);
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
[{
|
[{
|
||||||
GETVAR(player,value_loadDone,false)
|
GETVAR(player,value_loadDone,false)
|
||||||
}, {
|
}, {
|
||||||
private _armoryUnlocks = GETVAR(player,Armory_Unlocks,[]);
|
private _armory_unlocks = player getVariable ["Armory_Unlocks", [[],[],[],[]]];
|
||||||
private _garageUnlocks = GETVAR(player,Garage_Unlocks,[]);
|
private _garage_unlocks = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]];
|
||||||
|
|
||||||
[_armoryUnlocks, _garageUnlocks] call FUNC(initArsenal);
|
[_armory_unlocks, _garage_unlocks] call FUNC(initArsenal);
|
||||||
}] call CFUNC(waitUntilAndExecute);
|
}] call CFUNC(waitUntilAndExecute);
|
@ -7,5 +7,8 @@ PREP_RECOMPILE_END;
|
|||||||
|
|
||||||
GVAR(armory_unlocks) = [];
|
GVAR(armory_unlocks) = [];
|
||||||
GVAR(garage_unlocks) = [];
|
GVAR(garage_unlocks) = [];
|
||||||
|
GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue);
|
||||||
|
GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue);
|
||||||
|
GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999];
|
||||||
|
|
||||||
ADDON = true;
|
ADDON = true;
|
@ -5,24 +5,37 @@
|
|||||||
* Adds item to player's armory unlocks and updates virtual arsenal
|
* Adds item to player's armory unlocks and updates virtual arsenal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_class","",[""]],["_type",0,[0]]];
|
params [["_class", "", [""]], ["_type", "", [""]]];
|
||||||
|
|
||||||
private _default = [[],[],[],[]];
|
private _default = [[],[],[],[]];
|
||||||
|
// private _armory_unlocks = player getVariable ["Armory_Unlocks", _default];
|
||||||
private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default);
|
private _armory_unlocks = GETVAR(player,Armory_Unlocks,_default);
|
||||||
private _index = (_armory_unlocks select _type) pushBackUnique _class;
|
|
||||||
|
private _typeToNumber = switch (_type) do {
|
||||||
|
case "backpack": {3};
|
||||||
|
case "facewear": {0};
|
||||||
|
case "headgear": {0};
|
||||||
|
case "hmd": {0};
|
||||||
|
case "item": {0};
|
||||||
|
case "magazine": {2};
|
||||||
|
case "uniform": {0};
|
||||||
|
case "vest": {0};
|
||||||
|
case "weapon": {1};
|
||||||
|
default {0};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _index = (_armory_unlocks select _typeToNumber) pushBackUnique _class;
|
||||||
|
|
||||||
if (_index > -1) then {
|
if (_index > -1) then {
|
||||||
SETVAR(player,Armory_Unlocks,_armory_unlocks);
|
// player setVariable ["Armory_Unlocks", _armory_unlocks, true];
|
||||||
|
SETPVAR(player,Armory_Unlocks,_armory_unlocks);
|
||||||
|
|
||||||
if (GVAR(armory_type) == 0) then {
|
if (GVAR(armory_type) == 0) then {
|
||||||
[GVAR(gear_box),[_class],false,true,1,_type] call BFUNC(addVirtualItemCargo);
|
[GVAR(gear_box), [_class], false, true, 1, _typeToNumber] call BFUNC(addVirtualItemCargo);
|
||||||
} else {
|
} else {
|
||||||
[GVAR(gear_box), [_class]] call AFUNC(arsenal,addVirtualItems);
|
[GVAR(gear_box), [_class]] call AFUNC(arsenal,addVirtualItems);
|
||||||
};
|
};
|
||||||
|
|
||||||
["armory",_armory_unlocks] call FUNC(updateUnlocks);
|
|
||||||
["armory"] call FUNC(saveUnlocks);
|
|
||||||
|
|
||||||
TRACE_2("Item added to armory",_class,_type);
|
TRACE_2("Item added to armory",_class,_type);
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
@ -6,18 +6,28 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
params [["_class","",[""]],["_type",0,[0]]];
|
params [["_class", "", [""]], ["_type", "", [""]]];
|
||||||
|
|
||||||
private _default = [[],[],[],[],[],[]];
|
private _default = [[],[],[],[],[],[]];
|
||||||
|
// private _garage_unlocks = player getVariable ["Garage_Unlocks", _default];
|
||||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
||||||
private _index = (_garage_unlocks select _type) pushBackUnique _class;
|
|
||||||
|
private _typeToNumber = switch (_type) do {
|
||||||
|
case "car": {0};
|
||||||
|
case "armor": {1};
|
||||||
|
case "heli": {2};
|
||||||
|
case "plane": {3};
|
||||||
|
case "naval": {4};
|
||||||
|
case "static": {5};
|
||||||
|
default {0};
|
||||||
|
};
|
||||||
|
|
||||||
|
private _index = (_garage_unlocks select _typeToNumber) pushBackUnique _class;
|
||||||
|
|
||||||
if (_index > -1) then {
|
if (_index > -1) then {
|
||||||
SETVAR(player,Garage_Unlocks,_garage_unlocks);
|
// player setVariable ["Garage_Unlocks", _garage_unlocks, true];
|
||||||
[[_class]] call FUNC(addVirtualVehs);
|
SETPVAR(player,Garage_Unlocks,_garage_unlocks);
|
||||||
|
[[_class]] call FUNC(addVirtualVehicles);
|
||||||
["garage",_garage_unlocks] call FUNC(updateUnlocks);
|
|
||||||
["garage"] call FUNC(saveUnlocks);
|
|
||||||
|
|
||||||
TRACE_2("Vehicle added to garage",_class,_type);
|
TRACE_2("Vehicle added to garage",_class,_type);
|
||||||
true
|
true
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
params [["_vehicles", [], [[]]]];
|
params [["_vehicles", [], [[]]]];
|
||||||
|
|
||||||
private _default = [[],[],[],[],[],[]];
|
private _default = [[],[],[],[],[],[]];
|
||||||
|
// private _garage_unlocks = player getVariable ["Garage_Unlocks", _default];
|
||||||
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
private _garage_unlocks = GETVAR(player,Garage_Unlocks,_default);
|
||||||
|
|
||||||
private _cars = _garage_unlocks select 0;
|
private _cars = _garage_unlocks select 0;
|
||||||
@ -75,6 +76,4 @@ GVAR(static_unlocks) = [];
|
|||||||
GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
|
GVAR(static_unlocks) append [getText(configFile >> "CfgVehicles" >> _x >> "model"),[configFile >> "CfgVehicles" >> _x]];
|
||||||
} forEach _static;
|
} forEach _static;
|
||||||
|
|
||||||
["garage",_garage_unlocks] call FUNC(updateUnlocks);
|
|
||||||
|
|
||||||
TRACE_1("Virtual vehicles updated",count _vehicles);
|
TRACE_1("Virtual vehicles updated",count _vehicles);
|
@ -1,29 +1,36 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
params [["_armory_data", [[],[],[],[]], [[]]], ["_garage_data", [[],[],[],[],[],[]], [[]]]];
|
params [["_armory_data", [], [[]]], ["_garage_data", [], [[]]]];
|
||||||
|
|
||||||
if (count _armory_data != 4) then { _armory_data = [[],[],[],[]] };
|
if (count _armory_data isEqualTo [""]) then { _armory_data = [[],[],[],[]] };
|
||||||
if (count _garage_data != 6) then { _garage_data = [[],[],[],[],[],[]] };
|
if (count _garage_data isEqualTo [""]) then { _garage_data = [[],[],[],[],[],[]] };
|
||||||
|
if (GVAR(armory_type) == 0) then {
|
||||||
GVAR(gear_box) = "ReammoBox_F" createVehicleLocal [0, 0, -999];
|
{
|
||||||
[GVAR(gear_box), false, false] call AFUNC(arsenal,initBox);
|
[GVAR(gear_box), _x, false, true, 1, _forEachIndex] call BFUNC(addVirtualItemCargo);
|
||||||
|
} forEach _armory_data;
|
||||||
GVAR(pdb_mode) = "PDB_MODE" call BFUNC(getParamValue);
|
} else {
|
||||||
GVAR(armory_type) = "ARS_TYPE" call BFUNC(getParamValue);
|
{
|
||||||
|
[GVAR(gear_box), _x] call AFUNC(arsenal,addVirtualItems);
|
||||||
|
} forEach _armory_data;
|
||||||
|
};
|
||||||
|
|
||||||
GVAR(armory_unlocks) = _armory_data;
|
GVAR(armory_unlocks) = _armory_data;
|
||||||
GVAR(garage_unlocks) = _garage_data;
|
GVAR(garage_unlocks) = _garage_data;
|
||||||
|
|
||||||
GVAR(item_unlocks) = _armory_data # 0;
|
GVAR(item_unlocks) = _armory_data select 0;
|
||||||
GVAR(weapon_unlocks) = _armory_data # 1;
|
GVAR(weapon_unlocks) = _armory_data select 1;
|
||||||
GVAR(magazine_unlocks) = _armory_data # 2;
|
GVAR(magazine_unlocks) = _armory_data select 2;
|
||||||
GVAR(backpack_unlocks) = _armory_data # 3;
|
GVAR(backpack_unlocks) = _armory_data select 3;
|
||||||
|
|
||||||
GVAR(car_unlocks) = _garage_data # 0;
|
GVAR(car_unlocks) = _garage_data select 0;
|
||||||
GVAR(armor_unlocks) = _garage_data # 1;
|
GVAR(armor_unlocks) = _garage_data select 1;
|
||||||
GVAR(heli_unlocks) = _garage_data # 2;
|
GVAR(heli_unlocks) = _garage_data select 2;
|
||||||
GVAR(plane_unlocks) = _garage_data # 3;
|
GVAR(plane_unlocks) = _garage_data select 3;
|
||||||
GVAR(naval_unlocks) = _garage_data # 4;
|
GVAR(naval_unlocks) = _garage_data select 4;
|
||||||
GVAR(static_unlocks) = _garage_data # 5;
|
GVAR(static_unlocks) = _garage_data select 5;
|
||||||
|
|
||||||
|
{
|
||||||
|
[_x] call FUNC(addVirtualVehicles);
|
||||||
|
} forEach GVAR(garage_unlocks);
|
||||||
|
|
||||||
TRACE_2("Arsenal System Initialized with defaults",count GVAR(armory_unlocks),count GVAR(garage_unlocks));
|
TRACE_2("Arsenal System Initialized with defaults",count GVAR(armory_unlocks),count GVAR(garage_unlocks));
|
@ -1,6 +1,6 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
_locations = (missionConfigFile >> "FORGE_CfgGarages" >> "locations") call BFUNC(getCfgData);
|
_locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData);
|
||||||
{
|
{
|
||||||
GVAR(vehSpawnPos) = (_x select 1) getPos [5, (_x select 2)];
|
GVAR(vehSpawnPos) = (_x select 1) getPos [5, (_x select 2)];
|
||||||
} count _locations;
|
} count _locations;
|
||||||
@ -33,9 +33,20 @@ SETMVAR(BIS_fnc_garage_centerType,_defaultVehicle);
|
|||||||
_veh = typeOf _obj;
|
_veh = typeOf _obj;
|
||||||
_textures = getObjectTextures _obj;
|
_textures = getObjectTextures _obj;
|
||||||
_animationNames = animationNames _obj;
|
_animationNames = animationNames _obj;
|
||||||
|
|
||||||
|
private _vehicleType = switch true do {
|
||||||
|
case (_obj isKindOf "Car" && !(_obj isKindOf "Tank") && !(_obj isKindOf "Wheeled_APC_F")): {"car"};
|
||||||
|
case (_obj isKindOf "Tank" || _obj isKindOf "Wheeled_APC_F"): {"armor"};
|
||||||
|
case (_obj isKindOf "Helicopter"): {"heli"};
|
||||||
|
case (_obj isKindOf "Plane"): {"plane"};
|
||||||
|
case (_obj isKindOf "Ship"): {"naval"};
|
||||||
|
case (_obj isKindOf "Static"): {"static"};
|
||||||
|
default {"car"};
|
||||||
|
};
|
||||||
|
|
||||||
{ deleteVehicle _x } forEach _nearestObjects;
|
{ deleteVehicle _x } forEach _nearestObjects;
|
||||||
_createVehicle = createVehicle [_veh, GVAR(vehSpawnPos), [], 0, "CAN_COLLIDE"];
|
_createVehicle = createVehicle [_veh, GVAR(vehSpawnPos), [], 0, "CAN_COLLIDE"];
|
||||||
_createVehicle setVariable ["FORGE_GarageVehicle", true, true];
|
_createVehicle setVariable ["FORGE_VehicleType", _vehicleType, true];
|
||||||
|
|
||||||
if (count _textures > 0) then {
|
if (count _textures > 0) then {
|
||||||
_count = 0;
|
_count = 0;
|
||||||
|
@ -14,23 +14,24 @@
|
|||||||
* ["armory"] call forge_client_arsenal_fnc_saveArsenalUnlocks
|
* ["armory"] call forge_client_arsenal_fnc_saveArsenalUnlocks
|
||||||
*/
|
*/
|
||||||
|
|
||||||
params [["_type","",[""]],["_data",[],[[]]]];
|
params [["_type", "", [""]]];
|
||||||
|
|
||||||
private _default_armory_unlocks = [[],[],[],[]];
|
|
||||||
private _default_garage_unlocks = [[],[],[],[],[],[]];
|
|
||||||
|
|
||||||
switch (_type) do {
|
switch (_type) do {
|
||||||
case "armory": {
|
case "armory": {
|
||||||
private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_unlocks);
|
private _default_armory_data = [[],[],[],[]];
|
||||||
|
// private _armory_data = player getVariable ["Armory_Unlocks", [[],[],[],[]]];
|
||||||
|
private _armory_data = GETVAR(player,Armory_Unlocks,_default_armory_data);
|
||||||
|
|
||||||
switch (GVAR(pdb_mode)) do {
|
switch (GVAR(pdb_mode)) do {
|
||||||
case 0: {
|
case 0: {
|
||||||
|
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
|
||||||
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
||||||
};
|
};
|
||||||
case 1: {
|
case 1: {
|
||||||
["hsetid", getPlayerUID player, "armory_unlocks", -1, _armory_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
["hsetid", getPlayerUID player, "armory_unlocks", -1, _armory_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
||||||
};
|
};
|
||||||
default {
|
default {
|
||||||
|
// profileNamespace setVariable ["Armory_Unlocks", _armory_data];
|
||||||
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
SETVAR(profileNamespace,Armory_Unlocks,_armory_data);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -39,16 +40,20 @@ switch (_type) do {
|
|||||||
};
|
};
|
||||||
|
|
||||||
case "garage": {
|
case "garage": {
|
||||||
private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_unlocks);
|
private _default_garage_data = [[],[],[],[],[],[]];
|
||||||
|
// private _garage_data = player getVariable ["Garage_Unlocks", [[],[],[],[],[],[]]];
|
||||||
|
private _garage_data = GETVAR(player,Garage_Unlocks,_default_garage_data);
|
||||||
|
|
||||||
switch (GVAR(pdb_mode)) do {
|
switch (GVAR(pdb_mode)) do {
|
||||||
case 0: {
|
case 0: {
|
||||||
|
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
|
||||||
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
||||||
};
|
};
|
||||||
case 1: {
|
case 1: {
|
||||||
["hsetid", getPlayerUID player, "garage_unlocks", -1, _garage_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
["hsetid", getPlayerUID player, "garage_unlocks", -1, _garage_data, "", false] remoteExec ["dragonfly_db_fnc_addTask", 2, false];
|
||||||
};
|
};
|
||||||
default {
|
default {
|
||||||
|
// profileNamespace setVariable ["Garage_Unlocks", _garage_data];
|
||||||
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
SETVAR(profileNamespace,Garage_Unlocks,_garage_data);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
private _amount = parseNumber (ctrlText IDC_AMOUNTINPUT);
|
private _amount = parseNumber (ctrlText IDC_AMOUNTINPUT);
|
||||||
// private _bank = player getVariable ["FORGE_Bank", 0];
|
// private _bank = player getVariable ["FORGE_Bank", 0];
|
||||||
// private _cash = player getVariable ["FORGE_Cash", 0];
|
// private _cash = player getVariable ["FORGE_Cash", 0];
|
||||||
|
|
||||||
private _bank = GETVAR(player,FORGE_Bank,0);
|
private _bank = GETVAR(player,FORGE_Bank,0);
|
||||||
private _cash = GETVAR(player,FORGE_Cash,0);
|
private _cash = GETVAR(player,FORGE_Cash,0);
|
||||||
|
|
||||||
@ -11,9 +10,8 @@ if (_amount > 0 && _amount <= _cash) then {
|
|||||||
_cash = _cash - _amount;
|
_cash = _cash - _amount;
|
||||||
_bank = _bank + _amount;
|
_bank = _bank + _amount;
|
||||||
|
|
||||||
// player setVariable ["FORGE_Bank", _bank];
|
// player setVariable ["FORGE_Bank", _bank, true];
|
||||||
// player setVariable ["FORGE_Cash", _cash];
|
// player setVariable ["FORGE_Cash", _cash, true];
|
||||||
|
|
||||||
SETPVAR(player,FORGE_Bank,_bank);
|
SETPVAR(player,FORGE_Bank,_bank);
|
||||||
SETPVAR(player,FORGE_Cash,_cash);
|
SETPVAR(player,FORGE_Cash,_cash);
|
||||||
|
|
||||||
|
@ -2,17 +2,22 @@
|
|||||||
|
|
||||||
// private _bank = player getVariable ["FORGE_Bank", 0];
|
// private _bank = player getVariable ["FORGE_Bank", 0];
|
||||||
// private _cash = player getVariable ["FORGE_Cash", 0];
|
// private _cash = player getVariable ["FORGE_Cash", 0];
|
||||||
// private _rating = player getVariable ["FORGE_Rating", 0];
|
|
||||||
private _bank = GETVAR(player,FORGE_Bank,0);
|
private _bank = GETVAR(player,FORGE_Bank,0);
|
||||||
private _cash = GETVAR(player,FORGE_Cash,0);
|
private _cash = GETVAR(player,FORGE_Cash,0);
|
||||||
private _rating = GETVAR(player,FORGE_Rating,0);
|
private _payMultiplier = "MULTIPLYR" call BFUNC(getParamValue);
|
||||||
|
private _plyscore = rating player;
|
||||||
|
private _pending = _plyscore * _payMultiplier;
|
||||||
|
|
||||||
disableSerialization;
|
disableSerialization;
|
||||||
createDialog "RscBankDialog";
|
createDialog "RscBankDialog";
|
||||||
|
|
||||||
ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]];
|
private _formattedBank = _bank call EFUNC(misc,formatNumber);
|
||||||
ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]];
|
private _formattedCash = _cash call EFUNC(misc,formatNumber);
|
||||||
ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]];
|
private _formattedPending = _pending call EFUNC(misc,formatNumber);
|
||||||
|
|
||||||
|
ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _formattedCash]];
|
||||||
|
ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _formattedBank]];
|
||||||
|
ctrlSetText [IDC_RATINGTEXT, format ["Pending: %1", _formattedPending]];
|
||||||
ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"];
|
ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"];
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -2,15 +2,20 @@
|
|||||||
|
|
||||||
// private _bank = player getVariable ["FORGE_Bank", 0];
|
// private _bank = player getVariable ["FORGE_Bank", 0];
|
||||||
// private _cash = player getVariable ["FORGE_Cash", 0];
|
// private _cash = player getVariable ["FORGE_Cash", 0];
|
||||||
// private _rating = player getVariable ["FORGE_Rating", 0];
|
|
||||||
private _bank = GETVAR(player,FORGE_Bank,0);
|
private _bank = GETVAR(player,FORGE_Bank,0);
|
||||||
private _cash = GETVAR(player,FORGE_Cash,0);
|
private _cash = GETVAR(player,FORGE_Cash,0);
|
||||||
private _rating = GETVAR(player,FORGE_Rating,0);
|
private _payMultiplier = "MULTIPLYR" call BFUNC(getParamValue);
|
||||||
|
private _plyscore = rating player;
|
||||||
|
private _pending = _plyscore * _payMultiplier;
|
||||||
|
|
||||||
|
private _formattedBank = _bank call EFUNC(misc,formatNumber);
|
||||||
|
private _formattedCash = _cash call EFUNC(misc,formatNumber);
|
||||||
|
private _formattedPending = _pending call EFUNC(misc,formatNumber);
|
||||||
|
|
||||||
if (!isNull (findDisplay IDD_BANKDIALOG)) then {
|
if (!isNull (findDisplay IDD_BANKDIALOG)) then {
|
||||||
ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _cash]];
|
ctrlSetText [IDC_CASHTEXT, format ["Cash: $%1", _formattedCash]];
|
||||||
ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _bank]];
|
ctrlSetText [IDC_BANKTEXT, format ["Bank: $%1", _formattedBank]];
|
||||||
ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _rating]];
|
ctrlSetText [IDC_RATINGTEXT, format ["Rating: %1", _formattedPending]];
|
||||||
ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"];
|
ctrlSetText [IDC_TIMESHEETTEXT, "Ready for Timesheet"];
|
||||||
ctrlSetText [IDC_AMOUNTINPUT, ""];
|
ctrlSetText [IDC_AMOUNTINPUT, ""];
|
||||||
ctrlSetText [IDC_PLAYERINPUT, ""];
|
ctrlSetText [IDC_PLAYERINPUT, ""];
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
// private _bank = player getVariable ["FORGE_Bank", 0];
|
// private _bank = player getVariable ["FORGE_Bank", 0];
|
||||||
// private _rating = player getVariable ["FORGE_Rating", 0];
|
|
||||||
private _bank = GETVAR(player,FORGE_Bank,0);
|
private _bank = GETVAR(player,FORGE_Bank,0);
|
||||||
private _rating = GETVAR(player,FORGE_Rating,0);
|
private _payMultiplyer = "MULTIPLYR" call BFUNC(getParamValue);
|
||||||
private _pending = rating player;
|
private _plyscore = rating player;
|
||||||
|
private _multiplyer = _plyscore * _payMultiplyer;
|
||||||
|
|
||||||
_rating = _rating + _pending;
|
_bank = _bank + _multiplyer;
|
||||||
_bank = _bank + _rating;
|
|
||||||
|
|
||||||
player addRating - _pending;
|
player addRating - _plyscore;
|
||||||
// player setVariable ["FORGE_Bank", _bank];
|
// player setVariable ["FORGE_Bank", _bank];
|
||||||
// player setVariable ["FORGE_Rating", 0];
|
// player setVariable ["FORGE_Rating", 0];
|
||||||
SETPVAR(player,FORGE_Bank,_bank);
|
SETPVAR(player,FORGE_Bank,_bank);
|
||||||
@ -18,5 +17,7 @@ SETPVAR(player,FORGE_Rating,0);
|
|||||||
// [] call forge_client_bank_fnc_refresh;
|
// [] call forge_client_bank_fnc_refresh;
|
||||||
[] call FUNC(refresh);
|
[] call FUNC(refresh);
|
||||||
|
|
||||||
// hint format ["Timesheet submitted! Received $%1 bonus based on rating of %2", _rating, _rating];
|
private _formattedRating = _bank call EFUNC(misc,formatNumber);
|
||||||
[format ["Timesheet submitted! Received $%1 based on rating of %2", _rating, _rating], "info", 3, "right"] call EFUNC(misc,notify);
|
|
||||||
|
// hint format ["Timesheet submitted! Received $%1 bonus based on rating of %2", _formattedRating, _plyscore];
|
||||||
|
[format ["Timesheet submitted! Received $%1 based on rating of %2", _formattedRating, _plyscore], "info", 3, "right"] call EFUNC(misc,notify);
|
@ -13,8 +13,8 @@ if (_amount > 0 && _amount <= _bank) then {
|
|||||||
_bank = _bank - _amount;
|
_bank = _bank - _amount;
|
||||||
_cash = _cash + _amount;
|
_cash = _cash + _amount;
|
||||||
|
|
||||||
// player setVariable ["FORGE_Bank", _bank];
|
// player setVariable ["FORGE_Bank", _bank, true];
|
||||||
// player setVariable ["FORGE_Cash", _cash];
|
// player setVariable ["FORGE_Cash", _cash, true];
|
||||||
SETPVAR(player,FORGE_Bank,_bank);
|
SETPVAR(player,FORGE_Bank,_bank);
|
||||||
SETPVAR(player,FORGE_Cash,_cash);
|
SETPVAR(player,FORGE_Cash,_cash);
|
||||||
|
|
||||||
|
@ -31,8 +31,6 @@ if (isNil "companyFunds") then { companyFunds = 0 };
|
|||||||
if (isNil "companyRating") then { companyRating = 0 };
|
if (isNil "companyRating") then { companyRating = 0 };
|
||||||
if (isNil "companyGenerals") then { companyGenerals = [] };
|
if (isNil "companyGenerals") then { companyGenerals = [] };
|
||||||
if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] };
|
if (isNil "companyGarageUnlocks") then { companyGarageUnlocks = [] };
|
||||||
// if (isNil "forge_client_armory_arsenalUnlocks") then { forge_client_armory_arsenalUnlocks = [] };
|
|
||||||
// if (isNil "forge_client_armory_garageUnlocks") then { forge_client_armory_garageUnlocks = [] };
|
|
||||||
if (isNil EGVAR(arsenal,armory_unlocks)) then { EGVAR(arsenal,armory_unlocks) = [[],[],[],[]] };
|
if (isNil EGVAR(arsenal,armory_unlocks)) then { EGVAR(arsenal,armory_unlocks) = [[],[],[],[]] };
|
||||||
if (isNil EGVAR(arsenal,garage_unlocks)) then { EGVAR(arsenal,garage_unlocks) = [[],[],[],[],[],[]] };
|
if (isNil EGVAR(arsenal,garage_unlocks)) then { EGVAR(arsenal,garage_unlocks) = [[],[],[],[],[],[]] };
|
||||||
|
|
||||||
|
@ -66,4 +66,4 @@ if (isNull objectParent player) then {
|
|||||||
private _hashMap = createHashMapFromArray _data;
|
private _hashMap = createHashMapFromArray _data;
|
||||||
|
|
||||||
// profileNamespace setVariable ["FORGE_PlayerData", _hashMap];
|
// profileNamespace setVariable ["FORGE_PlayerData", _hashMap];
|
||||||
SETPVAR(profileNamespace,FORGE_PlayerData,_hashMap);
|
SETVAR(profileNamespace,FORGE_PlayerData,_hashMap);
|
@ -8,13 +8,15 @@ private _storedVehicles = GETVAR(player,FORGE_Garage,[]);
|
|||||||
lbClear _garageList;
|
lbClear _garageList;
|
||||||
|
|
||||||
{
|
{
|
||||||
_x params ["_isGarageVehicle", "_className", "_vehData"];
|
// _x params ["_vehType", "_className", "_vehData"];
|
||||||
|
_x params ["_vehType", "_className"];
|
||||||
|
|
||||||
private _index = -1;
|
private _index = -1;
|
||||||
private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
|
private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
|
||||||
private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture");
|
private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture");
|
||||||
|
|
||||||
_index = _garageList lbAdd _displayName;
|
_index = _garageList lbAdd _displayName;
|
||||||
_garageList lbSetData [_index, str [_isGarageVehicle, _className, _vehData]];
|
// _garageList lbSetData [_index, str [_vehType, _className, _vehData]];
|
||||||
|
_garageList lbSetData [_index, str [_vehType, _className]];
|
||||||
_garageList lbSetPicture [_index, _picture];
|
_garageList lbSetPicture [_index, _picture];
|
||||||
} forEach _storedVehicles;
|
} forEach _storedVehicles;
|
@ -11,17 +11,19 @@ private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFU
|
|||||||
{
|
{
|
||||||
if ((getPosATLVisual player) distance (_x select 1) < 20) then {
|
if ((getPosATLVisual player) distance (_x select 1) < 20) then {
|
||||||
{
|
{
|
||||||
// private _isGarageVehicle = _x getVariable ["FORGE_GarageVehicle", false];
|
// private _vehType = _x getVariable ["FORGE_VehicleType", ""];
|
||||||
private _isGarageVehicle = GETVAR(_x,FORGE_GarageVehicle,false);
|
private _vehType = GETVAR(_x,FORGE_VehicleType,"");
|
||||||
|
// private _hitPointsData = getAllHitPointsDamage _x;
|
||||||
|
|
||||||
if (_isGarageVehicle) then {
|
if (_vehType != "") then {
|
||||||
private _vehData = [
|
// private _vehData = [
|
||||||
getAllHitPointsDamage _x,
|
// fuel _x,
|
||||||
fuel _x,
|
// damage _x,
|
||||||
damage _x
|
// str _hitPointsData
|
||||||
];
|
// ];
|
||||||
|
|
||||||
_temp pushBackUnique [_isGarageVehicle, typeOf _x, _vehData, netId _x];
|
// _temp pushBackUnique [_vehType, typeOf _x, _vehData, netId _x];
|
||||||
|
_temp pushBackUnique [_vehType, typeOf _x, netId _x];
|
||||||
} else {
|
} else {
|
||||||
["This vehicle was not spawned from the garage and cannot be stored.", "warning", 3, "right"] call EFUNC(misc,notify);
|
["This vehicle was not spawned from the garage and cannot be stored.", "warning", 3, "right"] call EFUNC(misc,notify);
|
||||||
};
|
};
|
||||||
@ -30,13 +32,15 @@ private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFU
|
|||||||
} forEach _locations;
|
} forEach _locations;
|
||||||
|
|
||||||
{
|
{
|
||||||
_x params ["_isGarageVehicle", "_className", "_vehData", "_netID"];
|
// _x params ["_vehType", "_className", "_vehData", "_netID"];
|
||||||
|
_x params ["_vehType", "_className", "_netID"];
|
||||||
|
|
||||||
private _index = -1;
|
private _index = -1;
|
||||||
private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
|
private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
|
||||||
private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture");
|
private _picture = getText (configFile >> "CfgVehicles" >> _className >> "picture");
|
||||||
|
|
||||||
_index = _vehicleList lbAdd _displayName;
|
_index = _vehicleList lbAdd _displayName;
|
||||||
_vehicleList lbSetData [_index, str [_isGarageVehicle, _className, _vehData, _netID]];
|
// _vehicleList lbSetData [_index, str [_vehType, _className, _vehData, _netID]];
|
||||||
|
_vehicleList lbSetData [_index, str [_vehType, _className, _netID]];
|
||||||
_vehicleList lbSetPicture [_index, _picture];
|
_vehicleList lbSetPicture [_index, _picture];
|
||||||
} forEach _temp;
|
} forEach _temp;
|
@ -11,34 +11,43 @@ ctrlEnable [IDC_SPAWNBUTTON, false];
|
|||||||
|
|
||||||
if ((isNil { _data })) exitWith { ctrlEnable [IDC_SPAWNBUTTON, true]; };
|
if ((isNil { _data })) exitWith { ctrlEnable [IDC_SPAWNBUTTON, true]; };
|
||||||
|
|
||||||
private _isGarageVehicle = _data select 0;
|
private _vehType = _data select 0;
|
||||||
private _className = _data select 1;
|
private _className = _data select 1;
|
||||||
private _vehData = _data select 2;
|
// private _vehData = _data select 2;
|
||||||
private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData);
|
private _locations = (missionConfigFile >> "CfgGarages" >> "locations") call BFUNC(getCfgData);
|
||||||
|
|
||||||
{
|
{
|
||||||
if (_isGarageVehicle) exitWith {
|
if ((_x select 0) == _vehType) then {
|
||||||
private _vehicle = createVehicle [_className, (_x select 1)];
|
private _vehicle = createVehicle [_className, (_x select 1)];
|
||||||
|
// private _fuel = _vehData select 0;
|
||||||
|
// private _damage = _vehData select 1;
|
||||||
|
// private _hitPointsData = _vehData select 2;
|
||||||
|
|
||||||
private _hitPointsData = _vehData select 0;
|
// _hitPointsData = call compile _hitPointsData;
|
||||||
|
|
||||||
if (count _hitPointsData > 0) then {
|
// if (count _hitPointsData > 0) then {
|
||||||
private _hitPoints = _hitPointsData select 0;
|
// private _hitPoints = _hitPointsData select 0;
|
||||||
private _damages = _hitPointsData select 2;
|
// private _damages = _hitPointsData select 2;
|
||||||
|
|
||||||
{
|
// {
|
||||||
_vehicle setHitPointDamage [_x, _damages select _forEachIndex];
|
// _vehicle setHitPointDamage [_x, _damages select _forEachIndex];
|
||||||
} forEach _hitPoints;
|
// } forEach _hitPoints;
|
||||||
};
|
// };
|
||||||
|
|
||||||
{
|
|
||||||
_vehicle setHitPointDamage [_x, _damages select _forEachIndex];
|
|
||||||
} forEach _hitPoints;
|
|
||||||
|
|
||||||
_vehicle setFuel _fuel;
|
// {
|
||||||
_vehicle setDamage _damage;
|
// _vehicle setHitPointDamage [_x, _damages select _forEachIndex];
|
||||||
// _vehicle setVariable ["FORGE_GarageVehicle", _isGarageVehicle, true];
|
// } forEach _hitPoints;
|
||||||
SETPVAR(_vehicle,FORGE_GarageVehicle,_isGarageVehicle);
|
|
||||||
|
|
||||||
|
// {
|
||||||
|
// _vehicle setHitPointDamage [_x, _damages select _forEachIndex];
|
||||||
|
// } forEach _hitPoints;
|
||||||
|
|
||||||
|
// _vehicle setFuel _fuel;
|
||||||
|
// _vehicle setDamage _damage;
|
||||||
|
// _vehicle setVariable ["FORGE_VehicleType", _vehType, true];
|
||||||
|
SETPVAR(_vehicle,FORGE_VehicleType,_vehType);
|
||||||
_vehicle setDir (_x select 2);
|
_vehicle setDir (_x select 2);
|
||||||
};
|
};
|
||||||
} forEach _locations;
|
} forEach _locations;
|
||||||
@ -50,7 +59,7 @@ _vehicleList lbSetCurSel -1;
|
|||||||
|
|
||||||
// private _garage = player getVariable ["FORGE_Garage", []];
|
// private _garage = player getVariable ["FORGE_Garage", []];
|
||||||
private _garage = GETVAR(player,FORGE_Garage,[]);
|
private _garage = GETVAR(player,FORGE_Garage,[]);
|
||||||
private _index = _garage findIf { (_x select 0) == _isGarageVehicle && (_x select 1) == _className };
|
private _index = _garage findIf { _x isEqualTo _data };
|
||||||
|
|
||||||
if (_index != -1) then {
|
if (_index != -1) then {
|
||||||
_garage deleteAt _index;
|
_garage deleteAt _index;
|
||||||
|
@ -11,21 +11,24 @@ ctrlEnable [IDC_STOREBUTTON, false];
|
|||||||
|
|
||||||
if ((isNil { _data })) exitWith { ctrlEnable [IDC_STOREBUTTON, true]; };
|
if ((isNil { _data })) exitWith { ctrlEnable [IDC_STOREBUTTON, true]; };
|
||||||
|
|
||||||
private _isGarageVehicle = _data select 0;
|
private _vehType = _data select 0;
|
||||||
private _className = _data select 1;
|
private _className = _data select 1;
|
||||||
private _netID = _data select 3;
|
private _netID = _data select 2;
|
||||||
|
// private _netID = _data select 3;
|
||||||
|
|
||||||
private _veh = objectFromNetId _netID;
|
private _veh = objectFromNetId _netID;
|
||||||
private _vehData = [
|
// private _hitPointsData = getAllHitPointsDamage _veh;
|
||||||
getAllHitPointsDamage _veh,
|
// private _vehData = [
|
||||||
fuel _veh,
|
// fuel _veh,
|
||||||
damage _veh
|
// damage _veh,
|
||||||
];
|
// str _hitPointsData
|
||||||
|
// ];
|
||||||
|
|
||||||
// private _garage = player getVariable ["FORGE_Garage", []];
|
// private _garage = player getVariable ["FORGE_Garage", []];
|
||||||
private _garage = GETVAR(player,FORGE_Garage,[]);
|
private _garage = GETVAR(player,FORGE_Garage,[]);
|
||||||
|
|
||||||
_garage pushBack [_isGarageVehicle, _className, _vehData];
|
// _garage pushBack [_vehType, _className, _vehData];
|
||||||
|
_garage pushBack [_vehType, _className];
|
||||||
// player setVariable ["FORGE_Garage", _garage, true];
|
// player setVariable ["FORGE_Garage", _garage, true];
|
||||||
SETPVAR(player,FORGE_Garage,_garage);
|
SETPVAR(player,FORGE_Garage,_garage);
|
||||||
|
|
||||||
|
@ -48,55 +48,70 @@ if (_data isEqualTo [""]) then {
|
|||||||
|
|
||||||
switch (_key) do {
|
switch (_key) do {
|
||||||
case "reputation": {
|
case "reputation": {
|
||||||
|
// player setVariable ["Reputation", _value, true];
|
||||||
SETPVAR(player,Reputation,_value);
|
SETPVAR(player,Reputation,_value);
|
||||||
player addRating _value;
|
player addRating _value;
|
||||||
};
|
};
|
||||||
case "loadout": {
|
case "loadout": {
|
||||||
|
// player setVariable ["Loadout", _value, true];
|
||||||
SETPVAR(player,Loadout,_value);
|
SETPVAR(player,Loadout,_value);
|
||||||
player setUnitLoadout _value;
|
player setUnitLoadout _value;
|
||||||
};
|
};
|
||||||
case "direction": {
|
case "direction": {
|
||||||
|
// player setVariable ["Direction", _value, true];
|
||||||
SETPVAR(player,Direction,_value);
|
SETPVAR(player,Direction,_value);
|
||||||
player setDir _value;
|
player setDir _value;
|
||||||
};
|
};
|
||||||
case "cash": {
|
case "cash": {
|
||||||
|
// player setVariable ["FORGE_Cash", _value, true];
|
||||||
SETPVAR(player,FORGE_Cash,_value);
|
SETPVAR(player,FORGE_Cash,_value);
|
||||||
};
|
};
|
||||||
case "bank": {
|
case "bank": {
|
||||||
|
// player setVariable ["FORGE_Bank", _value, true];
|
||||||
SETPVAR(player,FORGE_Bank,_value);
|
SETPVAR(player,FORGE_Bank,_value);
|
||||||
};
|
};
|
||||||
case "armory_unlocks": {
|
case "armory_unlocks": {
|
||||||
|
// player setVariable ["Armory_Unlocks", _value, true];
|
||||||
SETPVAR(player,Armory_Unlocks,_value);
|
SETPVAR(player,Armory_Unlocks,_value);
|
||||||
};
|
};
|
||||||
case "garage_unlocks": {
|
case "garage_unlocks": {
|
||||||
|
// player setVariable ["Garage_Unlocks", _value, true];
|
||||||
SETPVAR(player,Garage_Unlocks,_value);
|
SETPVAR(player,Garage_Unlocks,_value);
|
||||||
};
|
};
|
||||||
case "locker": {
|
case "locker": {
|
||||||
|
// player setVariable ["FORGE_Locker", _value, true];
|
||||||
SETPVAR(player,FORGE_Locker,_value);
|
SETPVAR(player,FORGE_Locker,_value);
|
||||||
};
|
};
|
||||||
case "garage": {
|
case "garage": {
|
||||||
|
// player setVariable ["FORGE_Garage", _value, true];
|
||||||
SETPVAR(player,FORGE_Garage,_value);
|
SETPVAR(player,FORGE_Garage,_value);
|
||||||
};
|
};
|
||||||
case "email": {
|
case "email": {
|
||||||
|
// player setVariable ["FORGE_Email", _value, true];
|
||||||
SETPVAR(player,FORGE_Email,_value);
|
SETPVAR(player,FORGE_Email,_value);
|
||||||
};
|
};
|
||||||
case "number": {
|
case "number": {
|
||||||
|
// player setVariable ["FORGE_Phone_Number", _value, true];
|
||||||
SETPVAR(player,FORGE_Phone_Number,_value);
|
SETPVAR(player,FORGE_Phone_Number,_value);
|
||||||
};
|
};
|
||||||
case "paygrade": {
|
case "paygrade": {
|
||||||
|
// player setVariable ["Paygrade", _value, true];
|
||||||
SETPVAR(player,Paygrade,_value);
|
SETPVAR(player,Paygrade,_value);
|
||||||
};
|
};
|
||||||
case "stance": {
|
case "stance": {
|
||||||
|
// player setVariable ["Stance", _value, true];
|
||||||
SETPVAR(player,Stance,_value);
|
SETPVAR(player,Stance,_value);
|
||||||
player playAction _value;
|
player playAction _value;
|
||||||
};
|
};
|
||||||
case "holster": {
|
case "holster": {
|
||||||
|
// player setVariable ["FORGE_Holster_Weapon", _value, true];
|
||||||
SETPVAR(player,FORGE_Holster_Weapon,_value);
|
SETPVAR(player,FORGE_Holster_Weapon,_value);
|
||||||
if (_value) then {
|
if (_value) then {
|
||||||
[player] call AFUNC(weaponselect,putWeaponAway);
|
[player] call AFUNC(weaponselect,putWeaponAway);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
case "position": {
|
case "position": {
|
||||||
|
// player setVariable ["Position", _value, true];
|
||||||
SETPVAR(player,Position,_value);
|
SETPVAR(player,Position,_value);
|
||||||
player setPosASL _value;
|
player setPosASL _value;
|
||||||
|
|
||||||
@ -112,6 +127,7 @@ if (_data isEqualTo [""]) then {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (needReload player == 1) then { reload player };
|
if (needReload player == 1) then { reload player };
|
||||||
|
// player setVariable ["value_loadDone", true, true];
|
||||||
SETPVAR(player,value_loadDone,true);
|
SETPVAR(player,value_loadDone,true);
|
||||||
|
|
||||||
// ["listrng", GETVAR(player,FORGE_Email,_defaultEmail), "", -1, [], "forge_client_phone_fnc_addOfflineEmail", true] spawn dragonfly_db_fnc_addTask;
|
// ["listrng", GETVAR(player,FORGE_Email,_defaultEmail), "", -1, [], "forge_client_phone_fnc_addOfflineEmail", true] spawn dragonfly_db_fnc_addTask;
|
||||||
|
@ -40,9 +40,11 @@ removeBackpack player;
|
|||||||
removeGoggles player;
|
removeGoggles player;
|
||||||
removeHeadgear player;
|
removeHeadgear player;
|
||||||
|
|
||||||
SETVAR(player,value_loadDone,false);
|
// player setVariable ["value_loadDone", false, true];
|
||||||
|
SETPVAR(player,value_loadDone,false);
|
||||||
cutText ["Loading In...", "BLACK", 1];
|
cutText ["Loading In...", "BLACK", 1];
|
||||||
|
|
||||||
|
// waitUntil { player getVariable ["value_armoryDone", false] };
|
||||||
// waitUntil { GETVAR(player,value_armoryDone,false) };
|
// waitUntil { GETVAR(player,value_armoryDone,false) };
|
||||||
|
|
||||||
// ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask;
|
// ["hgetall", "", "", -1, [], "forge_client_init_fnc_handlePlayerLoad", true] spawn dragonfly_db_fnc_addTask;
|
||||||
@ -51,6 +53,7 @@ cutText ["Loading In...", "BLACK", 1];
|
|||||||
[] spawn FUNC(playerSaveLoop);
|
[] spawn FUNC(playerSaveLoop);
|
||||||
[] spawn EFUNC(interaction,initInteraction);
|
[] spawn EFUNC(interaction,initInteraction);
|
||||||
|
|
||||||
|
// waitUntil { player getVariable ["value_loadDone", false] };
|
||||||
waitUntil { GETVAR(player,value_loadDone,false) };
|
waitUntil { GETVAR(player,value_loadDone,false) };
|
||||||
cutText ["", "PLAIN", 1];
|
cutText ["", "PLAIN", 1];
|
||||||
|
|
||||||
|
@ -21,4 +21,6 @@ reverse _arr;
|
|||||||
_count = _count + 1;
|
_count = _count + 1;
|
||||||
|
|
||||||
true
|
true
|
||||||
} count _arr
|
} count (_arr);
|
||||||
|
|
||||||
|
_str
|
@ -31,6 +31,8 @@
|
|||||||
params ["_target", "_player"];
|
params ["_target", "_player"];
|
||||||
|
|
||||||
private _amount = parseNumber (ctrlText 1401);
|
private _amount = parseNumber (ctrlText 1401);
|
||||||
|
// private _playerCash = player getVariable ["FORGE_Cash", 0];
|
||||||
|
// private _targetCash = _target getVariable ["FORGE_Cash", 0];
|
||||||
private _playerCash = GETVAR(player,FORGE_Cash,0);
|
private _playerCash = GETVAR(player,FORGE_Cash,0);
|
||||||
private _targetCash = GETVAR(_target,FORGE_Cash,0);
|
private _targetCash = GETVAR(_target,FORGE_Cash,0);
|
||||||
|
|
||||||
@ -39,6 +41,7 @@ if (_amount > 0) then {
|
|||||||
|
|
||||||
private _newCash = _targetCash + _amount;
|
private _newCash = _targetCash + _amount;
|
||||||
private _formattedAmount = (_amount) call EFUNC(misc,formatNumber);
|
private _formattedAmount = (_amount) call EFUNC(misc,formatNumber);
|
||||||
|
// _target setVariable ["FORGE_Cash", _newCash, true];
|
||||||
SETPVAR(_target,FORGE_Cash,_newCash);
|
SETPVAR(_target,FORGE_Cash,_newCash);
|
||||||
|
|
||||||
["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2];
|
["deduct", "Cash", _amount] remoteExecCall ["forge_server_money_fnc_handleMoney", 2];
|
||||||
|
@ -29,9 +29,11 @@
|
|||||||
|
|
||||||
params ["_ct"];
|
params ["_ct"];
|
||||||
|
|
||||||
|
// private _amount = _ct getVariable ["FORGE_Cash", 0];
|
||||||
private _amount = GETVAR(_ct,FORGE_Cash,0);
|
private _amount = GETVAR(_ct,FORGE_Cash,0);
|
||||||
|
|
||||||
["advance", "Cash", _amount] call forge_server_money_fnc_handleMoney;
|
["advance", "Cash", _amount] call forge_server_money_fnc_handleMoney;
|
||||||
|
|
||||||
|
// _ct setVariable ["FORGE_Cash", nil, true];
|
||||||
SETPVAR(_ct,FORGE_Cash,nil);
|
SETPVAR(_ct,FORGE_Cash,nil);
|
||||||
deleteVehicle _ct;
|
deleteVehicle _ct;
|
@ -41,10 +41,10 @@ _ctrl02 ctrlAddEventHandler ["ButtonClick", {
|
|||||||
|
|
||||||
lbClear _ctrl01;
|
lbClear _ctrl01;
|
||||||
|
|
||||||
private _mC = "FORGE_CfgPhones";
|
private _mC = "CfgPhone";
|
||||||
private _themes = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "themes");
|
private _themes = "true" configClasses (missionConfigFile >> "CfgPhone" >> "themes");
|
||||||
private _notifications = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "notifications");
|
private _notifications = "true" configClasses (missionConfigFile >> "CfgPhone" >> "notifications");
|
||||||
private _ringtones = "true" configClasses (missionConfigFile >> "FORGE_CfgPhones" >> "ringtones");
|
private _ringtones = "true" configClasses (missionConfigFile >> "CfgPhone" >> "ringtones");
|
||||||
|
|
||||||
{
|
{
|
||||||
private _configName = configName(_x);
|
private _configName = configName(_x);
|
||||||
|
@ -38,6 +38,9 @@ _player setUnitLoadout [[],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",17],[],""
|
|||||||
_player action ["SwitchWeapon", _player, _player, -1];
|
_player action ["SwitchWeapon", _player, _player, -1];
|
||||||
_player addRating 500;
|
_player addRating 500;
|
||||||
|
|
||||||
|
// player setVariable ["FORGE_Bank", 2000, true];
|
||||||
|
// player setVariable ["FORGE_Holster_Weapon", true, true];
|
||||||
|
// player setVariable ["PayGrade", _defaultPaygrade, true];
|
||||||
SETPVAR(_player,FORGE_Bank,2000);
|
SETPVAR(_player,FORGE_Bank,2000);
|
||||||
SETPVAR(_player,FORGE_Holster_Weapon,true);
|
SETPVAR(_player,FORGE_Holster_Weapon,true);
|
||||||
SETPVAR(_player,PayGrade,_defaultPaygrade);
|
SETPVAR(_player,PayGrade,_defaultPaygrade);
|
||||||
@ -45,14 +48,19 @@ SETPVAR(_player,PayGrade,_defaultPaygrade);
|
|||||||
private _number = "0160" + (_uid select [count (toArray _uid) - 6, 6]);
|
private _number = "0160" + (_uid select [count (toArray _uid) - 6, 6]);
|
||||||
private _email = _number + "@spearnet.mil";
|
private _email = _number + "@spearnet.mil";
|
||||||
|
|
||||||
|
// player setVariable ["FORGE_Phone_Number", _number, true];
|
||||||
|
// player setVariable ["FORGE_Email", _email, true];
|
||||||
SETPVAR(_player,FORGE_Phone_Number,_number);
|
SETPVAR(_player,FORGE_Phone_Number,_number);
|
||||||
SETPVAR(_player,FORGE_Email,_email);
|
SETPVAR(_player,FORGE_Email,_email);
|
||||||
|
|
||||||
private _name = name _player;
|
private _name = name _player;
|
||||||
|
// private _phoneNumber = player getVariable ["FORGE_Phone_Number", _defaultPhoneNumber];
|
||||||
|
// private _phoneEmail = player getVariable ["FORGE_Email", _defaultEmail];
|
||||||
private _phoneNumber = GETVAR(_player,FORGE_Phone_Number,_defaultPhoneNumber);
|
private _phoneNumber = GETVAR(_player,FORGE_Phone_Number,_defaultPhoneNumber);
|
||||||
private _phoneEmail = GETVAR(_player,FORGE_Email,_defaultEmail);
|
private _phoneEmail = GETVAR(_player,FORGE_Email,_defaultEmail);
|
||||||
|
|
||||||
EGVAR(phone,addressbook) pushBackUnique [_name, _phoneNumber, _phoneEmail];
|
EGVAR(phone,addressbook) pushBackUnique [_name, _phoneNumber, _phoneEmail];
|
||||||
|
// profileNamespace setVariable ["FORGE_AddressBook", EGVAR(phone,addressbook)];
|
||||||
SETVAR(profileNamespace,FORGE_AddressBook,EGVAR(phone,addressbook));
|
SETVAR(profileNamespace,FORGE_AddressBook,EGVAR(phone,addressbook));
|
||||||
|
|
||||||
private _messages = [
|
private _messages = [
|
||||||
@ -76,8 +84,8 @@ uiSleep 1;
|
|||||||
[_phoneNumber, ["Field Cmdr", _x]] remoteExec ["forge_server_phone_fnc_addMsg", 2, false];
|
[_phoneNumber, ["Field Cmdr", _x]] remoteExec ["forge_server_phone_fnc_addMsg", 2, false];
|
||||||
} forEach _messages;
|
} forEach _messages;
|
||||||
|
|
||||||
private _armory_unlocks = [["FORGE_Phone", 0], ["FORGE_Tablet", 0], ["ItemCompass", 0], ["ItemGPS", 0], ["ItemMap", 0], ["ItemRadio", 0], ["ItemWatch", 0], ["U_BG_Guerrilla_6_1", 0], ["V_Rangemaster_belt", 0], ["hgun_P07_F", 1], ["16Rnd_9x21_Mag", 2]];
|
private _armory_unlocks = [["FORGE_Phone", "item"], ["FORGE_Tablet", "item"], ["ItemCompass", "item"], ["ItemGPS", "item"], ["ItemMap", "item"], ["ItemRadio", "item"], ["ItemWatch", "item"], ["U_BG_Guerrilla_6_1", "item"], ["V_Rangemaster_belt", "item"], ["hgun_P07_F", "weapon"], ["16Rnd_9x21_Mag", "magazine"]];
|
||||||
private _garage_unlocks = [["B_Quadbike_01_F", 0]];
|
private _garage_unlocks = [["B_Quadbike_01_F", "car"]];
|
||||||
|
|
||||||
{
|
{
|
||||||
private _classname = _x select 0;
|
private _classname = _x select 0;
|
||||||
@ -103,7 +111,8 @@ uiSleep 1;
|
|||||||
|
|
||||||
uiSleep 1;
|
uiSleep 1;
|
||||||
[] call EFUNC(init,playerDBSave);
|
[] call EFUNC(init,playerDBSave);
|
||||||
SETVAR(_player,value_loadDone,true);
|
// player setVariable ["value_loadDone", true, true];
|
||||||
|
SETPVAR(_player,value_loadDone,true);
|
||||||
|
|
||||||
uiSleep 1;
|
uiSleep 1;
|
||||||
// ["listrng", _phoneEmail, "", -1, [], "forge_client_phone_fnc_addEmail", true, netId _player] spawn dragonfly_db_fnc_addTask;
|
// ["listrng", _phoneEmail, "", -1, [], "forge_client_phone_fnc_addEmail", true, netId _player] spawn dragonfly_db_fnc_addTask;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
PREP(fuel);
|
PREP(fuel);
|
||||||
PREP(init);
|
PREP(initService);
|
||||||
PREP(rearm);
|
PREP(rearm);
|
||||||
PREP(refuel);
|
PREP(refuel);
|
||||||
PREP(repair);
|
PREP(repair);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
params ["_item", "_price", "_configType", "_itemType"];
|
params ["_className", "_price", "_configType", "_itemType"];
|
||||||
|
|
||||||
private _displayName = "";
|
private _displayName = "";
|
||||||
// private _locker = player getVariable ["FORGE_Locker", []];
|
// private _locker = player getVariable ["FORGE_Locker", []];
|
||||||
@ -10,26 +10,26 @@ if !([_price] call FUNC(handlePurchase)) exitWith {};
|
|||||||
|
|
||||||
switch (_configType) do {
|
switch (_configType) do {
|
||||||
case "item": {
|
case "item": {
|
||||||
_displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName");
|
_displayName = getText (configFile >> "CfgWeapons" >> _className >> "displayName");
|
||||||
_locker pushBack [_itemType, _item];
|
_locker pushBack [_itemType, _className];
|
||||||
};
|
};
|
||||||
case "weapon": {
|
case "weapon": {
|
||||||
_displayName = getText (configFile >> "CfgWeapons" >> _item >> "displayName");
|
_displayName = getText (configFile >> "CfgWeapons" >> _className >> "displayName");
|
||||||
_locker pushBack [_itemType, _item];
|
_locker pushBack [_itemType, _className];
|
||||||
};
|
};
|
||||||
case "magazine": {
|
case "magazine": {
|
||||||
_displayName = getText (configFile >> "CfgMagazines" >> _item >> "displayName");
|
_displayName = getText (configFile >> "CfgMagazines" >> _className >> "displayName");
|
||||||
_locker pushBack [_itemType, [_item, getNumber (configFile >> "CfgMagazines" >> _item >> "count"), getNumber (configFile >> "CfgMagazines" >> _item >> "count")]];
|
_locker pushBack [_itemType, [_className, getNumber (configFile >> "CfgMagazines" >> _className >> "count"), getNumber (configFile >> "CfgMagazines" >> _className >> "count")]];
|
||||||
};
|
};
|
||||||
case "backpack": {
|
case "backpack": {
|
||||||
_displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName");
|
_displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
|
||||||
_locker pushBack [_itemType, _item];
|
_locker pushBack [_itemType, _className];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// player setVariable ["FORGE_Locker", _locker, true];
|
// player setVariable ["FORGE_Locker", _locker, true];
|
||||||
SETPVAR(player,FORGE_Locker,_locker);
|
SETPVAR(player,FORGE_Locker,_locker);
|
||||||
|
|
||||||
[_item, _itemType] call EFUNC(armory,addItemArmory);
|
[_className, _itemType] call EFUNC(armory,addArmoryItem);
|
||||||
|
|
||||||
[format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify);
|
[format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify);
|
@ -1,19 +1,20 @@
|
|||||||
#include "..\script_component.hpp"
|
#include "..\script_component.hpp"
|
||||||
|
|
||||||
params ["_item", "_price", "_itemType"];
|
params ["_className", "_price", "_vehicleType"];
|
||||||
|
|
||||||
private _displayName = getText (configFile >> "CfgVehicles" >> _item >> "displayName");
|
private _displayName = getText (configFile >> "CfgVehicles" >> _className >> "displayName");
|
||||||
// private _garage = player getVariable ["FORGE_Garage", []];
|
// private _garage = player getVariable ["FORGE_Garage", []];
|
||||||
private _garage = GETVAR(player,FORGE_Garage,[]);
|
private _garage = GETVAR(player,FORGE_Garage,[]);
|
||||||
private _itemData = [[], 1, 0];
|
// private _vehicleData = [1, 0, []];
|
||||||
|
|
||||||
if !([_price] call FUNC(handlePurchase)) exitWith {};
|
if !([_price] call FUNC(handlePurchase)) exitWith {};
|
||||||
|
|
||||||
_garage pushBack [true, _item, _itemData];
|
// _garage pushBack [_vehicleType, _className, _vehicleData];
|
||||||
|
_garage pushBack [_vehicleType, _className];
|
||||||
|
|
||||||
// player setVariable ["FORGE_Garage", _garage, true];
|
// player setVariable ["FORGE_Garage", _garage, true];
|
||||||
SETPVAR(player,FORGE_Garage,_garage);
|
SETPVAR(player,FORGE_Garage,_garage);
|
||||||
|
|
||||||
[_item, _itemType] call EFUNC(armory,addVehArmory);
|
[_className, _vehicleType] call EFUNC(arsenal,addGarageVehicle);
|
||||||
|
|
||||||
[format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify);
|
[format ["You have purchased %1 for $%2.", _displayName, _price], "info", 3, "right"] call EFUNC(misc,notify);
|
Loading…
x
Reference in New Issue
Block a user