Français Solved Besoin d'aide pour modifier le poids des sacs à dos et empêcher la disparition des véhicules

  • Auteur de la discussion Auteur de la discussion _NEYPHIS_
  • Date de début Date de début

_NEYPHIS_

User
29/12/19
297
7
21
1 100
mail-rp.com
Bonsoir,

Je cherche comment modifier le poids des sac a dos et aussi comment enlever le fait que les véhicules disparaisse au bout d'un certain temps ?

Merci d'avance de votre aide


De plus votre forum rencontre beaucoup de bug tel celui ci


ou encore le fait que nous pouvons plus faire de recherche : https://prnt.sc/uxwgsk
 
Solution
Je l'ai retraduis pour la 5.0, j'ai pas testé, tu peux me dire si ça fonctionne :

Dans ton core/fn_survival.sqf, supprime ces lignes :
Code:
/* Adjustment of carrying capacity based on backpack changes */
if (backpack player isEqualTo "") then {
    life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
    _bp = backpack player;
} else {
    if (!(backpack player isEqualTo "") && {!(backpack player isEqualTo _bp)}) then {
        _bp = backpack player;
        life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",_bp,"maximumload") / 4);
    };
};

Dans ton core/configuration.sqf trouve :
Code:
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight")...
Salut, en ce qui concerne la disparition de tes véhicules, il faut te rendre dans ton : life_server\Functions\System\fn_cleanup.sqf (Ligne 26 de base)
[CODE title="fn_cleanup.sqf" highlight="26"]#include "\life_server\script_macros.hpp"
/*
File: fn_cleanup.sqf
Author: Bryan "Tonic" Boardwine

Description:
Server-side cleanup script on vehicles.
Sort of a lame way but whatever. Yep someone should look at it!
*/
private "_deleted";
_deleted = false;
for "_i" from 0 to 1 step 0 do {
private ["_veh","_units","_fuel"];
uiSleep (60 * 60);
{
_protect = false;
_veh = _x;
_vehicleClass = getText(configFile >> "CfgVehicles" >> (typeOf _veh) >> "vehicleClass");
_fuel = 1;

if (!isNil {_veh getVariable "NPC"} && {_veh getVariable "NPC"}) then {_protect = true;};

if ((_vehicleClass in ["Car","Air","Ship","Armored","Submarine"]) && {!(_protect)}) then {
if (LIFE_SETTINGS(getNumber,"save_vehicle_fuel") isEqualTo 1) then {_fuel = (fuel _veh);};
_dbInfo = _veh getVariable ["dbInfo",[]];
_units = {(_x distance _veh < 300)} count playableUnits;
if (count crew _x isEqualTo 0) then {
switch (true) do {
case ((_x getHitPointDamage "HitEngine") > 0.7 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitLFWheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitLF2Wheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitRFWheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case ((_x getHitPointDamage "HitRF2Wheel") > 0.98 && _units isEqualTo 0) : {deleteVehicle _x; _deleted = true;};
case (_units isEqualTo 0): {deleteVehicle _x; _deleted = true;};
};
};

[...Reste du Code...][/CODE]

Et que tu modifie la valeur de base qui est 300 par 999999.

Voilà :)
 
Je l'ai retraduis pour la 5.0, j'ai pas testé, tu peux me dire si ça fonctionne :

Dans ton core/fn_survival.sqf, supprime ces lignes :
Code:
/* Adjustment of carrying capacity based on backpack changes */
if (backpack player isEqualTo "") then {
    life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
    _bp = backpack player;
} else {
    if (!(backpack player isEqualTo "") && {!(backpack player isEqualTo _bp)}) then {
        _bp = backpack player;
        life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",_bp,"maximumload") / 4);
    };
};

Dans ton core/configuration.sqf trouve :
Code:
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0).
Et remplace le par :
Code:
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
life_minWeight = life_maxWeight;
life_carryWeight = 0; //Represents the players current inventory weight (MUST START AT 0).

Dans ton core/functions/fn_loadGear.sqf, trouve :
Code:
life_maxWeight = if (backpack player isEqualTo "") then {LIFE_SETTINGS(getNumber,"total_maxWeight")} else {LIFE_SETTINGS(getNumber,"total_maxWeight") + round(FETCH_CONFIG2(getNumber,"CfgVehicles",(backpack player),"maximumload") / 4)};
Remplace le par :
Code:
life_maxWeight = LIFE_SETTINGS(getNumber,"total_maxWeight");
/* Réglage de la capacité en fonction des sac à dos */
[] spawn {
    while {true} do {
        waitUntil {((backpack player) != "")};
        _bp = backpack player;

        _cfg = FETCH_CONFIG2(getNumber,"CONFIG_VEHICLES",_bp,"maximumload");
        _load = round (_cfg / 4);

        switch (backpack player) do {
            case "B_AssaultPack_khk" : {_load = 30;};
            case "B_AssaultPack_Kerry" : {_load = 30;};
            case "B_AssaultPack_blk" : {_load = 30;};
            case "B_AssaultPack_cbr" : {_load = 30;};
            case "B_AssaultPack_sgg" : {_load = 30;};
            case "B_Bergen_blk" : {_load = 50;};
            case "B_TacticalPack_oli" : {_load = 50;};
            case "B_Bergen_sgg" : {_load = 50;};
            case "B_Bergen_rgr" : {_load = 50;};
            case "B_AssaultPack_mcamo_AT" : {_load = 70;};
            case "B_Kitbag_cbr" : {_load = 70;};
            case "B_Kitbag_sgg" : {_load = 70;};
            case "B_Carryall_khk" : {_load = 80;};
            case "B_Carryall_oli" : {_load = 80;};
            case "B_Carryall_cbr" : {_load = 80;};
            default {};
        };

        life_maxWeight = life_minWeight + _load;
        waitUntil {!((backpack player) != _bp)};

        if ((backpack player) != "") then {
            life_maxWeight = life_minWeight;
        };
    };
};

Il faut modifier les classanmes des sacs à dos et la variable _load selon ce que tu veux faire :)
 
Solution