Jump to content
  • 0

HOW TO ADD CUFF SOUND FOR THE PLAYER WHO IS BEEN RETRAINED?


Question

#include "..\..\script_macros.hpp"
/*
    File: fn_restrainAction.sqf
    Author: Bryan "Tonic" Boardwine

    Description:
    Retrains the target.
*/
private["_unit"];
_unit = cursorObject;
if(isNull _unit) exitWith {}; //Not valid

if((player distance _unit > 3)) exitWith {};

if((_unit getVariable "restrained")) exitWith {};

if(player isEqualTo _unit) exitWith {};

if(playerSide in [west,independent]) then {
	hintSilent "Você algemou ele com sucesso";
	};
if (side player isEqualTo civilian) then {
	if(life_inv_zipties < 1) exitWith { hintSilent "Você está sem zipties"; };
	life_inv_zipties = life_inv_zipties - 1;
	hintSilent "Você algemou ele com sucesso";
};

if (!isPlayer _unit) exitWith {}; player say3D "cuff";
//Broadcast!

player playMove "AinvPercMstpSnonWnonDnon_Putdown_AmovPercMstpSnonWnonDnon";

_unit setVariable["restrained",true,true];
[player] remoteExec ["life_fnc_restrain",_unit];
[0,"STR_NOTF_Restrained",true,[_unit getVariable["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",west];
[0,"STR_NOTF_Restrained",true,[_unit getVariable["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",independent];
[0,"STR_NOTF_Restrained",true,[_unit getVariable["realname", name _unit], profileName]] remoteExecCall ["life_fnc_broadcast",civilian];

With this code only the player who is retraining can listen to the cuff sound. 

Does anyone know who to solve this?

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

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

Guest
Answer this question...

×   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.

×
×
  • Create New...

Important Information

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