Vous utilisez un navigateur non à jour ou ancien. Il ne peut pas afficher ce site ou d'autres sites correctement. Vous devez le mettre à jour ou utiliser un navigateur alternatif.
Salut, c'est assez simple, dans ton fn_storeVehicle.sqf dans le dossier /mission/core/actions trouves cette ligne :
[CODE title="fn_storeVehicle"]if (!alive _vehicle) exitWith {hint localize "STR_Garage_SQLError_Destroyed"};[/CODE]
Puis rajoutes en dessous :
Code:
disableSerialization;
"progressBar" cutRsc ["life_progress","PLAIN"];
private _ui = uiNamespace getVariable "life_progress";
private _progress = _ui displayCtrl 38201;
private _pgText = _ui displayCtrl 38202;
private _upp = "Rangement de véhicule en cours";
_pgText ctrlSetText format ["%2 (1%1)...","%",_upp];
_progress progressSetPosition 0.01;
private _cP = 0.01;
life_action_inUse = true;
for "_i" from 0 to 1 step 0 do {
uiSleep 0.26;
_cP = _cP + 0.01;
_progress progressSetPosition _cP...
Salut, c'est assez simple, dans ton fn_storeVehicle.sqf dans le dossier /mission/core/actions trouves cette ligne :
[CODE title="fn_storeVehicle"]if (!alive _vehicle) exitWith {hint localize "STR_Garage_SQLError_Destroyed"};[/CODE]
Puis rajoutes en dessous :
Code:
disableSerialization;
"progressBar" cutRsc ["life_progress","PLAIN"];
private _ui = uiNamespace getVariable "life_progress";
private _progress = _ui displayCtrl 38201;
private _pgText = _ui displayCtrl 38202;
private _upp = "Rangement de véhicule en cours";
_pgText ctrlSetText format ["%2 (1%1)...","%",_upp];
_progress progressSetPosition 0.01;
private _cP = 0.01;
life_action_inUse = true;
for "_i" from 0 to 1 step 0 do {
uiSleep 0.26;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_upp];
if (_cP >= 1) exitWith {};
if (_cP >= 1 || !alive player) exitWith {};
if (life_istazed) exitWith {}; //Tazed
if (life_isknocked) exitWith {}; //Knocked
if (life_interrupted) exitWith {};
if (player getVariable ["restrained",false]) exitWith {};
if ((player distance _vehicle) > 15) exitWith {};
};
"progressBar" cutText ["","PLAIN"];
if (!alive player || life_istazed || life_isknocked) exitWith {life_action_inUse = false;};
if (player getVariable ["restrained",false]) exitWith {life_action_inUse = false;};
if ((player distance _vehicle) > 15) exitWith {hint "Vous êtes trop loin du véhicule !";};
if (life_interrupted) exitWith {life_interrupted = false; titleText[localize "STR_NOTF_ActionCancel","PLAIN"]; life_action_inUse = false;};
"progressBar" cutText ["","PLAIN"];
life_action_inUse = false;
Ton fichier devrai ressembler à sa :
[CODE title="fn_storeVehicle"]#include "..\..\script_macros.hpp"
/*
File: fn_storeVehicle.sqf
Author: Bryan "Tonic" Boardwine
Description:
Stores the vehicle in the garage.
*/
private ["_nearVehicles","_vehicle"];
if !(isNull objectParent player) then {
_vehicle = vehicle player;
} else {
_nearVehicles = nearestObjects[getPos (_this select 0),["Car","Air","Ship"],30]; //Fetch vehicles within 30m.
if (count _nearVehicles > 0) then {
{
if (!isNil "_vehicle") exitWith {}; //Kill the loop.
_vehData = _x getVariable ["vehicle_info_owners",[]];
if (count _vehData > 0) then {
_vehOwner = ((_vehData select 0) select 0);
if ((getPlayerUID player) == _vehOwner) exitWith {
_vehicle = _x;
};
};
} forEach _nearVehicles;
};
};
if (isNil "_vehicle") exitWith {hint localize "STR_Garage_NoNPC"};
if (isNull _vehicle) exitWith {};
if (!alive _vehicle) exitWith {hint localize "STR_Garage_SQLError_Destroyed"};
Salut, c'est assez simple, dans ton fn_storeVehicle.sqf dans le dossier /mission/core/actions trouves cette ligne :
[CODE title="fn_storeVehicle"]if (!alive _vehicle) exitWith {hint localize "STR_Garage_SQLError_Destroyed"};[/CODE]
Puis rajoutes en dessous :
Code:
disableSerialization;
"progressBar" cutRsc ["life_progress","PLAIN"];
private _ui = uiNamespace getVariable "life_progress";
private _progress = _ui displayCtrl 38201;
private _pgText = _ui displayCtrl 38202;
private _upp = "Rangement de véhicule en cours";
_pgText ctrlSetText format ["%2 (1%1)...","%",_upp];
_progress progressSetPosition 0.01;
private _cP = 0.01;
life_action_inUse = true;
for "_i" from 0 to 1 step 0 do {
uiSleep 0.26;
_cP = _cP + 0.01;
_progress progressSetPosition _cP;
_pgText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_upp];
if (_cP >= 1) exitWith {};
if (_cP >= 1 || !alive player) exitWith {};
if (life_istazed) exitWith {}; //Tazed
if (life_isknocked) exitWith {}; //Knocked
if (life_interrupted) exitWith {};
if (player getVariable ["restrained",false]) exitWith {};
if ((player distance _vehicle) > 15) exitWith {};
};
"progressBar" cutText ["","PLAIN"];
if (!alive player || life_istazed || life_isknocked) exitWith {life_action_inUse = false;};
if (player getVariable ["restrained",false]) exitWith {life_action_inUse = false;};
if ((player distance _vehicle) > 15) exitWith {hint "Vous êtes trop loin du véhicule !";};
if (life_interrupted) exitWith {life_interrupted = false; titleText[localize "STR_NOTF_ActionCancel","PLAIN"]; life_action_inUse = false;};
"progressBar" cutText ["","PLAIN"];
life_action_inUse = false;
Ton fichier devrai ressembler à sa :
[CODE title="fn_storeVehicle"]#include "..\..\script_macros.hpp"
/*
File: fn_storeVehicle.sqf
Author: Bryan "Tonic" Boardwine
Description:
Stores the vehicle in the garage.
*/
private ["_nearVehicles","_vehicle"];
if !(isNull objectParent player) then {
_vehicle = vehicle player;
} else {
_nearVehicles = nearestObjects[getPos (_this select 0),["Car","Air","Ship"],30]; //Fetch vehicles within 30m.
if (count _nearVehicles > 0) then {
{
if (!isNil "_vehicle") exitWith {}; //Kill the loop.
_vehData = _x getVariable ["vehicle_info_owners",[]];
if (count _vehData > 0) then {
_vehOwner = ((_vehData select 0) select 0);
if ((getPlayerUID player) == _vehOwner) exitWith {
_vehicle = _x;
};
};
} forEach _nearVehicles;
};
};
if (isNil "_vehicle") exitWith {hint localize "STR_Garage_NoNPC"};
if (isNull _vehicle) exitWith {};
if (!alive _vehicle) exitWith {hint localize "STR_Garage_SQLError_Destroyed"};