-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix score timeout monitoring * Add ability to revert teleportation for killers Could be useful in case they glitch into some object (like huge rock). Available for 5 seconds only. * Initialize killers starting equipment globally (and JIP) * Always show killer's name on marker for other killers * Fix civilian equipment not available for killers Equipment was initialized only on server and not published * Publish all modules variables * Create stashes markers by JIP event * Reset cop loadout on respawn * Make players markers bigger than civilian markers * Fix markers decay not working * Make score rewards on par with old version * Fix teleportation revert for killers not working * Clear all items from killer stash box before filling it * Broadcast all killers stashes at once * Prevent cops from losing all equipment when their score goes negative * Fix police loadout not being reset after respawn * Fix police respawn not working properly in localhost * Fix idle timer starting immediately * Detect failure when creating civilian unit to prevent markers at [0,0] * Fix jail and killers base initialization when there are more objects in mission * Drop vanikał module initialization in favor of postInit + entities search * Improve handcuffing detection to avoid game end when killers are free * Revert "Fix jail and killers base initialization when there are more objects in mission" This reverts commit ea6f4ad. * Add error when jail is not detected * Add function to free all prisoners at once and optionally teleport them * Fix fnc_anyKillerFree * Disable vanilla ratings
- Loading branch information
Showing
45 changed files
with
427 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function frees all prisoners. | ||
* If an object was provided, all prisoners will be teleported to the object's position. | ||
* | ||
* Arguments: | ||
* 0: Object that had triggered the action <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [bob] call afsk_jail_fnc_freeAll | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params [["_object", objNull]]; | ||
|
||
private _prisoners = +GVAR(prisoners); | ||
GVAR(prisoners) = []; | ||
|
||
{ | ||
[_x] call FUNC(free); | ||
if (_object isNotEqualTo objNull) then { | ||
_x setPos (getPos _object); | ||
}; | ||
} forEach _prisoners; | ||
|
||
private _msg = format ["Prisoners have been released from the prison!"]; | ||
[QEGVAR(common,showSideChatMsg), [WEST, _msg]] call CBA_fnc_globalEvent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
PREP(addItemToStash); | ||
PREP(anyKillerFree); | ||
PREP(createMarkersForNearbyVehicles); | ||
PREP(createStartPositionMarker); | ||
PREP(createStashesMarkers); | ||
PREP(createTeleport); | ||
PREP(deleteStartPositionsMarkers); | ||
PREP(disableTeleport); | ||
PREP(fillKillersStash); | ||
PREP(initKillersBase); | ||
PREP(initKillersStashes); | ||
PREP(initStartPositions); | ||
PREP(killerHandcuffed); | ||
PREP(killerKilled); | ||
PREP(killerRespawned); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function checks if any killer is free. | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* call afsk_killers_fnc_anyKillerFree | ||
* | ||
* Public: No | ||
*/ | ||
|
||
if (EGVAR(common,ACE_Loaded)) then { | ||
allPlayers findIf { | ||
side _x isEqualTo EAST | ||
&& {alive _x | ||
&& {!(_x getVariable [QACEGVAR(captives,isHandcuffed), false]) | ||
}}}!= -1 | ||
} else { | ||
allPlayers findIf { | ||
side _x isEqualTo EAST | ||
&& {alive _x | ||
&& {!(_x getVariable [QEGVAR(jail,isImprisoned), false]) | ||
}}}!= -1 | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function creates markers for all killers stashes. | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* None | ||
* | ||
* Public: No | ||
*/ | ||
|
||
{ | ||
private _marker = createMarkerlocal [str _x, getPos _x]; | ||
_marker setMarkerColorlocal "ColorEAST"; | ||
_marker setMarkerSizelocal [0.5,0.5]; | ||
_marker setMarkerTypelocal "mil_pickup"; | ||
_x setVariable [QGVAR(marker), _marker]; | ||
} forEach GVAR(stashes); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function removes all teleport actions from killers base flag. | ||
* | ||
* Arguments: | ||
* None | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* None | ||
* | ||
* Public: No | ||
*/ | ||
|
||
private _flag = EGVAR(modules,killersBase) getVariable "Teleporter"; | ||
private _teleportActionsIDs = _flag getVariable [QGVAR(teleportActionsIDs), []]; | ||
{ | ||
(_this select 0 ) removeAction (_x); | ||
} forEach _teleportActionsIDs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "script_component.hpp" | ||
/* | ||
* Author: 3Mydlo3 | ||
* Function handles killer being handcuffed event. | ||
* | ||
* Arguments: | ||
* 0: Handcuffed killer <OBJECT> | ||
* | ||
* Return Value: | ||
* None | ||
* | ||
* Example: | ||
* [bob] call afsk_killers_fnc_killerHandcuffed | ||
* | ||
* Public: No | ||
*/ | ||
|
||
params ["_killer"]; | ||
|
||
if !(isServer) exitWith {}; | ||
|
||
_killer setVariable [QEGVAR(jail,isImprisoned), true, true]; | ||
|
||
private _anyKillerFree = call FUNC(anyKillerFree); | ||
if (!_anyKillerFree) then { | ||
[QEGVAR(score,killersKilled)] call CBA_fnc_serverEvent; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.