Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- fuckdlclock.sqf by Halv
- Copyright (C) 2015 Halvhjearne
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- Contact : [email protected]
- put this file in a folder called custom in the root of your mission.pbo
- in the init.sqf add this:
- ////////////////////////////////////
- []execVM "custom\fuckdlclock.sqf";//
- ////////////////////////////////////
- */
- if((288520 in getDLCs 1) && (304380 in getDLCs 1))exitWith{diag_log "Player has DLC content";};
- _DLCaction1 = -1;
- _DLCaction2 = -1;
- _DLCaction3 = -1;
- _DLCaction4 = -1;
- _DLCaction5 = -1;
- if(isServer)exitWith{};
- waitUntil {!isNull (findDisplay 46)};
- waitUntil {!dialog};
- sleep 5;
- while{alive player}do{
- _object = cursorTarget;
- // ROFL ...
- if(!isNull _object)then{
- _typeOf = typeOf _object;
- if (288520 in getDLCs 2) then {
- if(getText(configFile >> 'cfgvehicles' >> _typeOf >> 'DLC') == 'Kart' && player distance _object < 5 && isNull driver _object && locked _object in [0,1])then{
- if (_DLCaction1 < 0) then {
- _txt = (gettext (configFile >> 'cfgvehicles' >> _typeOf >> 'displayName'));
- _DLCaction1 = player addAction [format["<t color='#0096ff'>Get in %1 as Driver</t>",_txt],{player moveInDriver (_this select 3);},_object, 6, true, true, "", ""];
- };
- }else{
- player removeAction _DLCaction1;
- _DLCaction1 = -1;
- };
- };
- // ROFL-Copter ...
- if (304380 in getDLCs 2) then {
- _dis = (sizeOf _typeOf)/2;
- if(getText(configFile >> 'cfgvehicles' >> _typeOf >> 'DLC') == 'Heli' && player distance _object < _dis && locked _object < 2)then{
- if((_object EmptyPositions "Driver") >0)then{
- if (_DLCaction2 < 0) then {
- _txt = (gettext (configFile >> 'cfgvehicles' >> _typeOf >> 'displayName'));
- _DLCaction2 = player addAction [format["<t color='#0096ff'>Get in %1 as Pilot</t>",_txt],{player moveInDriver (_this select 3);},_object, 6, true, true, "", ""];
- };
- }else{
- player removeAction _DLCaction2;
- _DLCaction2 = -1;
- };
- if ((_object EmptyPositions "Gunner") >0)then{
- if (_DLCaction3 < 0) then {
- _txt = (gettext (configFile >> 'cfgvehicles' >> _typeOf >> 'displayName'));
- _DLCaction3 = player addAction [format["<t color='#0096ff'>Get in %1 as Gunner</t>",_txt],{player moveInGunner (_this select 3);},_object, 6, true, true, "", ""];
- };
- }else{
- player removeAction _DLCaction3;
- _DLCaction3 = -1;
- };
- if ((_object EmptyPositions "Commander") >0)then{
- if (_DLCaction4 < 0) then {
- _txt = (gettext (configFile >> 'cfgvehicles' >> _typeOf >> 'displayName'));
- _DLCaction4 = player addAction [format["<t color='#0096ff'>Get in %1 as Commander</t>",_txt],{player moveInCommander (_this select 3);},_object, 6, true, true, "", ""];
- };
- }else{
- player removeAction _DLCaction4;
- _DLCaction4 = -1;
- };
- if ((_object EmptyPositions "Cargo") >0)then{
- if (_DLCaction5 < 0) then {
- _txt = (gettext (configFile >> 'cfgvehicles' >> _typeOf >> 'displayName'));
- _DLCaction5 = player addAction [format["<t color='#0096ff'>Get in %1 as Cargo</t>",_txt],{player moveInCargo (_this select 3);},_object, 6, true, true, "", ""];
- };
- }else{
- player removeAction _DLCaction5;
- _DLCaction5 = -1;
- };
- }else{
- {player removeAction _x}forEach[_DLCaction2,_DLCaction3,_DLCaction4,_DLCaction5];
- _DLCaction2 = -1;_DLCaction3 = -1;_DLCaction4 = -1;_DLCaction5 = -1;
- };
- };
- }else{
- {player removeAction _x}forEach[_DLCaction1,_DLCaction2,_DLCaction3,_DLCaction4,_DLCaction5];
- _DLCaction1 = -1;_DLCaction2 = -1;_DLCaction3 = -1;_DLCaction4 = -1;_DLCaction5 = -1;
- };
- if(player != vehicle player)then{
- {player removeAction _x}forEach[_DLCaction1,_DLCaction2,_DLCaction3,_DLCaction4,_DLCaction5];
- _DLCaction1 = -1;_DLCaction2 = -1;_DLCaction3 = -1;_DLCaction4 = -1;_DLCaction5 = -1;
- };
- sleep 2;
- };
- waitUntil{alive player};
- [] execVM __FILE__;
Advertisement
Add Comment
Please, Sign In to add comment