mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2026-02-27 18:21:50 +03:00
Compiles.sqf cleanup
- Moved player_countMagazines to \compile\ folder - Removed several unused and obsolete files - Moved some epoch functions out of compiles.sqf into individual files - Synced order and formatting with 1.8.7. Much easier to compare now. Any changes I make to official DayZ Mod code and files I also submit as a pull request to them.
This commit is contained in:
12
SQF/dayz_code/compile/dze_ejectPlayer.sqf
Normal file
12
SQF/dayz_code/compile/dze_ejectPlayer.sqf
Normal file
@@ -0,0 +1,12 @@
|
||||
// check if player in vehicle
|
||||
private ["_noDriver","_vehicle","_inVehicle"];
|
||||
|
||||
_vehicle = vehicle player;
|
||||
_inVehicle = (_vehicle != player);
|
||||
|
||||
if(_inVehicle) then {
|
||||
_noDriver = ((_vehicle emptyPositions "driver") > 0);
|
||||
if (_noDriver && (speed _vehicle) != 0) then {
|
||||
player action [ "eject", _vehicle];
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user