Hallo zusammen,
ich komme einfach nicht dahinter warum mein tazer nicht geht.
die nach meiner Meinung nach relevanten Dateien sind nicht verändert. habe auch sicherheitshalber das ganze nochmal mit dem orginal verglichen.
das komische dran ist, dass beim civ garnichts passiert weder damage noch tazer. was meiner meinung nach dafür spricht das ja das script fn_handleDamage angesprochen wird.
auch in den Logs ist jetzt nichts zu erkennen.
1 Shopeintrag
Code
class cop_basic {
name = "Altis Cop Shop";
side = "cop";
conditions = "";
items[] = {
//RANG 01 Polizeimeisteranwaerter
{ "ItemRadio", "NFC_Reciver", 10, -1, "call life_coplevel >= 1" },
{ "Binocular", "", 10, -1, "call life_coplevel >= 1" },
{ "ItemGPS", "", 10, 0, "call life_coplevel >= 1" },
{ "FirstAidKit", "", 10, 0, "call life_coplevel >= 1" },
{ "NVGoggles", "", 10, 0, "call life_coplevel >= 1" },
{ "hgun_P07_snds_F", "Stun Pistol", 10, 0, "call life_coplevel >= 1" }, //tazer
{ "arifle_sdar_F", "Taser Rifle", 10, 0, "call life_coplevel >= 1" },
//RANG 02 Polizeimeister
{ "hgun_PDW2000_F", "PDW", 10, 0, "call life_coplevel >= 2" },
{ "SMG_02_F", "Sting 9mm", 10, 0, "call life_coplevel >= 2" },
//RANG 03 Polizeiobermeister
{ "arifle_MXC_Black_F", "MXC", 100, 0, "call life_coplevel >= 3" },
{ "arifle_TRG21_F", "TRG21", 100, 0, "call life_coplevel >= 3" },
//RANG 04 Polizeihauptmeister
{ "arifle_Katiba_F", "Katiba", 100, 0, "call life_coplevel >= 4" },
{ "srifle_EBR_F", "MK 18", 100, 0, "call life_coplevel >= 4" },
//RANG 05 Polizeikommissaranwaerter
{ "arifle_MX_Black_F", "MX", 100, 0, "call life_coplevel >= 5" },
{ "arifle_MXM_Black_F", "MXM", 100, 0, "call life_coplevel >= 5" },
//RANG 06 Polizeikommissar
{ "HandGrenade_Stone", "Flashbang", 100, -1, "call life_coplevel >= 6" },
{ "arifle_MX_SW_Black_F", "MXSW", 100, 0, "call life_coplevel >= 6" },
//RANG 07 Polizeihauptkommissar
{ "Item_B_UavTerminal", "UAV Terminal", 10, -1, "call life_coplevel >= 7" },
{ "arifle_SPAR_02_blk_F", "SPAR 16S", 100, 0, "call life_coplevel >= 7" },
{ "srifle_DMR_03_F", "MK 1", 100, 0, "call life_coplevel >= 7" },
{ "LMG_03_F", "LIM", 100, 0, "call life_coplevel >= 7" },
//RANG 08 Polizeirat
{ "LMG_Mk200_F", "MK200", 100, 0, "call life_coplevel >= 8" },
{ "arifle_SPAR_03_blk_F", "SPAR 17", 100, 0, "call life_coplevel >= 8" },
//RANG 09 Polizeioberrat
//RANG 10 Polizeidirektor
{ "srifle_DMR_05_blk_F", "Cyrus 9.3", 100, 0, "call life_coplevel >= 10" }
//RANG 11 Polizeipräsident
};
mags[] = {
//RANG 01 Polizeimeisteranwaerter
{ "16Rnd_9x21_Mag", "Tazer Munition 9mm", 125, 60, "call life_coplevel >= 1" }, /tazer muni
{ "20Rnd_556x45_UW_mag", "Tazer Munition 5.56", 125, 60, "call life_coplevel >= 1" },
//{ "16Rnd_9x21_Mag", "", 125, 60, "call life_coplevel >= 1" },
//{ "20Rnd_556x45_UW_mag", $STR_W_mags_TaserRifle, 125, 60, "call life_coplevel >= 1" }, //&SDAR
//RANG 02 Polizeimeister
{ "30Rnd_9x21_Mag", "PDW Munition", 130, 65, "call life_coplevel >= 2" },
{ "30Rnd_9x21_Mag_SMG_02", "Sting Munition", 130, 65, "call life_coplevel >= 2" },
//RANG 03 Polizeiobermeister
{ "30Rnd_65x39_caseless_mag", "MXC Munition", 130, 65, "call life_coplevel >= 3" },
{ "30Rnd_556x45_Stanag", "TRG Munition", 250, 125, "call life_coplevel >= 3" },
//RANG 04 Polizeihauptmeister
{ "30Rnd_65x39_caseless_green", "Katiba Munition", 200, 100, "call life_coplevel >= 4" },
{ "20Rnd_762x51_Mag", "MK18 Munition", 200, 100, "call life_coplevel >= 4" },
//RANG 05 Polizeikommissaranwaerter
{ "30Rnd_65x39_caseless_Mag", "MX Munition", 200, 100, "call life_coplevel >= 5" },
{ "30Rnd_65x39_caseless_Mag", "MXM Munition", 200, 100, "call life_coplevel >= 5" },
//RANG 06 Polizeikommissar
{ "100Rnd_65x39_caseless_Mag", "MXSW Munition", 200, 100, "call life_coplevel >= 6" },
//RANG 07 Polizeihauptkommissar
{ "150Rnd_556x45_Drum_Mag_F", "SPAR 16S Munition", 200, 100, "call life_coplevel >= 7" },
{ "20Rnd_762x51_Mag", "MK1 Munition", 200, 100, "call life_coplevel >= 7" },
{ "200Rnd_556x45_Box_F", "LIM Munition", 200, 100, "call life_coplevel >= 7" },
//RANG 08 Polizeirat
{ "200Rnd_65x39_cased_Box", "MK200 Munition", 200, 100, "call life_coplevel >= 8" },
{ "20Rnd_762x51_Mag", "SPAR17 Munition", 200, 100, "call life_coplevel >= 8" },
//RANG 09 Polizeioberrat
//RANG 10 Polizeidirektor
{ "10Rnd_93x64_DMR_05_Mag", "Cyrus Munition", 200, 100, "call life_coplevel >= 10" }
//RANG 11 Polizeipräsident
};
Alles anzeigen
2. fn_handleDamage
Code
#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]]
];
if (!isNull _source && {_source != _unit}) then {
if (side _source isEqualTo west) then {
if (currentWeapon _source in ["hgun_P07_snds_F","arifle_SDAR_F"] && _projectile in ["B_9x21_Ball","B_556x45_dual"]) then {
if (alive _unit) then {
if (playerSide isEqualTo civilian && {!life_is_tazed}) then {
private _distance = 35;
if (_projectile isEqualTo "B_556x45_dual") then {_distance = 100};
if (_unit distance _source < _distance) then {
if !(isNull objectParent _unit) then {
if (typeOf (vehicle _unit) isEqualTo "B_Quadbike_01_F") then {
_unit action ["Eject",vehicle _unit];
hint "absprung fn_tazerd";
[_unit,_source] spawn life_fnc_tazed;
};
} else {
[_unit,_source] spawn life_fnc_tazed;
};
};
};
_damage = if (_part isEqualTo "") then {
damage _unit;
} else {
_unit getHit _part;
};
};
};
};
};
[] spawn life_fnc_hudUpdate;
_damage;
Alles anzeigen
3. fn_tazed
Code
#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,"tazerSound",100,1] remoteExecCall ["life_fnc_say3D",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