So bin endlich fertig geworden
neue datei erstellen
fn_loading.sqf
Spoiler anzeigen
Code
#include "\die_sippe_functions\script_macros.hpp"
/*
init loading circle
call sippe_fnc_loading;
waitUntil {player getVariable ["isDoneLoading", 0] isEqualTo 1};
Parameters:
- _textToDisplay [STRING] Text to show
- _durchgaenge [NUMBER] After how many full rotations should the loading end?
- _speedAngle [NUMBER] Speed of the rotation
*/
params[
["_textToDisplay", "Kein Text hinterlegt"],
["_durchgaenge", 5],
["_speedAngle", 1]
];
0 cutText["","BLACK FADED",99999999];
player setVariable ["isDoneLoading", 0, false];
disableSerialization;
(findDisplay 5000) displaySetEventHandler ["keyDown","_this call life_fnc_displayHandler"];
angle = 0;
speedAngle = _speedAngle;
counter = 0;
textToDisplay = _textToDisplay;
durchgaenge = _durchgaenge;
LIFELOADING(800) ctrlSetStructuredText parseText format["<t align='center'>%1</t>", textToDisplay];
onEachFrame {
if (angle > 89) then {
LIFELOADING(800) ctrlSetStructuredText parseText format["<t align='center'>%1.</t>", textToDisplay];
};
if (angle > 179) then {
LIFELOADING(800) ctrlSetStructuredText parseText format["<t align='center'>%1..</t>", textToDisplay];
};
if (angle > 269) then {
LIFELOADING(800) ctrlSetStructuredText parseText format["<t align='center'>%1...</t>", textToDisplay];
};
if (angle > 359) then {
angle = 0;
counter = counter + 1;
LIFELOADING(800) ctrlSetStructuredText parseText format["<t align='center'>%1</t>", textToDisplay];
};
LIFELOADING(900) ctrlSetAngle [angle, 0.5, 0.5];
angle = angle + speedAngle;
if(counter isEqualTo durchgaenge)exitWith{
player setVariable ["isDoneLoading", 1, false];
};
};
Alles anzeigen
loading.hpp
Spoiler anzeigen
Code
class life_loading {
idd = 5000;
name= "life_loading";
movingEnable = 0;
enableSimulation = 1;
onLoad="uiNamespace setVariable ['life_loading',_this select 0]";
fadein=0;
duration = 99999999999;
fadeout=0;
objects[]={};
class controlsBackground {
class circle: Life_RscPictureKeepAspect {
idc = 900;
text = "A3\Missions_F_Exp\data\Img\lobby\ui_campaign_lobby_background_tablet_radial_left_ca.paa";
x = 0.45875 * safezoneW + safezoneX;
y = 0.422973 * safezoneH + safezoneY;
w = 0.0825 * safezoneW;
h = 0.154054 * safezoneH;
};
class text: Life_RscStructuredText {
idc = 800;
text = "";
x = 0.29375 * safezoneW + safezoneX;
y = 0.400965 * safezoneH + safezoneY;
w = 0.4125 * safezoneW;
h = 0.0220078 * safezoneH;
};
};
};
Alles anzeigen
in eurer Masterhandler.hpp
eintragen.
eure core/init.sqf bearbeiten. ( MEINE IST BEARBEITET UND KÖNNTE NICHT MIT EURER FUNKTIONIEREN!!!)
Spoiler anzeigen
Code
#include "..\script_macros.hpp"
/*
File: init.sqf
Author: Bryan "Tonic" Boardwine
Description:
Master client initialization file
*/
diag_log "----------------------------------------------------------------------------------------------------";
diag_log "--------------------------------- Starting Altis Life Client Init ----------------------------------";
diag_log format["------------------------------------------ Version %1 -------------------------------------------",(LIFE_SETTINGS(getText,"framework_version"))];
diag_log "----------------------------------------------------------------------------------------------------";
0 cutText["","BLACK FADED",99999999];
if (!(createDialog "life_loading")) exitWith { hint "ERROR LOADING NOT WORKING ERROR"; };
["Der Client wird geladen - Bitte warten", 2, 10] call sippe_fnc_loading;
waitUntil {player getVariable ["isDoneLoading", 0] isEqualTo 1};
_timeStamp = diag_tickTime;
waitUntil {!isNull (findDisplay 46)};
[] call compile preprocessFileLineNumbers "core\clientValidator.sqf";
enableSentences false;
diag_log "[Life Client] Initialization Variables";
[] call compile preprocessFileLineNumbers "core\configuration.sqf";
diag_log "[Life Client] Variables initialized";
diag_log "[Life Client] Setting up Eventhandlers";
[] call life_fnc_setupEVH;
diag_log "[Life Client] Eventhandlers completed";
diag_log "[Life Client] Setting up user actions";
[] call life_fnc_setupActions;
diag_log "[Life Client] User actions completed";
diag_log "[Life Client] Waiting for the server to be ready...";
waitUntil {!isNil "life_server_isReady" && {!isNil "life_server_extDB_notLoaded"}};
if (life_server_extDB_notLoaded) exitWith {
0 cutText [localize "STR_Init_ExtdbFail","BLACK FADED",99999999];
};
waitUntil {life_server_isReady};
diag_log "[Life Client] Server loading completed ";
//0 cutText [localize "STR_Init_ServerReady","BLACK FADED",99999999];
["Warten, bis der Server bereit ist - Bitte warten", 2, 10] call sippe_fnc_loading;
waitUntil {player getVariable ["isDoneLoading", 0] isEqualTo 1};
[] call SOCK_fnc_dataQuery;
waitUntil {life_session_completed};
//0 cutText[localize "STR_Init_ClientFinish","BLACK FADED",99999999];
["Fertigstellen der Client-Einrichtungs-Prozedur - Bitte warten", 2, 10] call sippe_fnc_loading;
waitUntil {player getVariable ["isDoneLoading", 0] isEqualTo 1};
[] spawn life_fnc_escInterupt;
closeDialog 0;
switch (playerSide) do {
case west: {
life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_cop");
[] call life_fnc_initCop;
};
case civilian: {
life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_civ");
[] call life_fnc_initCiv;
};
case independent: {
life_paycheck = LIFE_SETTINGS(getNumber,"paycheck_med");
[] call life_fnc_initMedic;
};
};
life_paycheck = compile (if (life_paycheck isEqualType "") then { life_paycheck} else {str(life_paycheck)});
player setVariable ["restrained", false, true];
player setVariable ["Escorting", false, true];
player setVariable ["transporting", false, true];
player setVariable ["playerSurrender", false, true];
player setVariable ["realname", profileName, true];
player setVariable ["gagged",false,true];
diag_log "[Life Client] Past Settings Init";
if (isNil "The_programmer_initialised") then {
(findDisplay 46) displayAddEventHandler ["KeyDown", "_this call life_fnc_keyHandler"];
};
[player, life_settings_enableSidechannel, playerSide] remoteExecCall ["TON_fnc_manageSC", RSERV];
call life_fnc_hudSetup;
[] spawn life_fnc_survival;
[] spawn {
for "_i" from 0 to 1 step 0 do {
waitUntil {(!isNull (findDisplay 49)) && {(!isNull (findDisplay 602))}}; // Check if Inventory and ESC dialogs are open
(findDisplay 49) closeDisplay 2; // Close ESC dialog
(findDisplay 602) closeDisplay 2; // Close Inventory dialog
};
};
addMissionEventHandler ["EachFrame", life_fnc_playerTags];
addMissionEventHandler ["EachFrame", life_fnc_revealObjects];
if (LIFE_SETTINGS(getNumber,"enable_fatigue") isEqualTo 0) then {player enableFatigue false;};
if (LIFE_SETTINGS(getNumber,"pump_service") isEqualTo 1) then {
[] execVM "core\fn_setupStationService.sqf";
};
life_fnc_RequestClientId = player;
publicVariableServer "life_fnc_RequestClientId";
/*
https://feedback.bistudio.com/T117205 - disableChannels settings cease to work when leaving/rejoining mission
Universal workaround for usage in a preInit function. - AgentRev
Remove if Bohemia actually fixes the issue.
*/
{
_x params [["_chan",-1,[0]], ["_noText","false",[""]], ["_noVoice","false",[""]]];
_noText = [false,true] select ((["false","true"] find toLower _noText) max 0);
_noVoice = [false,true] select ((["false","true"] find toLower _noVoice) max 0);
_chan enableChannel [!_noText, !_noVoice];
} forEach getArray (missionConfigFile >> "disableChannels");
if (life_HC_isActive) then {
[getPlayerUID player, player getVariable ["realname", name player]] remoteExec ["HC_fnc_wantedProfUpdate", HC_Life];
} else {
[getPlayerUID player, player getVariable ["realname", name player]] remoteExec ["life_fnc_wantedProfUpdate", RSERV];
};
[] spawn theprogrammer_core_fnc_clientInit;
[] spawn The_programmer_Duty_fnc_init_Service;
[] spawn {
_teamspeakName = "Die Sippe";
_temspeakAdress = "5.9.111.254";
_channelName = "TaskForceRadio";
// Editing code below is not recommended
_isAdmin = false;
if !(isNil "life_adminlevel") then {
if ((call life_adminlevel) > 0) then {
_isAdmin = true;
titleText ["The presence check in the Radio Task Force channel is disabled as you are admin !","BLACK IN"];
};
};
if (_isAdmin) exitWith {};
if (isNil "TFAR_fnc_isTeamSpeakPluginEnabled") exitwith {
999999 cutText ["Radio Task Force is not enabled on your computer. Please re-synchronize and try again","BLACK FADED"];
999999 cutFadeOut 99999999;
};
_tfarEnabled = true;
_playerOnTeamspeak = true;
_playerInChannel = false;
_sleep = 2;
_alreadyKnow = false;
while {true} do {
if !([] call TFAR_fnc_isTeamSpeakPluginEnabled) then {
titleText ["Please enable Radio Task Force in your teampeak plugins ! To do this, go to the teamspeak settings tab then plugins and enable it", "BLACK"];
_tfarEnabled = false;
} else {
_tfarEnabled = true;
};
if !(_teamspeakName == (call TFAR_fnc_getTeamSpeakServerName)) then {
titleText [format ["Please join our teamspeak : %1",_temspeakAdress], "BLACK"];
_playerOnTeamspeak = false;
} else {
_playerOnTeamspeak = true;
};
if !(_channelName == (call TFAR_fnc_getTeamSpeakChannelName)) then {
titleText ["Please reload your Task Force Radio plugin to be moved to the voice channel! To do this, go to the teamspeak settings then plugins and press the relaod button", "BLACK"];
_playerInChannel = false;
} else {
_playerInChannel = true;
};
if (_tfarEnabled && _playerOnTeamspeak && _playerInChannel) then {
if !(_alreadyKnow) then {
titleText ["Radio Task Force is well initialized, welcome !","BLACK IN"];
_alreadyKnow = true;
};
_sleep = 5;
} else {
_alreadyKnow = false;
_sleep = 2;
};
sleep _sleep;
};
};
diag_log "----------------------------------------------------------------------------------------------------";
diag_log format [" End of Altis Life Client Init :: Total Execution Time %1 seconds ",(diag_tickTime - _timeStamp)];
diag_log "----------------------------------------------------------------------------------------------------";
Alles anzeigen
fn_dataQuery ersetzen
Spoiler anzeigen
Code
#include "..\..\script_macros.hpp"
/*
File: fn_dataQuery.sqf
Author: Bryan "Tonic" Boardwine
Description:
Starts the 'authentication' process and sends a request out to
the server to check for player information.
*/
if (life_session_completed) exitWith {};
private _sender = player;
private _uid = getPlayerUID _sender;
private _side = playerSide;
[format ["Frage Spieler Informationen zu UID [%1] ab",_uid], 2, 10] call sippe_fnc_loading;
waitUntil {player getVariable ["isDoneLoading", 0] isEqualTo 1};
if (life_HC_isActive) then {
[_uid,_side,_sender] remoteExec ["HC_fnc_queryRequest",HC_Life];
} else {
[_uid,_side,_sender] remoteExec ["DB_fnc_queryRequest",RSERV];
};
Alles anzeigen
fn_insertPlayerInfo.sqf
Spoiler anzeigen
Code
#include "..\..\script_macros.hpp"
/*
File: fn_insertPlayerInfo.sqf
Author: Bryan "Tonic" Boardwine
Description:
Upon first join inital player data is sent to the server and added to the database.
Setup data gets sent to life_server\Functions\MySQL\fn_insertRequest.sqf
*/
if (life_session_completed) exitWith {};
//cutText[localize "STR_Session_QueryFail","BLACK FADED"];
//0 cutFadeOut 9999999;
["Versuche die UID: %1 zu speichern - Bitte warten", 2, 10] call sippe_fnc_loading;
waitUntil {player getVariable ["isDoneLoading", 0] isEqualTo 1};
private _bank = switch (playerSide) do {
case west: {
LIFE_SETTINGS(getNumber,"bank_cop");
};
case civilian: {
LIFE_SETTINGS(getNumber,"bank_civ");
};
case independent: {
LIFE_SETTINGS(getNumber,"bank_med");
};
};
if (life_HC_isActive) then {
[getPlayerUID player,profileName,CASH,_bank,player] remoteExecCall ["HC_fnc_insertRequest",HC_Life];
} else {
[getPlayerUID player,profileName,CASH,_bank,player] remoteExecCall ["DB_fnc_insertRequest",RSERV];
};
Alles anzeigen
fn_requestReceived.sqf den CutText ändern.
Spoiler anzeigen
Fertig