-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBase.sqf
62 lines (52 loc) · 1.41 KB
/
Base.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
StoreFood = {
params ["", "_player"];
_foodOnPlayer = _player getVariable "foodOnPerson";
_foodInBase = _player getVariable "foodInBase";
_player setVariable ["foodInBase", _foodInBase + _foodOnPlayer];
_player setVariable ["foodOnPlayer", 0];
_message = format ["Food in base: %1", _player getVariable "foodInBase"];
[_player, _message] call HintPlayer;
};
CreatePlayerBases = {
spawns = [
"respawn_west",
"respawn_east",
"respawn_guerrila"
];
{
_spawnLocation = getMarkerPos _x;
_tableLocation = [
(_spawnLocation select 0) + 2.5,
(_spawnLocation select 1) + 2.5,
_spawnLocation select 2
];
_microwaveLocation = [
_tableLocation select 0,
_tableLocation select 1,
(_tableLocation select 2) + .88
];
_fridgeLocation = [
(_tableLocation select 0) - 2,
_tableLocation select 1,
_tableLocation select 2
];
_tent = createSimpleObject [
"CamoNet_OPFOR_open_F",
AGLtoASL _spawnLocation
];
_table = createSimpleObject [
"Land_TableBig_01_F",
AGLtoASL _tableLocation
];
_microwave = createSimpleObject [
"Land_Microwave_01_F",
AGLtoASL _microwaveLocation
];
_fridge = createVehicle [
"Fridge_01_closed_F",
_fridgeLocation, [],
0, "CAN_COLLIDE"
];
[_fridge, "Store food", "call StoreFood", 1] call AddLiteAction;
} forEach spawns;
};