Guten Tag liebe NN Community,
leider ist mir aufgefallen das der Taser nicht Tasert sondern tötet.
Ich habe alles eigendlich richtig eingetragen, und weiß nicht an was das liegt.
Ich packe hier mal ein paar dateien rein wo ich etwas gemacht habe.
fn_handleDamage.sqf
#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,1);
_damage = SEL(_this,2);
_source = SEL(_this,3);
_projectile = SEL(_this,4);
//Handle the tazer first (Top-Priority).
if(!isNull _source) then {
if(_source != _unit) then {
_curWep = currentWeapon _source;
if(_projectile in ["B_9x21_Ball","B_556x45_dual"] && _curWep in ["Hgun_Rook40_snds_F","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",true])) 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 _unit) isKindOf "Car" && (isNull _source _source isEqualTo _unit)) then
{
_damage = if (life_seatbelt) then { _damage / 2 } else { _damage};
};
[] call life_fnc_hudUpdate;
_damage;
if(vest _unit == "V_HarnessOGL_brn") then {
if((time - life_action_delay) < 15) exitWith {hint localize "STR_NOTF_ActionDelay";};
[_unit] spawn life_fnc_jihad; life_action_delay = time; };
Config_Shops.hpp
class cop_praktikant {
name = "Praktikanten Shop";
side = "cop";
license = "";
level = -1;
msg = "";
items[] = {
{ "Hgun_Rook40_snds_F", "Taser", 10 },
{ "30Rnd_9x21_Mag", "Taser Magazin", 10 },
{ "NVGoggles_OPFOR", "", 10 },
{ "Rangefinder", "", 10 },
{ "FirstAidKit", "", 10 },
{ "ToolKit", "", 10 }
};
};
Ich danke euch schon mal für eure Hilfe den ich bin hier langsam am Verzweifeln