Jump to content
Repentz

[Tutorial] Realistic Tazer

Recommended Posts

12 hours ago, TwisT said:

When tazing someone, the taze Sound does not play. How would I get it to work again?

clean your eyes my friend

//[_unit] remoteExecCall ["life_fnc_tazeSound",RCLIENT];

🤔

Share this post


Link to post
Share on other sites
9 hours ago, Deadlesszombie said:

clean your eyes my friend

//[_unit] remoteExecCall ["life_fnc_tazeSound",RCLIENT];

🤔

🤔hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

Share this post


Link to post
Share on other sites

To fix the taser doing damage

replace your fn_tazed.sqf 

with mine

#include "..\..\script_macros.hpp"
/*
    File: fn_tazed.sqf
    Author: Bryan "Tonic" Boardwine
    Editor: Repentz to improve the function

    Description:
    Starts the tazed animation and broadcasts out what it needs to.
*/
private["_unit","_shooter","_curWep","_curMags","_attach"];
_unit = param [0,Objnull,[Objnull]];
_shooter = param [1,Objnull,[Objnull]];
if(isNull _unit OR isNull _shooter) exitWith {player allowDamage true; life_istazed = false;};
if(player getVariable["restrained",false]) exitWith {};
_time = time;
if(_shooter isKindOf "Man" && alive player) then {
    if(!life_istazed) then {
        life_istazed = true;
        "DynamicBlur" ppEffectEnable true;
        "DynamicBlur" ppEffectAdjust [20];
        "DynamicBlur" ppEffectCommit 1;
        player allowDamage false;
        if(isNull objectParent player) then {
            for [{_x=1},{_x<=10},{_x=_x+1}] do { call SOCK_fnc_tazeRagdoll; sleep 0.1; if(animationState player == "unconscious") exitWith{}};
        };
        //[_unit] remoteExecCall ["life_fnc_tazeSound",RCLIENT];
        [0,"STR_NOTF_Tazed",true,[profileName, _shooter getVariable["realname",name _shooter]]] remoteExecCall ["life_client_fnc_broadcast",-2];
        disableUserInput true;
        player setDamage 0;
        waitUntil{animationState player != "unconscious"};
        _anim = if(isNull objectParent player) then {"Incapacitated"} else {"kia_driver_mid01"};
        [player,_anim] remoteExec ["life_client_fnc_animSync",0];
        waitUntil{time - _time >= 15};
        player allowDamage true;
        if(!(player getVariable["Escorting",false])) then {
            detach player;
        };
        "DynamicBlur" ppEffectEnable false;
        life_istazed = false;
        disableUserInput false;
        player playMoveNow "amovppnemstpsraswrfldnon";
    };
} else {
    _unit allowDamage true;
    life_iztazed = false;
};

 

Share this post


Link to post
Share on other sites
On 8/2/2019 at 4:22 PM, grimLad said:

To fix the taser doing damage

replace your fn_tazed.sqf 

with mine

Or use the default one from 5.0 that uses hitparts and doesn't have this issue. Then add whatever effects you want. Basically redo this for recent versions.

Share this post


Link to post
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.


×
×
  • Create New...

Important Information

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