mirror of
https://github.com/Fallingsheep1985/Arma3Epoch.git
synced 2024-08-30 16:42:12 +00:00
deploy bike fix
This commit is contained in:
parent
2881b43f5e
commit
b5187b1f0d
@ -7,16 +7,42 @@
|
|||||||
if ("ItemScraps" in magazines player) then{
|
if ("ItemScraps" in magazines player) then{
|
||||||
if ("ToolKit" in magazines player) then{
|
if ("ToolKit" in magazines player) then{
|
||||||
player removeMagazine "ItemScraps";
|
player removeMagazine "ItemScraps";
|
||||||
|
if (!isNil 'EPOCH_server_setVToken') then {_vehObj call EPOCH_server_setVToken;};
|
||||||
|
if (!isNil 'EPX_server_setVToken') then {_vehObj call EPX_server_setVToken; };
|
||||||
|
|
||||||
_spawn = "ebike_epoch";
|
_vehClass = "ebike_epoch";
|
||||||
_posplr = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
|
_position = [((getPos player) select 0) + 2, ((getPos player) select 1) + 2, 0];
|
||||||
_saveVehicle call EPOCH_server_save_vehicle;
|
_saveVehicle call EPOCH_server_save_vehicle;
|
||||||
_dirplr = getDir player;
|
_dir = getDir player;
|
||||||
_spwnveh = _spawn createVehicle (_posplr);
|
_vehObj = _vehClass createVehicle (_position);
|
||||||
_spwnveh setVariable ["Sarge",1,true];
|
if (!isNil 'EPX_server_vehicleInit') then {_vehObj call EPX_server_vehicleInit};
|
||||||
_vehObj call EPOCH_server_save_vehicle;
|
EPOCH_VehicleSlotsLimit = EPOCH_VehicleSlotsLimit + 1;
|
||||||
|
EPOCH_VehicleSlots pushBack str(EPOCH_VehicleSlotsLimit);
|
||||||
|
_slot = EPOCH_VehicleSlots select 0;
|
||||||
|
_vehObj setVariable ['VEHICLE_SLOT',_slot,true];
|
||||||
|
EPOCH_VehicleSlots = EPOCH_VehicleSlots - [_slot];
|
||||||
|
EPOCH_VehicleSlotCount = count EPOCH_VehicleSlots;
|
||||||
|
publicVariable 'EPOCH_VehicleSlotCount';
|
||||||
|
clearWeaponCargoGlobal _vehObj;
|
||||||
|
clearMagazineCargoGlobal _vehObj;
|
||||||
|
clearBackpackCargoGlobal _vehObj;
|
||||||
|
clearItemCargoGlobal _vehObj;
|
||||||
|
_config = (configFile >> 'CfgVehicles' >> _vehClass >> 'availableColors');
|
||||||
|
if (isArray(_config)) then{_textureSelectionIndex = configFile >> 'CfgVehicles' >> _vehClass >> 'textureSelectionIndex';
|
||||||
|
_selections = if (isArray(_textureSelectionIndex)) then {getArray(_textureSelectionIndex)} else { [0] };
|
||||||
|
_colors = getArray(_config);
|
||||||
|
_textures = _colors select 0;
|
||||||
|
_color = floor (random (count _textures));
|
||||||
|
_count = (count _colors)-1;
|
||||||
|
{
|
||||||
|
if (_count >= _forEachIndex) then{_textures = _colors select _forEachIndex;};
|
||||||
|
_vehObj setObjectTextureGlobal [_x, (_textures select _color)];
|
||||||
|
} forEach _selections;
|
||||||
|
_vehObj setVariable ['VEHICLE_TEXTURE',_color];
|
||||||
|
};
|
||||||
|
if (!isNil 'EPOCH_server_save_vehicle') then {_vehObj call EPOCH_server_save_vehicle};
|
||||||
|
if (!isNil 'EPX_server_save_vehicle') then {_vehObj call EPX_server_save_vehicle;};
|
||||||
|
|
||||||
_vehObj call EPOCH_server_setVToken;
|
|
||||||
|
|
||||||
|
|
||||||
player playActionNow "Medic";
|
player playActionNow "Medic";
|
||||||
|
@ -10,5 +10,5 @@ if (("ItemScraps" in magazines player)&&("jerrycan_epoch" in magazines player)&&
|
|||||||
_target = cursorTarget;
|
_target = cursorTarget;
|
||||||
_isbike = _target isKindOf "ebike_epoch";
|
_isbike = _target isKindOf "ebike_epoch";
|
||||||
if (_isbike) then{
|
if (_isbike) then{
|
||||||
player addaction [("<t color=""#0074E8"">" + ("PackBike") +"</t>"),"custom\packbike2.sqf","",5,false,true,"",""];
|
act = player addaction [("<t color=""#0074E8"">" + ("PackBike") +"</t>"),"custom\packbike2.sqf","",5,false,true,"",""];
|
||||||
};
|
};
|
Loading…
Reference in New Issue
Block a user