Unser DDop Taser funktioniert nur Halb wir können Zivilisten und Medics tasern aber sind sie getazerd dann können sie nicht mehr Sterben als wenn sie Godmode haben. Cops können garnicht getazert werden und nur manchmal kommt eine Animation.
Taser macht OP
-
SnillocTV -
27. Februar 2017 um 20:31 -
Geschlossen -
Erledigt
-
-
Code
Alles anzeigenfn_handleDamage.sqf /* File: fn_handleDamage.sqf Author: Bryan "Tonic" Boardwine Description: Handles damage, specifically for handling the 'tazer' pistol and nothing else. */ private["_unit","_damage","_source","_projectile","_part","_curWep"]; _unit = _this select 0; _part = _this select 1; _damage = _this select 2; _source = _this select 3; _projectile = _this select 4; /* _unit = _this select 1; _part = _this select 5; _damage = _this select 10; _source = _this select 0; _projectile = _this select 2; */ //Internal Debugging. if(!isNil "TON_Debug") then { systemChat format["PART: %1 || DAMAGE: %2 || SOURCE: %3 || PROJECTILE: %4 || FRAME: %5",_part,_damage,_source,_projectile,diag_frameno]; }; //Handle the tazer first (Top-Priority). if(!isNull _source) then { if(_source != _unit) then { _curWep = currentWeapon _source; if(_projectile in ["26_taser","DDOPP_B_Taser"] && _curWep in ["Taser_26","DDOPP_X26"]) then { if(side _source in [west, civilian] && 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 = 0; if(_unit distance _source < _distance) then { if(!life_istazed && !(_unit getVariable["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 (side _source isEqualTo west && (playerSide isEqualTo west || playerSide isEqualTo independent)) then { _damage = 0; }; }; }; }; //[] call life_fnc_hudUpdate; _damage;
fn_tazed.sqf
Code
Alles anzeigen/* 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,"nop",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 false; 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; //especially no running for you }; } else { _unit allowDamage false; life_iztazed = false; };
Code: fn_tazeRagdoll.sqfif (!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; };