Guten Tag,
Ich hab mit schon viele Tutorials raus gesucht die hier vorhanden sind für denn Taser Mod von Double Doppler!
Habe das Problem das der Taser nicht Tasert hab auch schon Viel Ausprobiert. Kann mir da wer behilflich sein?
Code
#include <macro.h>
/*
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 = SEL(_this,0);
_part = SEL(_this,0);
_damage = SEL(_this,0);
_source = SEL(_this,0);
_projectile = SEL(_this,0);
//Handle the tazer first (Top-Priority).
if(!isNull _source) then {
if(_source != _unit) then {
_curWep = currentWeapon _source;
if(_projectile in ["DDOPP_B_Taser"] && _curWep in ["DDOPP_X26"]) then {
if(side _source == west && playerSide != west) then {
private["_distance","_isVehicle","_isQuad"];
_distance = if(_projectile == "DDOPP_B_Taser") 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;
};
};
};
};
if(vehicle _source isKindOf "LandVehicle") then {
if(_source != _unit AND {alive _unit} AND {isPlayer _source}) then {
_damage = 0.001;
};
};
[] call life_fnc_hudUpdate;
_damage;
Alles anzeigen