Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- File: fn_trackViewDistance.sqf
- Author: Bryan "Tonic" Boardwine
- Description:
- Constantly monitors the players state.
- i.e Player gets in landvehicle then adjust viewDistance.
- */
- private["_oldVehiclePlayer"];
- while {true} do
- {
- if(isNil{tawvd_action}) then {
- tawvd_player = player;
- tawvd_action = tawvd_player addAction["<t color='#FF0000'>Settings</t>",TAWVD_fnc_openTAWVD,[],-99,false,false,"",''];
- };
- if(tawvd_player != player) then
- {
- tawvd_player removeAction tawvd_action;
- tawvd_player = player;
- tawvd_action = player addAction["<t color='#FF0000'>Settings</t>",TAWVD_fnc_openTAWVD,[],-99,false,false,"",''];
- };
- if(isNil{_oldVehiclePlayer} || {_oldVehiclePlayer != vehicle player}) then {
- _oldVehiclePlayer = vehicle player;
- [] call TAWVD_fnc_updateViewDistance;
- };
- waitUntil {_oldVehiclePlayer != vehicle player || tawvd_player != player};
- if(!isNil{tawvd_disable} && {tawvd_disable}) exitWith {
- tawvd_player removeAction tawvd_action;
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment