Greez Leute bei mir geht leider der tazer nicht eventuell fält euch ja was ein wie ich es zum laufen bringe im anhang meine datein
fn_tazed
Code: fn_tazed.sqf
#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 OR 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(!(EQUAL(RIFLE,""))) then {RIFLE_ITEMS} else {[]};
{player removeMagazine _x} foreach _curMags;
player removeWeapon _curWep;
player addWeapon _curWep;
if(!(EQUAL(count _attach,0)) && !(EQUAL(RIFLE,""))) then {
{
_unit addPrimaryWeaponItem _x;
} foreach _attach;
};
if(!(EQUAL(count _curMags,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 GVAR ["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 GVAR ["Escorting",false])) then {
detach player;
};
life_istazed = false;
player allowDamage true;
disableUserInput false;
};
} else {
_unit allowDamage true;
life_iztazed = false;
};
Alles anzeigen
fn_handleDamage
Code
#include "..\..\script_macros.hpp"
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);
if (match_start)exitWith{_damage;};
//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","26_cartridge"] && _curWep in ["hgun_P07_snds_F","arifle_SDAR_F","Taser_26"]) 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(!ruhr_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;
};
}else
{
if(isNull objectParent player)then
{
if('legs' == _part)then{[true] spawn life_fnc_tazed;};
};
};
};
};
_damage;
Alles anzeigen
villeicht bekommt es ja jemand hin oder hat es schon für die 4.4 zum laufen gebracht
dazu kommt ich würde gerne das hier als waffe nutzen
WAFFE: Taser_26
AMMO: 26_cartridge
villeicht hat ja auchnoch jemand ein script für rubber bullets das suche ich auch
ich danke schon mal für jede hilfe im vorraus
greez
jagga