Advertisement
Guest User

Untitled

a guest
Nov 18th, 2017
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. /*
  2. File: fn_Tornozeleira.sqf
  3. Author: DexterRock
  4. Based: fn_gpsTracker.sqf by Poseidon
  5. Description: tracks a vehicle.
  6. */
  7. private["_x"];
  8. _x = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
  9. if(isNull _x) exitWith {};
  10. if((_x isKindOf "LandVehicle") || (_x isKindOf "Air") || (_x isKindOf "Ship")) exitWith {hint "Coloque a tornozeleira em um detento."};
  11. if(player distance _x > 4) exitWith {hint "Aproxime-se mais."};
  12. if(!([false,"Tornozeleira",1] call life_fnc_handleInv)) exitWith {};
  13. closeDialog 0;
  14.  
  15. life_action_inUse = true;
  16. player playMove "AinvPknlMstpSnonWnonDnon_medic_1";
  17. sleep 4;
  18. life_action_inUse = false;
  19. if(player distance _x > 4) exitWith {titleText["Chegue mais perto!","PLAIN"];};
  20. titleText["Você colocou a tornozeleira, o detento está sendo rastreado.","PLAIN"];
  21.  
  22. [_x] spawn {
  23. _veh = _this select 0;
  24. _markerName = format["%1_gpstracker",_veh];
  25. _marker = createMarkerLocal [_markerName, visiblePosition _veh];
  26. _marker setMarkerColorLocal "ColorBlue";
  27. _marker setMarkerTypeLocal "Mil_dot";
  28. _marker setMarkerTextLocal "GPS Signal " + getText(configFile >> "CfgVehicles" >> typeof _veh >> "displayName");
  29. _marker setMarkerPosLocal (getPos _veh);
  30. private _time = time;
  31. while {(time - _time) < (15 * 60)} do {
  32. if(not alive _veh) exitWith {deleteMarkerLocal _markerName;};
  33. _marker setMarkerPosLocal getPos _veh;
  34. uiSleep 0.5;
  35. };
  36. titleText[localize "STR_Cop_Tornozeleira","PLAIN"];
  37. deleteMarkerLocal _markerName;
  38. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement