Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- File: fn_Tornozeleira.sqf
- Author: DexterRock
- Based: fn_gpsTracker.sqf by Poseidon
- Description: tracks a vehicle.
- */
- private["_x"];
- _x = [_this,0,ObjNull,[ObjNull]] call BIS_fnc_param;
- if(isNull _x) exitWith {};
- if((_x isKindOf "LandVehicle") || (_x isKindOf "Air") || (_x isKindOf "Ship")) exitWith {hint "Coloque a tornozeleira em um detento."};
- if(player distance _x > 4) exitWith {hint "Aproxime-se mais."};
- if(!([false,"Tornozeleira",1] call life_fnc_handleInv)) exitWith {};
- closeDialog 0;
- life_action_inUse = true;
- player playMove "AinvPknlMstpSnonWnonDnon_medic_1";
- sleep 4;
- life_action_inUse = false;
- if(player distance _x > 4) exitWith {titleText["Chegue mais perto!","PLAIN"];};
- titleText["Você colocou a tornozeleira, o detento está sendo rastreado.","PLAIN"];
- [_x] spawn {
- _veh = _this select 0;
- _markerName = format["%1_gpstracker",_veh];
- _marker = createMarkerLocal [_markerName, visiblePosition _veh];
- _marker setMarkerColorLocal "ColorBlue";
- _marker setMarkerTypeLocal "Mil_dot";
- _marker setMarkerTextLocal "GPS Signal " + getText(configFile >> "CfgVehicles" >> typeof _veh >> "displayName");
- _marker setMarkerPosLocal (getPos _veh);
- private _time = time;
- while {(time - _time) < (15 * 60)} do {
- if(not alive _veh) exitWith {deleteMarkerLocal _markerName;};
- _marker setMarkerPosLocal getPos _veh;
- uiSleep 0.5;
- };
- titleText[localize "STR_Cop_Tornozeleira","PLAIN"];
- deleteMarkerLocal _markerName;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement