This repository has been archived by the owner on Jul 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
initPlayerLocal.sqf
76 lines (57 loc) · 2.61 KB
/
initPlayerLocal.sqf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//define the paths to your loadout init for each side (e.g. bluforLoadoutPath = "loadouts\bluforInit.sqf"; if you use one init for all sides, enter the same value for each variable)
//define params for loadout init for each side (e.g. "[roleDescription player]"; if you use one init for all sides, enter the same value for each variable)
//leave empty if you are not using custom loadouts
bluforLoadoutPath = "";
bluforLoadoutParams = "[]";
opforLoadoutPath = "";
opforLoadoutParams = "[]";
indepLoadoutPath = "";
indepLoadoutParams = "[]";
["InitializePlayer", [player]] call BIS_fnc_dynamicGroups;
if (isMultiplayer) then {
joinTime = serverTime;
} else {
joinTime = time;
};
[] execVM "initWaveRespawn.sqf";
// get loadout for the first time, just to make sure
_loadout = player getVariable ["GRAD_loadout","none"];
if (_loadout != "none") then {
_stringLoadout = "GRAD_getUnitLoadout_" + _loadout;
diag_log format ["calling loadout %1",_stringLoadout];
player setUnitLoadout [(missionNamespace getVariable [_stringLoadout, []]),true];
};
// 0 = [] execVM "player\animations\addBuyInteraction.sqf";
// reset any attempt to raise or lower rating
player addEventhandler ["HandleRating", {
0
}];
// _codeLoadout = compile _stringLoadout;
// call compile ("setUnitLoadout " + [_codeLoadout,true]);
//call compile format ["%2 call setUnitLoadout [GRAD_getUnitLoadout_%1,true]", _stringLoadout, player];
// player setUnitLoadout [_codeLoadout, true];
0 = execVM "player\animations\addWavingInteraction.sqf";
0 = execVM "player\animations\addBuyInteraction.sqf";
0 = execVM "player\addObjectiveListener.sqf";
mcd_fnc_strToLoadout = compile preprocessFileLineNumbers "loadouts\fnc_strToLoadout.sqf";
// for local execution of interrogation actions
GRAD_fnc_addQuestioningAction = {
_id = _this addAction ["<t color='#F24F0F'>Verhören</t>",{
[_this select 0, _this select 1] remoteExec ["GRAD_fnc_questionCiv", [2,0] select (isMultiplayer && isDedicated), false];
[player] call ace_weaponselect_fnc_putWeaponAway;},
0, 100, true, true, '',
"player distance _target < 3 && !(_target getVariable ['civ_occupied',false]) && alive _target"];
_this setUserActionText [_id, "<t color='#F24F0F'>Verhören</t>"];
};
GRAD_fnc_showQuestioningAnswer = {
_pos = _this select 0;
_answer = _this select 1;
_markerPositionArray = _this select 2;
// dont display if too far away
if (position player distance _pos > 8) exitWith {};
// create marker for bystanders
if (count _markerPositionArray > 0) then {
0 = [(_markerPositionArray select 0), 250] execVM "player\createPilotMarker.sqf";
};
cutText [format ["%1",_answer],"PLAIN"];
};