Hey leute ich wollte mal fragen wie man es machen kann wenn ein Neuling auf dem Server Joint das dann eine Intro Cam Erscheint die z.B. über ganz Altis fliegt, so wenn er das hintersich hat soll er beim nächsten Connecten das nicht mehr haben.

Spawn Intro nur einmal für Neulinge
-
Deathman -
11. November 2018 um 08:59 -
Erledigt
-
-
Einfach ein Intro bauen und dann, hast du eigentlich zwei Möglichkeiten.
Du kannst entweder in der DB eine extra Spalte einfügen und auf Grund des Wertes der Spalte das Intro starten oder nicht.
Und die zweite und auch bessere Möglichkeit ist, dass du eine Variable in der profileNamespace speicherst und dann ebenfalls abhängig von dem Wert dieser Variable das Intro startest oder nicht.
-
gibt es nicht dafür eine life_firstSpawn Variable mit der du das abfragen kannst?
-
man könnte auch die last connected spalte der DB nutzen
-
oder man macht einfach eine Lizenz, sowas wie "Personalausweis" und setzt die beim ersten spawnen
-
das letzte klingt doch sehr fernüftig aber wie stelle ich das jetzt am besten an ??
-
Also so
if (license_civ_Einbuergerungslizenz > 0) then {
_intro = []call life_fnc_Intro;
waitUntil {scriptDone _intro};
};
-
mit einem > fragst du ob die variabel in dem fall license_civ_Einbuergerungslizenz größer als 0 ist
ich würde eher mit = arbeiten sprich nicht ob es größer als ist sondern wenn es 0 ist oder 1 ist
ansonsten wo schreibst du das rein? also in welche datei
-
Also so
if (license_civ_Einbuergerungslizenz > 0) then {
_intro = []call life_fnc_Intro;
waitUntil {scriptDone _intro};
};
Fast:
license_civ_Einbuergerungslizenz > 0
Zu:
if (license_civ_Einbuergerungslizenz) then {
LG
-
und wo füge ich das jetzt ein bei der core init oder in der spawnconfirm oder initCiv ??
-
und wo füge ich das jetzt ein bei der core init oder in der spawnconfirm oder initCiv ??
Wenn du es für alle willst in die normale init von der Mission.
Ansonsten initCiv
-
Bei der InitCiv habe ich es schon probiert da geht es nicht
-
Spoiler anzeigen
Code: fn_initCiv.sqf
Alles anzeigen#include "..\script_macros.hpp" /* File: fn_initCiv.sqf Author: Bryan "Tonic" Boardwine Description: Initializes the civilian. */ 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 { _handle = [] spawn life_fnc_civLoadout; waitUntil {scriptDone _handle}; CASH = 0; [0] call SOCK_fnc_updatePartial; }; waitUntil {player getVariable ["gang_init_done", false]}; ///////////////////////////////////////////////////////// if (license_civ_Einbuergerungslizenz) then { _intro = []call life_fnc_Intro; waitUntil {scriptDone _intro}; }; ///////////////////////////////////////////////////////// [] call cat_spawn_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;
-
Spoiler anzeigen
Code: fn_initCiv.sqf
Alles anzeigen#include "..\script_macros.hpp" /* File: fn_initCiv.sqf Author: Bryan "Tonic" Boardwine Description: Initializes the civilian. */ 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 { _handle = [] spawn life_fnc_civLoadout; waitUntil {scriptDone _handle}; CASH = 0; [0] call SOCK_fnc_updatePartial; }; waitUntil {player getVariable ["gang_init_done", false]}; ///////////////////////////////////////////////////////// if (license_civ_Einbuergerungslizenz) then { _intro = []call life_fnc_Intro; waitUntil {scriptDone _intro}; }; ///////////////////////////////////////////////////////// [] call cat_spawn_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;
RPT?
Und probiere das mal so:
- if (license_civ_Einbuergerungslizenz) then {
- _intro = [] call life_fnc_Intro;
- waitUntil {scriptDone _intro};
- };
-
Hier mein RPT keine Fehler gefunden RPTLogs
-
Macht mal bitte Vorschläge in welche Datein ich das Einfügen kann und in welcher Zeile
-
Er hat doch e ein Beispiel gepostet. In die fn_initCiv.sqf
-
Habe alles auspobiert es funkltioniert nichts davon bzw. habe ich es an den Logischsten stellen eingesetzt