Moinsen Leude,
habe das Problem das unser Tazer nicht tazert, sondern tötet, ebenfalls die standard dateien aus dem 5.0 Framework genommen, funktioniert auch nicht, Waffen & Projectiles sind rihtig eingetragen, keine Fehler in den Logs, einige Sachen schon hier im Forum gesucht zu dem Thema und ausprobiert aber nichts hilft.. Hat jemand eine Idee??
handleDamage.sqf:
Spoiler anzeigen
C
#include "..\..\script_macros.hpp"
/*
File: fn_handleDamage.sqf
Author: Bryan "Tonic" Boardwine
Description:
Handles damage, specifically for handling the 'tazer' pistol and nothing else.
*/
params [
["_unit",objNull,[objNull]],
["_part","",[""]],
["_damage",0,[0]],
["_source",objNull,[objNull]],
["_projectile","",[""]],
["_index",0,[0]]
];
//Handle the tazer first (Top-Priority).
if (!isNull _source) then {
if (_source != _unit) then {
if (currentWeapon _source in ["hgun_P07_snds_F","arifle_SDAR_F"] && _projectile in ["B_9x21_Ball","B_556x45_dual"]) then {
if (side _source isEqualTo west && playerSide isEqualTo civilian) then {
_damage = 0;
if (alive player && !life_istazed && !life_isknocked && !(_unit getVariable ["restrained",false])) then {
private ["_distance"];
_distance = 35;
if (_projectile == "B_556x45_dual") then {_distance = 100;};
if (_unit distance _source < _distance) then {
if !(isNull objectParent player) then {
if (typeOf (vehicle player) == "B_Quadbike_01_F") 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;
};
};
};
};
[] spawn life_fnc_hudUpdate;
false;
if(vehicle _source isKindOf "LandVehicle") then {
if(_source != _unit AND {alive _unit} AND {isPlayer _source}) then {
_damage = 0.001;
};
};
Alles anzeigen
fn_tazed
Spoiler anzeigen
C
#include "..\..\script_macros.hpp"
/*
File: fn_tazed.sqf
Author: Bryan "Tonic" Boardwine
Description:
Starts the tazed animation and broadcasts out what it needs to.
*/
private ["_curWep","_curMags","_attach"];
params [
["_unit",objNull,[objNull]],
["_shooter",objNull,[objNull]]
];
if (isNull _unit || isNull _shooter) exitWith {player allowDamage true; life_istazed = false;};
if (_shooter isKindOf "Man" && alive player) then {
if (!life_istazed) then {
life_istazed = true;
_curWep = currentWeapon player;
_curMags = magazines player;
_attach = if (!(primaryWeapon player isEqualTo "")) then {primaryWeaponItems player} else {[]};
{player removeMagazine _x} forEach _curMags;
player removeWeapon _curWep;
player addWeapon _curWep;
if (!(count _attach isEqualTo 0) && !(primaryWeapon player isEqualTo "")) then {
{
_unit addPrimaryWeaponItem _x;
} forEach _attach;
};
if (!(count _curMags isEqualTo 0)) then {
{player addMagazine _x;} forEach _curMags;
};
[_unit] remoteExecCall ["life_fnc_tazeSound",RCLIENT];
_obj = "Land_ClutterCutter_small_F" createVehicle ASLTOATL(visiblePositionASL player);
_obj setPosATL ASLTOATL(visiblePositionASL player);
[player,"AinjPfalMstpSnonWnonDf_carried_fallwc"] remoteExecCall ["life_fnc_animSync",RCLIENT];
[0,"STR_NOTF_Tazed",true,[profileName, _shooter getVariable ["realname",name _shooter]]] remoteExecCall ["life_fnc_broadcast",RCLIENT];
_unit attachTo [_obj,[0,0,0]];
disableUserInput true;
sleep 15;
[player,"AmovPpneMstpSrasWrflDnon"] remoteExecCall ["life_fnc_animSync",RCLIENT];
if (!(player getVariable ["Escorting",false])) then {
detach player;
};
life_istazed = false;
player allowDamage true;
disableUserInput false;
};
} else {
_unit allowDamage true;
life_istazed = false;
};
Alles anzeigen
Client und Server RPT im Anhang.
Wäre schön wenn mir jemand helfen könnte
Danke im Vorraus.