Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. //By Eagledude4
  2.  
  3. _vehicle = _this select 0;
  4. _pos = _this select 1;
  5. _player = _this select 2;
  6.  
  7. waitUntil {vehicle _player == _vehicle};
  8. switch (typeOf _vehicle) do {
  9. case "C_Offroad_01_F": {
  10. if (_pos == "cargo" && ((_vehicle getVariable "box_num") < 0) && (_vehicle getCargoIndex _player > 0)) then {
  11. if ((_vehicle getVariable "box_num") == -2) then {
  12. _player action ["Eject", _vehicle];
  13. _displayName = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName");
  14. [format ["You must remove the %1's cargo before entering the cargo space.", _displayName],"hint",owner _player] call BIS_fnc_MP;
  15. [[player,format ["You must remove the %1's cargo before entering the cargo space.", _displayName]],"globalChat",owner _player] call BIS_fnc_MP;
  16. } else {
  17. if (_vehicle getCargoIndex _player in [1,2]) then {
  18. _player action ["Eject", _vehicle];
  19. _displayName = getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName");
  20. [format ["You must remove the %1's cargo before entering the cargo space.", _displayName],"hint",owner _player] call BIS_fnc_MP;
  21. [[player,format ["You must remove the %1's cargo before entering the cargo space.", _displayName]],"globalChat",owner _player] call BIS_fnc_MP;
  22. };
  23. };
  24. };
  25. };
  26. };
  27.  
  28. [getPlayerUID _player,side _player,getPosASL _player,6] call DB_fnc_updatePartial;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement