Jump to content

[Release] Stretcher Script


GhostsBR
 Share

Recommended Posts

Author: GhostsBR

Description: This script enables the use of a stretcher, avoiding rdm and removing the necessity of taser for medic.

Difficulty: Easy

 

1. Select your file language and make download.

2. Go to core/functions and put the files here.

3. In Functions.hpp class Functions add:

class medico {};

4. Go to core/functions  and open  fn_keyHandler.sqf in case 35 add this:

if (!_shift && !_ctrlKey) then {
			if (playerSide isEqualTo independent) then {
				[] call life_fnc_medico;
			};
	    };

5. Go to core/medical and open fn_revived.sqf and put this at the end of the code:

if (alive player) then {
	0 = ["DynamicBlur", 400, [10]] spawn 
	{
		params ["_name", "_priority", "_effect", "_handle"];
		while {
			_handle = ppEffectCreate [_name, _priority];
			_handle < 0
		} do {
			_priority = _priority + 1;
		};
		_handle ppEffectEnable true;
		_handle ppEffectAdjust _effect;
		_handle ppEffectCommit 1;
		waitUntil {ppEffectCommitted _handle};
		systemChat "My head hurts, it should pass soon...";
		uiSleep 60; 
		_handle ppEffectEnable false;
		ppEffectDestroy _handle;
		systemChat "I'm feeling better already.";
	};
};

if (playerside isEqualto civilian) then {
	player switchmove "AinjPpneMstpSnonWnonDnon";
	player setDamage 0.9;
};

6. Enjoy the script, use H for take the Stretcher.

 

20180726170711_1.thumb.jpg.938d56cd6683db6cf8cbd277ae510de6.jpg

EN-US.rar

PT-BR.rar

Edited by GhostsBR
Link to comment
Share on other sites

  • 4 weeks later...
On 7/28/2018 at 4:08 AM, songkiart said:

can to move player on the bed

I would like to thank my friend GhostsBR for this beautiful script ...
How to use...?

1- Press the "H" key while looking at the selected Ambulance or Vehicle, so it spawns a stretcher on the player's pelvis.
2 - Get close to the patient and roll the mouse scroll, will appear the moment to drop the stretcher.
3- Look at the player select the option to put on the stretcher.
4- Look at the stretcher and select the option to take stretcher.
5- Take the stretcher to the vehicle and select save stretcher.

  • Like 1
Link to comment
Share on other sites

On 7/26/2018 at 5:08 PM, GhostsBR said:

if (playerside isEqualto civilian) then { player switchmove "AinjPpneMstpSnonWnonDnon"; player setDamage 0.9; };

I recommend putting a sleep 60; player playActionNow "stop"; to cancel the animation of leaving the player on the ground for more than 60 seconds.

if (playerside isEqualto civilian) then { 
  player switchmove "AinjPpneMstpSnonWnonDnon"; 
  player setDamage 0.9; 
  sleep 60; //wait 60 segundos
  player switchmove ""; //cancel move after 60 segundos
};

 

Edited by DinhoBRJ
My bad
Link to comment
Share on other sites

5 hours ago, DinhoBRJ said:

I recommend putting a sleep 60; player playActionNow "stop"; to cancel the animation of leaving the player on the ground for more than 60 seconds.

if (playerside isEqualto civilian) then { 
  player switchmove "AinjPpneMstpSnonWnonDnon"; 
  player setDamage 0.9; 
  sleep 60; //wait 60 segundos
  player playActionNow "stop"; //cancel action
};

 

The player cancells the animation after 60 seconds with that?

Link to comment
Share on other sites

On 8/27/2018 at 2:55 AM, 3picFAIL-LostParadise said:

The Downloaddata is broken...

 

the download works

#include "..\..\script_macros.hpp"
/*
    File: fn_medico.sqf
    Author: GhostsBR

    Description: script de maca para o samu.
*/

_ambulancia = nearestObject [player, "C_Van_02_medevac_F"];
_heli = nearestObject [player, "B_Heli_Light_01_F"];

if (side player isEqualto civilian) exitWith {hint "";};
if (side player isEqualto west) exitWith {hint "";};
if (vehicle player != player) exitWith {hint "You can not use this inside a vehicle.";};

if (player distance _ambulancia < 5) then {
_obj = nearestObject [player, "Land_Stretcher_01_F"];

if (player distance _obj < 5) exitWith {hint "There is already a stretcher next to you.";};

_maca = "Land_Stretcher_01_F" createVehicle position player;

action_carregar = {
	_obj = nearestObject [player, "Land_Stretcher_01_F"];
	_obj attachTo [player, [0, 1.10, 0.60] ];
	_ambulancia = nearestObject [player, "C_Van_02_medevac_F"];
	soltar = player addAction ["Drop Stretcher", {call action_soltar;}];
	_obj removeAction pegar;
	_ambulancia removeAction veiculo;
	veiculo = _ambulancia addAction ["Put in Ambulance", {call action_colocar;}];
	player removeAction levar;
};

action_levar = {
	_obj = nearestObject [player, "Land_Stretcher_01_F"];
	_fe = nearestObjects [player, ["C_man_1"], 5];
	_ferido = _fe select 0;
	_ferido attachTo [_obj, [0, 0.20, 0.25] ];
};

action_soltar = {
	_obj = nearestObject [player, "Land_Stretcher_01_F"];
	_ambulancia = nearestObject [player, "C_Van_02_medevac_F"];
	_obj = nearestObject [player, "Land_Stretcher_01_F"];
	detach _obj;
	ativo = false;
	pegar = _obj addAction ["Take Stretcher", {call action_carregar;}];
	levar = player addAction ["Place Player", {call action_levar;}];
	_ambulancia removeAction veiculo;
	player removeAction soltar;
};

action_colocar = {
	_fe = nearestObjects [player, ["C_man_1"], 5];
	_ferido = _fe select 0;
	_obj = nearestObject [player, "Land_Stretcher_01_F"];
	_ambulancia = nearestObject [player, "C_Van_02_medevac_F"];
	_nearestVehicle = nearestObject [player, "C_Van_02_medevac_F"];
	player removeAction soltar;
	_obj removeAction pegar;
	_ambulancia removeAction veiculo;
	deleteVehicle _obj;
	[_nearestVehicle] remoteExecCall ["life_fnc_moveIn",_ferido];
};

call action_carregar;

};

if (player distance _heli < 5) then {
	if (player distance _ambulancia > 3) then {
		_obj2 = nearestObject [player, "Land_Stretcher_01_olive_F"];
		
		if (player distance _obj2 < 5) exitWith {hint "There is already a stretcher next to you.";};
		
		_maca = "Land_Stretcher_01_olive_F" createVehicle position player;
		
		action_carregar = {
			_obj = nearestObject [player, "Land_Stretcher_01_olive_F"];
			_obj attachTo [player, [0, 1.10, 0.60] ];
			_ambulancia = nearestObject [player, "B_Heli_Light_01_F"];
			soltar = player addAction ["Drop Stretcher", {call action_soltar;}];
			_obj removeAction pegar;
			_ambulancia removeAction veiculo;
			veiculo = _ambulancia addAction ["Put in Ambulance", {call action_colocar;}];
			player removeAction levar;
		};

		action_levar = {
			_obj = nearestObject [player, "Land_Stretcher_01_olive_F"];
			_fe = nearestObjects [player, ["C_man_1"], 5];
			_ferido = _fe select 0;
			_ferido attachTo [_obj, [0, 0.20, 0.25] ];
		};

		action_soltar = {
			_obj = nearestObject [player, "Land_Stretcher_01_olive_F"];
			_ambulancia = nearestObject [player, "B_Heli_Light_01_F"];
			_obj = nearestObject [player, "Land_Stretcher_01_olive_F"];
			detach _obj;
			ativo = false;
			pegar = _obj addAction ["Take Stretcher", {call action_carregar;}];
			levar = player addAction ["Place Player", {call action_levar;}];
			_ambulancia removeAction veiculo;
			player removeAction soltar;
		};

		action_colocar = {
			_fe = nearestObjects [player, ["C_man_1"], 5];
			_ferido = _fe select 0;
			_obj = nearestObject [player, "Land_Stretcher_01_olive_F"];
			_ambulancia = nearestObject [player, "B_Heli_Light_01_F"];
			_nearestVehicle = nearestObject [player, "B_Heli_Light_01_F"];
			player removeAction soltar;
			_obj removeAction pegar;
			_ambulancia removeAction veiculo;
			deleteVehicle _obj;
			[_nearestVehicle] remoteExecCall ["life_fnc_moveIn",_ferido];
		};

		call action_carregar;
	};
};

 

Edited by Deadlesszombie
Link to comment
Share on other sites

  • 1 month later...
On 8/24/2018 at 7:02 PM, DinhoBRJ said:

I recommend putting a sleep 60; player playActionNow "stop"; to cancel the animation of leaving the player on the ground for more than 60 seconds.

if (playerside isEqualto civilian) then { 
  player switchmove "AinjPpneMstpSnonWnonDnon"; 
  player setDamage 0.9; 
  sleep 60; //wait 60 segundos
  player switchmove ""; //cancel move after 60 segundos
};

 

 

4 hours ago, Hannkok said:

i stay on  the floor after the blurry vision. Is there a fix?

Please read comments before you ask a stupid question...

Edited by Deadlesszombie
Link to comment
Share on other sites

  • 1 month later...

this is what i got in my RPT???

21:02:36 Error in expression <t) then {
[] call life_fnc_medico;
};
};

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error position: <

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error Invalid number in expression
21:02:36 File core\functions\fn_keyHandler.sqf [life_fnc_keyHandler], line 156
21:02:36 Error in expression <t) then {
[] call life_fnc_medico;
};
};

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error position: <

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error Invalid number in expression
21:02:36 File core\functions\fn_keyHandler.sqf [life_fnc_keyHandler], line 156
Link to comment
Share on other sites

13 minutes ago, _2004snoop_ said:

this is what i got in my RPT???

21:02:36 Error in expression <t) then {
[] call life_fnc_medico;
};
};

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error position: <

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error Invalid number in expression
21:02:36 File core\functions\fn_keyHandler.sqf [life_fnc_keyHandler], line 156
21:02:36 Error in expression <t) then {
[] call life_fnc_medico;
};
};

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error position: <

if (!_shift && _ctrlKey && !isNi>
21:02:36   Error Invalid number in expression
21:02:36 File core\functions\fn_keyHandler.sqf [life_fnc_keyHandler], line 156

post your keyhandler

Link to comment
Share on other sites

    //Holster / recall weapon. (Shift + H)
    case 35: {
        if (_shift && !_ctrlKey && !(currentWeapon player isEqualTo "")) then {
            life_curWep_h = currentWeapon player;
            player action ["SwitchWeapon", player, player, 100];
            player switchCamera cameraView;
        };
        
        if (!_shift && !_ctrlKey) then {
            if (playerSide isEqualTo independent) then {
                [] call life_fnc_medico;
            };
        };

        if (!_shift && _ctrlKey && !isNil "life_curWep_h" && {!(life_curWep_h isEqualTo "")}) then {
            if (life_curWep_h in [primaryWeapon player,secondaryWeapon player,handgunWeapon player]) then {
                player selectWeapon life_curWep_h;
            };
        };
    };

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.