Français Solved Problème de spawn sur le marqueur

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

Piong

User
29/12/19
11
1
0
100
Bonjour a tous /te

Je souhaite avoir la possibilité de spawn sur le marqueur est non dans les bâtiments autour voici se que j'ai mis mai malheureusement je spawn dans L'eau quad je retire les bâtiments du _yeuArray

Code:
private _yeuArray = [""];
private _spawnBuildings = [[["Yeu", _yeuArray]]] call TON_fnc_terrainSort;

civ_spawn_1 = nearestObjects[getMarkerPos  "civ_spawn_1", _spawnBuildings,350];
 
Dernière édition par un modérateur:
Solution
sorry je me suis absenter amor jai installer Duty System tous simplement et voici le fn_initCiv enfaite rien de modif juste le tuto dinstall suivi est sa a resolu en meme temp mon probleme de spawn je spawn pile sur le marqueur



Code:
    File: fn_initCiv.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Initializes the civilian.
*/
if !(isNil "The_programmer_initialised") exitWith {};
private _altisArray = ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"];
private _tanoaArray = ["Land_House_Small_01_F"];
private _spawnBuildings = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;

civ_spawn_1 =...
Si tu veux créer un nouveau spawn tu n'as pas besoin de le déclarer dans ton fn_initCiv.sqf ces lignes là sont utile justement pour faire spawn dans une zone dans certain batiments

Il te suffit de créer une classe dans ton Config_SpawnPoints.sqf

Code:
class Kavala {
    displayName = "Kavala";
    spawnMarker = "civ_spawn_1";
    icon = "\a3\ui_f\data\map\MapControl\watertower_ca.paa";
    conditions = "!license_civ_rebel";
};
 
Tu as juste à remplacer dans ton initCiv.sqf
ceci :

Code:
civ_spawn_1 = nearestObjects[getMarkerPos  "civ_spawn_1", _spawnBuildings,350];
civ_spawn_2 = nearestObjects[getMarkerPos  "civ_spawn_2", _spawnBuildings,350];
civ_spawn_3 = nearestObjects[getMarkerPos  "civ_spawn_3", _spawnBuildings,350];
civ_spawn_4 = nearestObjects[getMarkerPos  "civ_spawn_4", _spawnBuildings,350];

Par ceci :

Code:
civ_spawn_1 = getMarkerPos "civ_spawn_1";
civ_spawn_2 = getMarkerPos "civ_spawn_2";
civ_spawn_3 = getMarkerPos "civ_spawn_3";
civ_spawn_4 = getMarkerPos "civ_spawn_4";
 
Code:
#include "..\script_macros.hpp"
/*
    File: fn_initCiv.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Initializes the civilian.
*/
private _yeuArray = ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"];
private _tanoaArray = ["Land_House_Small_01_F"];
private _spawnBuildings = [[["Yeu", _yeuArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;

civ_spawn_1 = getMarkerPos "civ_spawn_1";

waitUntil {!(isNull (findDisplay 46))};
if (life_is_alive && !life_is_arrested) then {
    /* Spawn at our last position */
    player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
} else {
    if (!life_is_alive && !life_is_arrested) then {
        if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then {
            [] call life_fnc_startLoadout;
            CASH = 0;
            [0] call SOCK_fnc_updatePartial;
        };
        [] call life_fnc_spawnMenu;
        waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
        waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
    } else {
        if (life_is_arrested) then {
            life_is_arrested = false;
            [player,true] spawn life_fnc_jail;
        };
    };
};
life_is_alive = true;
 
sorry je me suis absenter amor jai installer Duty System tous simplement et voici le fn_initCiv enfaite rien de modif juste le tuto dinstall suivi est sa a resolu en meme temp mon probleme de spawn je spawn pile sur le marqueur



Code:
    File: fn_initCiv.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Initializes the civilian.
*/
if !(isNil "The_programmer_initialised") exitWith {};
private _altisArray = ["Land_i_Shop_01_V1_F","Land_i_Shop_01_V2_F","Land_i_Shop_01_V3_F","Land_i_Shop_02_V1_F","Land_i_Shop_02_V2_F","Land_i_Shop_02_V3_F"];
private _tanoaArray = ["Land_House_Small_01_F"];
private _spawnBuildings = [[["Altis", _altisArray], ["Tanoa", _tanoaArray]]] call TON_fnc_terrainSort;

civ_spawn_1 = nearestObjects[getMarkerPos  "civ_spawn_1", _spawnBuildings,350];
civ_spawn_2 = nearestObjects[getMarkerPos  "civ_spawn_2", _spawnBuildings,350];
civ_spawn_3 = nearestObjects[getMarkerPos  "civ_spawn_3", _spawnBuildings,350];
civ_spawn_4 = nearestObjects[getMarkerPos  "civ_spawn_4", _spawnBuildings,350];

waitUntil {!(isNull (findDisplay 46))};
if (life_is_alive && !life_is_arrested) then {
    /* Spawn at our last position */
    player setVehiclePosition [life_civ_position, [], 0, "CAN_COLLIDE"];
} else {
    if (!life_is_alive && !life_is_arrested) then {
        if (LIFE_SETTINGS(getNumber,"save_civilian_positionStrict") isEqualTo 1) then {
            [] call life_fnc_startLoadout;
            CASH = 0;
            [0] call SOCK_fnc_updatePartial;
        };
        [] call life_fnc_spawnMenu;
        waitUntil{!isNull (findDisplay 38500)}; //Wait for the spawn selection to be open.
        waitUntil{isNull (findDisplay 38500)}; //Wait for the spawn selection to be done.
    } else {
        if (life_is_arrested) then {
            life_is_arrested = false;
            [player,true] spawn life_fnc_jail;
        };
    };
};
life_is_alive = true;
 
Dernière édition par un modérateur:
Solution