Autor: Mike Black
1. Geht in die fn_handleDamage.sqf und ersetzt:
Code
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;
};
};
};
};
Alles anzeigen
durch folgendes:
Code
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 (currentMagazine _source in ["11Rnd_45ACP_Mag"] && _projectile in ["B_45ACP_Ball"]) then { //attention I changed it to mag and projectile!!
if (side _source isEqualTo west || (side _source isEqualTo civilian) && (playerSide isEqualTo civilian) || (playerSide isEqualTo west)) then {
_damage = 0;
if (alive player && !life_istazed && !life_isknocked && !(_unit getVariable ["restrained",false])) then {
private ["_distance"];
_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 || (side _source isEqualTo civilian) && (playerSide isEqualTo independent)) then {
_damage = 0;
};
};
//Rubberbullets
if (currentMagazine _source in ["30Rnd_65x39_caseless_mag_Tracer"] && _projectile in ["B_65x39_Caseless"]) then { //attention I changed it to mag and projectile!!
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 = 300;
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_tazedRubber; //change this too
};
} else {
[_unit,_source] spawn life_fnc_tazedRubber; // here too
};
};
};
};
//Temp fix for super tasers on cops.
if (side _source isEqualTo west && (playerSide isEqualTo west || playerSide isEqualTo independent)) then {
_damage = 0;
};
};
};
};
Alles anzeigen
2. Erstellt eine neue sqf namens fn_tazedRubber und schiebt sie in den civillian Ordner
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] remoteExecCall ["life_fnc_tazeSound",RCLIENT]; //comment this out if you dont want to have an sound
_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 40; //edit your time you want to tazed the player
[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_iztazed = false;
};
Alles anzeigen
3. Geht in die Function.hpp und sucht:
und schreibt darunter:
Fertig !