Repentz 175 Report post Posted November 12, 2016 This script changes how tazing players works, instead of applying a tazing animation, it will use a ragdoll animation to simulate losing control of your body. Now this ragdoll will only last 5 seconds, so i have added the effect of applying full fatigue, and damaging the player to 60% health, to force limping. Step one: open up fn_tazed, replace all with this: #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"; player setFatigue 1; //no running for you player setdamage 0.6; //especially no running for you }; } else { _unit allowDamage true; life_iztazed = false; }; Next, create a new file called fn_tazeRagdoll.sqf, place it in core -> session Put the following into it: if (!isNull objectParent player) exitWith {}; private "_tazered"; _tazered = "Land_Can_V3_F" createVehicleLocal [0,0,0]; _tazered setMass 1e10; _tazered attachTo [player, [0,0,0], "Spine3"]; _tazered setVelocity [0,0,6]; detach _tazered; 0 = _tazered spawn { deleteVehicle _this; }; Call this function in functions.h under file = "Core\session"; place: class tazeRagdoll {}; Tell me how it works. 1 Quote Share this post Link to post Share on other sites
Tarkhgar 0 Report post Posted November 12, 2016 I got error with fn_tazeRagdoll.sqf you need to change to fn_forceRagdoll.sqf Quote Share this post Link to post Share on other sites
Repentz 175 Report post Posted November 12, 2016 1 minute ago, Tarkhgar said: I got error with fn_tazeRagdoll.sqf you need to change to fn_forceRagdoll.sqf Thanks. Quote Share this post Link to post Share on other sites
zac 0 Report post Posted November 12, 2016 so does it work??? Quote Share this post Link to post Share on other sites
Tarkhgar 0 Report post Posted November 12, 2016 2 hours ago, zac said: so does it work??? yes it's work for me i'm in altis life 5.0 Quote Share this post Link to post Share on other sites
Rez 30 Report post Posted November 12, 2016 Thanks, works fine. But you might want to update your tutorial, as you need to change fn_ tazeRagdoll.sqf to fn_forceRagdoll.sqf and need to change it in the Functions.H Quote Share this post Link to post Share on other sites
Rez 30 Report post Posted November 12, 2016 Nvm, it doesn't do the animation it just sets their screen black and spins them Quote Share this post Link to post Share on other sites
Latouth 2 Report post Posted November 12, 2016 10 hours ago, Tarkhgar said: yes it's work for me i'm in altis life 5.0 Altis Life 5.0 isn't out yet. You just grabbed the github when 5.0 was being made, so I wouldn't consider it 5.0 Quote Share this post Link to post Share on other sites
Repentz 175 Report post Posted November 13, 2016 10 hours ago, Rez said: Nvm, it doesn't do the animation it just sets their screen black and spins them haha are you sure you followed it correctly Quote Share this post Link to post Share on other sites
Rez 30 Report post Posted November 13, 2016 yep Quote Share this post Link to post Share on other sites
Repentz 175 Report post Posted November 13, 2016 1 minute ago, Rez said: yep I'll take a look at mine tonight and let you know, here is my original tazeRagdoll though if it helps? if (!isNull objectParent player) exitWith {}; private "_rag"; _rag = "Land_Can_V3_F" createVehicleLocal [0,0,0]; _rag setMass 1e10; _rag attachTo [player, [0,0,0], "Spine3"]; _rag setVelocity [0,0,6]; detach _rag; 0 = _rag spawn { deleteVehicle _this; }; Quote Share this post Link to post Share on other sites
Rez 30 Report post Posted November 13, 2016 Hey real quick, I wanna add the tasers from A3L into my server, and when I add it to handledamage it doesn't work, and there is nothing in the logs for it Quote Share this post Link to post Share on other sites
Repentz 175 Report post Posted November 13, 2016 1 minute ago, Rez said: Hey real quick, I wanna add the tasers from A3L into my server, and when I add it to handledamage it doesn't work, and there is nothing in the logs for it Here //Handle the tazer first (Top-Priority). if(!isNull _source) then { if(_source != _unit) then { _curWep = currentWeapon _source; if(_projectile in ["26_taser","B_556x45_dual"] && _curWep in ["Taser_26","arifle_SDAR_F"]) then { if(side _source == west && playerSide != west) then { private["_distance","_isVehicle","_isQuad"]; _distance = if(_projectile == "B_556x45_dual") then {100} else {35}; _isVehicle = if(vehicle player != player) then {true} else {false}; _isQuad = if(_isVehicle) then {if(typeOf (vehicle player) == "B_Quadbike_01_F") then {true} else {false}} else {false}; _damage = false; if(_unit distance _source < _distance) then { if(!life_istazed && !(_unit GVAR ["restrained",false])) then { if(_isVehicle && _isQuad) then { player action ["Eject",vehicle player]; [_unit,_source] spawn life_fnc_tazed; } else { [_unit,_source] spawn life_fnc_tazed; }; }; }; }; //Temp fix for super tasers on cops. if(playerSide == west && side _source == west) then { _damage = false; }; }; }; }; Quote Share this post Link to post Share on other sites
Rez 30 Report post Posted November 13, 2016 Thank you <3 I'll tell you if it works Quote Share this post Link to post Share on other sites
Rez 30 Report post Posted November 13, 2016 2 hours ago, Repentz said: Here //Handle the tazer first (Top-Priority). if(!isNull _source) then { if(_source != _unit) then { _curWep = currentWeapon _source; if(_projectile in ["26_taser","B_556x45_dual"] && _curWep in ["Taser_26","arifle_SDAR_F"]) then { if(side _source == west && playerSide != west) then { private["_distance","_isVehicle","_isQuad"]; _distance = if(_projectile == "B_556x45_dual") then {100} else {35}; _isVehicle = if(vehicle player != player) then {true} else {false}; _isQuad = if(_isVehicle) then {if(typeOf (vehicle player) == "B_Quadbike_01_F") then {true} else {false}} else {false}; _damage = false; if(_unit distance _source < _distance) then { if(!life_istazed && !(_unit GVAR ["restrained",false])) then { if(_isVehicle && _isQuad) then { player action ["Eject",vehicle player]; [_unit,_source] spawn life_fnc_tazed; } else { [_unit,_source] spawn life_fnc_tazed; }; }; }; }; //Temp fix for super tasers on cops. if(playerSide == west && side _source == west) then { _damage = false; }; }; }; }; didnt work Quote Share this post Link to post Share on other sites
Repentz 175 Report post Posted November 13, 2016 You need the bullet classname (not magazine) and weapon classname, mine works fine Quote Share this post Link to post Share on other sites
Rez 30 Report post Posted November 13, 2016 21 minutes ago, Repentz said: You need the bullet classname (not magazine) and weapon classname, mine works fine Having issues with the script too, it'll work like once or twice then it wont work Quote Share this post Link to post Share on other sites
Josh 7 Report post Posted November 13, 2016 On 12/11/2016 at 5:25 AM, Repentz said: This script changes how tazing players works, instead of applying a tazing animation, it will use a ragdoll animation to simulate losing control of your body. Now this ragdoll will only last 5 seconds, so i have added the effect of applying full fatigue, and damaging the player to 60% health, to force limping. Step one: open up fn_tazed, replace all with this: #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"; player setFatigue 1; //no running for you player setdamage 0.6; //especially no running for you }; } else { _unit allowDamage true; life_iztazed = false; }; Next, create a new file called fn_tazeRagdoll, place it in core -> session Put the following into it: if (!isNull objectParent player) exitWith {}; private "_tazered"; _tazered = "Land_Can_V3_F" createVehicleLocal [0,0,0]; _tazered setMass 1e10; _tazered attachTo [player, [0,0,0], "Spine3"]; _tazered setVelocity [0,0,6]; detach _tazered; 0 = _tazered spawn { deleteVehicle _this; }; Call this function in functions.h under file = "System\session"; place: class tazeRagdoll {}; Tell me how it works. Hi Repentz i enjoy the work u post but i need help on something i was good unit i got to this place Call this function in functions.h under file = "System\session"; place: What do you mean by system Do you mean "Root" ?? I'm sorry if is is something obvious but i'm new at this. Quote Share this post Link to post Share on other sites
Repentz 175 Report post Posted November 13, 2016 Replace System with Core under file = "Core\session"; place: Quote Share this post Link to post Share on other sites
NatanBrody 15 Report post Posted November 14, 2016 Goddammit thew second that I make my own script for this someone else puts it up XD. Good work buddy! Quote Share this post Link to post Share on other sites
Repentz 175 Report post Posted November 14, 2016 6 hours ago, NatanBrody said: Goddammit thew second that I make my own script for this someone else puts it up XD. Good work buddy! If you have any improvements feel free to post em and i can change it up Quote Share this post Link to post Share on other sites
NatanBrody 15 Report post Posted November 15, 2016 13 hours ago, Repentz said: If you have any improvements feel free to post em and i can change it up Nah man, yours is much less buggy Quote Share this post Link to post Share on other sites
Nark0t1k 0 Report post Posted November 26, 2016 (edited) On 12/11/2016 at 6:25 AM, Repentz said: _unit allowDamage true; life_iztazed = false; iztazed ^^ ? EDIT: Look like vanilla bug ^^ Edited November 26, 2016 by Nark0t1k Quote Share this post Link to post Share on other sites
cpfox 6 Report post Posted November 27, 2016 so has the original script been edited with the fix for fn_forceRagdoll.sqf or do i need to change my sqf to that from fn_tazeRagdol.sf Thanks Quote Share this post Link to post Share on other sites
cpfox 6 Report post Posted December 16, 2016 after the first couple of shots the tazer starts killing people , how would this be fixed Quote Share this post Link to post Share on other sites