forked from RPFramework/RPFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.sqf
60 lines (46 loc) · 1.42 KB
/
init.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
/*
Author: Kerkkoh
First Edit: 23.11.2015
*/
enableSaving [false, false];
uiSleep 1;
if (isServer) then {
[] call Server_fnc_handleDisconnect;
[] spawn Server_fnc_statSaveLoop;
[] spawn Server_fnc_initInteractions;
[] spawn Server_fnc_initModules;
} else {
waitUntil {uiSleep 0.01; !(isNil {player}) && player == player && alive player};
cutText ["Loading in...","BLACK",1];
[player, false] remoteExec ["Server_fnc_initStats", 2];
waitUntil {uiSleep 0.01; player getVariable ["loadedIn", false]};
cutText ["","plain",1];
[] spawn Client_fnc_initHudLoop;
[] call Client_fnc_miscVariables;
player setVariable ["cuffed", false, true];
RPF_Holstered = 0;
waituntil {uiSleep 0.01; !(isNull (findDisplay 46))};
(findDisplay 46) displayAddEventHandler ["KeyDown", {
switch (_this select 1) do {
case ((missionConfigFile >> "RPF_Config" >> "interactionKey") call BIS_fnc_getCfgData): {
[]call Client_fnc_openInteraction;
false;
};
//Holster/Unholster (default key H)
case ((missionConfigFile >> "RPF_Config" >> "holsterKey") call BIS_fnc_getCfgData): {
[]call Client_fnc_holster;
false;
};
//Holster/Unholster (default key H)
case ((missionConfigFile >> "RPF_Config" >> "unlockCarKey") call BIS_fnc_getCfgData): {
[cursorObject]call Client_fnc_useKey;
false;
};
default {
false;
};
};
}];
[] spawn Client_fnc_initSurvivalLoop;
[] call Client_fnc_initModules;
};