Guten Tag NN-Community,
da durch den DDOPP Taser sehr viele Threads geöffnet wurden wie er funktioniert, dachte ich mir mache ich ein kleines Tutorial um dem ganzen ein Schlussstrich zusetzen. Da es mein erstes Tutorial ist, hoffe ich trotzdem das ich es so erklären kann, dass es jeder versteht. Bei Fragen einfach melden. Ich habe es nur in der 5.0 getestet. Hier könnt ihr ihn noch downloaden.
Am Anfang öffnen wir die Config des Mods und ändern in Zeile 21 den Hit auf 0.00.
Spoiler anzeigen
// config.bin - 14:50:35 12/06/14, generated in 0.00 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled
class CfgPatches {
class DDOPP_taserPack {
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"A3_Weapons_F"};
};
};
class Mode_SemiAuto; // External class reference
class Mode_FullAuto; // External class reference
class GrenadeLauncher; // External class reference
class CfgAmmo {
class BulletBase; // External class reference
class DDOPP_B_Taser : BulletBase {
hit = 0.00;
caliber = 0.3;
class HitEffects {
Hit_Blood = "ImpactBlood";
};
};
};
class CfgMagazines {
class CA_Magazine; // External class reference
class DDOPP_Nothing : CA_Magazine {
scope = 1;
value = 0;
displayName = "";
model = "\A3\weapons_F\Pistols\P07\p07_F.p3d";
picture = "";
modelSpecial = "";
useAction = 0;
useActionTitle = "";
ammo = "";
count = 0;
initSpeed = 900;
selectionFireAnim = "zasleh";
nameSound = "magazine";
};
class DDOPP_1Rnd_X26 : CA_Magazine {
scope = 2;
model = "DDOPP_taserPack\taser_x26\DDOPP_x26_mag";
picture = "\DDOPP_taserPack\taser_x26\m_x26.paa";
type = 16;
ammo = "DDOPP_B_Taser";
selectionFireAnim = "zasleh";
count = 6;
displayName = "X26 Cartridge";
descriptionShort = "Contient 6 recharges";
};
class DDOPP_3Rnd_X3 : DDOPP_1Rnd_X26 {
model = "DDOPP_taserPack\taser_x3\DDOPP_x3_mag";
picture = "\DDOPP_taserPack\taser_x3\m_x3.paa";
ammo = "DDOPP_B_Taser";
count = 3;
displayName = "X3 Cartridges";
descriptionShort = "X3 Set of 3 Taser Stun Cartridges. Holds 3 rounds. Use in the X3 Taser.";
};
};
class CfgWeapons {
class Pistol; // External class reference
class GrenadeLauncher;
/*class Drive_Stun : GrenadeLauncher {
cursor = "";
cursorAim = "";
displayName = "Drive-Stun Mode";
selectionFireAnim = "crackle";
reloadTime = 3;
sound[] = {"\DDOPP_taserPack\Taser_Hit.wav", 0.001, 1, 400};
magazines[] = {"DDOPP_Nothing"};
recoil = "recoil_empty";
optics = 0;
muzzlePos = "usti hlavne";
muzzleEnd = "konec hlavne";
UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
};*/
class DDOPP_X26 : Pistol {
scope = 2;
modelOptics = "-";
model = "DDOPP_taserPack\taser_x26\DDOPP_x26";
displayName = "X26 Taser";
picture = "\DDOPP_taserPack\taser_x26\w_x26.paa";
UiPicture = "\DDOPP_taserPack\taser_x26\w_x26.paa";
reloadAction = "GestureReloadPistolHeavy02";
sounds[] = {"StandardSound"};
class BaseSoundModeType {
weaponSoundEffect = "DefaultRifle";
};
class StandardSound : BaseSoundModeType {
begin1[] = {"\DDOPP_taserPack\Taser_Shot.wav", 0.4, 1, 1400};
soundBegin[] = {"begin1", 0.4};
};
bullet1[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15};
bullet2[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15};
bullet3[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15};
bullet4[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_04", 0.501187, 1, 15};
bullet5[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_01", 0.398107, 1, 15};
bullet6[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_02", 0.398107, 1, 15};
bullet7[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_03", 0.398107, 1, 15};
bullet8[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_04", 0.398107, 1, 15};
bullet9[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_01", 0.223872, 1, 15};
bullet10[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_02", 0.223872, 1, 15};
bullet11[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_03", 0.223872, 1, 15};
bullet12[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_04", 0.223872, 1, 15};
class Library {
libTextDesc = "Permet de paralyser temporairement un humain.";
};
descriptionShort = "Permet de paralyser temporairement un humain.";
discreteDistance[] = {25};
discreteDistanceInitIndex = 0;
dispersion = 0.00093;
recoil = "recoil_single_pistol_2outof3";
recoilProne = "recoil_single_pistol_prone_2outof3";
minRange = 0;
minRangeProbab = 1;
midRange = 125;
midRangeProbab = 1;
maxRange = 25;
maxRangeProbab = 1;
aiRateOfFire = 0.3;
aiRateOfFireDistance = 200;
ffCount = 1;
reloadTime = 0.1;
autoReload = 0;
magazineReloadTime = 5;
magazines[] = {"DDOPP_1Rnd_X26"};
//class Drive_Stun_Mode : Drive_Stun {};
//muzzles[] = {this, "Drive_Stun_Mode"};
optics = 1;
//cursor = "mg";
cursoraim = "mg";
cursorSize = 1;
class FlashLight {
ambient[] = {0.1, 0.1, 0.1, 1};
angle = 30;
brightness = 0.1;
color[] = {0.9, 0.9, 0.7, 0.9};
direction = "flash_pos";
position = "flash_dir";
scale[] = {1, 1, 0.5};
};
drySound[] = {"A3\sounds_f\weapons\other\dry1", 0.398107, 1, 20};
reloadMagazineSound[] = {"A3\sounds_f\weapons\pistols\p07_reload", 0.562341, 1, 30};
class EventHandlers {
Init = "[] execVM ""\DDOPP_taserPack\scripts\Init_Taser.sqf""";
};
};
class DDOPP_X26_b : DDOPP_X26 {
model = "DDOPP_taserPack\taser_x26\DDOPP_x26_b";
displayName = "X26 Taser";
picture = "\DDOPP_taserPack\taser_x26\w_x26_b.paa";
UiPicture = "\DDOPP_taserPack\taser_x26\w_x26_b.paa";
};
class DDOPP_X3 : DDOPP_X26 {
model = "DDOPP_taserPack\taser_x3\DDOPP_x3";
displayName = "X3 Taser (Yellow)";
picture = "\DDOPP_taserPack\taser_x3\w_x3.paa";
UiPicture = "\DDOPP_taserPack\taser_x3\w_x3.paa";
class Library {
libTextDesc = "X3 Taser. Can keep human targets stunned up to 20 seconds. Can carry up to 3 cartridges.";
};
descriptionShort = "X3 Taser. Can keep human targets stunned up to 20 seconds. Can carry up to 3 cartridges.";
reloadTime = 0.1;
autoReload = 0;
magazineReloadTime = 5;
magazines[] = {"DDOPP_3Rnd_X3"};
class FlashLight {
ambient[] = {0.1, 0.1, 0.1, 1};
angle = 30;
brightness = 0.1;
color[] = {0.9, 0.9, 0.7, 0.9};
direction = "flash_pos";
position = "flash_dir";
scale[] = {1, 1, 0.5};
};
};
class DDOPP_X3_b : DDOPP_X3 {
model = "DDOPP_taserPack\taser_x3\DDOPP_x3_b";
displayName = "X3 Taser (Black)";
picture = "\DDOPP_taserPack\taser_x3\w_x3_b.paa";
UiPicture = "\DDOPP_taserPack\taser_x3\w_x3_b.paa";
};
};
class CfgVehicleClasses {
class DDOPP_TaserLogic {
displayName = "D.Doppler: Taser Mod";
};
};
class CfgVehicles {
class Logic; // External class reference
class All; // External class reference
class Strategic; // External class reference
class Land; // External class reference
class DDOPP_TaserInit : Logic {
vehicleClass = "DDOPP_TaserLogic";
displayName = "Initialize Taser Scripts";
model = "\ca\weapons\empty";
Icon = "\DDOPP_taserPack\data\icon_init.paa";
class EventHandlers {
init = "[] execVM""\DDOPP_taserPack\scripts\init_taser.sqf"";";
};
};
};
class CfgSounds {
class taser_hit {
sound[] = {"\DDOPP_taserPack\Taser_Hit.wav", 0.1, 1};
name = "taser_hit";
titles[] = {};
};
class taser_spark {
sound[] = {"\DDOPP_taserPack\Taser_Spark.wav", 0.1, 1};
name = "taser_spark";
titles[] = {};
};
};
class RscText; // External class reference
class RscEdit; // External class reference
class RscShortcutButton; // External class reference
class RscControlsGroup; // External class reference
class RscListBox; // External class reference
class RscTitles {
class RscPicture {
type = 0;
idc = -1;
style = 48;
colorBackground[] = {1, 1, 1, 1};
colorText[] = {1, 1, 1, 1};
font = "";
sizeEx = 0.02;
text = "";
};
class taser_hit_fx {
name = "taser_hit_fx";
duration = 5;
idd = -1;
movingEnable = 0;
controls[] = {"taser_hit_fx"};
class taser_hit_fx : RscPicture {
text = "DDOPP_taserPack\data\taser_hit_fx.paa";
x = "-0.000481755 * safezoneW + safezoneX";
y = "6.49715e-006 * safezoneH + safezoneY";
w = "1.0003 * safezoneW";
h = "1.00067 * safezoneH";
};
};
};
Beim zweiten Schritt wird in der Config vom DDOPP Taser auf Zeile 25 das Blut bei einem Treffer entfernt(kann man auch beliebig da lassen). Dazu muss einfach nur das ImpactBlood zwischen den Anführungszeichen entfent werden.
Spoiler anzeigen
// config.bin - 14:50:35 12/06/14, generated in 0.00 seconds
// Generated by unRap v1.06 by Kegetys
// Separate rootclasses: Disabled, Automatic comments: Enabled
class CfgPatches {
class DDOPP_taserPack {
units[] = {};
weapons[] = {};
requiredVersion = 0.1;
requiredAddons[] = {"A3_Weapons_F"};
};
};
class Mode_SemiAuto; // External class reference
class Mode_FullAuto; // External class reference
class GrenadeLauncher; // External class reference
class CfgAmmo {
class BulletBase; // External class reference
class DDOPP_B_Taser : BulletBase {
hit = 0.55;
caliber = 0.3;
class HitEffects {
Hit_Blood = "";
};
};
};
class CfgMagazines {
class CA_Magazine; // External class reference
class DDOPP_Nothing : CA_Magazine {
scope = 1;
value = 0;
displayName = "";
model = "\A3\weapons_F\Pistols\P07\p07_F.p3d";
picture = "";
modelSpecial = "";
useAction = 0;
useActionTitle = "";
ammo = "";
count = 0;
initSpeed = 900;
selectionFireAnim = "zasleh";
nameSound = "magazine";
};
class DDOPP_1Rnd_X26 : CA_Magazine {
scope = 2;
model = "DDOPP_taserPack\taser_x26\DDOPP_x26_mag";
picture = "\DDOPP_taserPack\taser_x26\m_x26.paa";
type = 16;
ammo = "DDOPP_B_Taser";
selectionFireAnim = "zasleh";
count = 6;
displayName = "X26 Cartridge";
descriptionShort = "Contient 6 recharges";
};
class DDOPP_3Rnd_X3 : DDOPP_1Rnd_X26 {
model = "DDOPP_taserPack\taser_x3\DDOPP_x3_mag";
picture = "\DDOPP_taserPack\taser_x3\m_x3.paa";
ammo = "DDOPP_B_Taser";
count = 3;
displayName = "X3 Cartridges";
descriptionShort = "X3 Set of 3 Taser Stun Cartridges. Holds 3 rounds. Use in the X3 Taser.";
};
};
class CfgWeapons {
class Pistol; // External class reference
class GrenadeLauncher;
/*class Drive_Stun : GrenadeLauncher {
cursor = "";
cursorAim = "";
displayName = "Drive-Stun Mode";
selectionFireAnim = "crackle";
reloadTime = 3;
sound[] = {"\DDOPP_taserPack\Taser_Hit.wav", 0.001, 1, 400};
magazines[] = {"DDOPP_Nothing"};
recoil = "recoil_empty";
optics = 0;
muzzlePos = "usti hlavne";
muzzleEnd = "konec hlavne";
UiPicture = "\CA\weapons\data\Ico\i_regular_CA.paa";
};*/
class DDOPP_X26 : Pistol {
scope = 2;
modelOptics = "-";
model = "DDOPP_taserPack\taser_x26\DDOPP_x26";
displayName = "X26 Taser";
picture = "\DDOPP_taserPack\taser_x26\w_x26.paa";
UiPicture = "\DDOPP_taserPack\taser_x26\w_x26.paa";
reloadAction = "GestureReloadPistolHeavy02";
sounds[] = {"StandardSound"};
class BaseSoundModeType {
weaponSoundEffect = "DefaultRifle";
};
class StandardSound : BaseSoundModeType {
begin1[] = {"\DDOPP_taserPack\Taser_Shot.wav", 0.4, 1, 1400};
soundBegin[] = {"begin1", 0.4};
};
bullet1[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_01", 0.501187, 1, 15};
bullet2[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_02", 0.501187, 1, 15};
bullet3[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_03", 0.501187, 1, 15};
bullet4[] = {"A3\sounds_f\weapons\shells\9mm\metal_9mm_04", 0.501187, 1, 15};
bullet5[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_01", 0.398107, 1, 15};
bullet6[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_02", 0.398107, 1, 15};
bullet7[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_03", 0.398107, 1, 15};
bullet8[] = {"A3\sounds_f\weapons\shells\9mm\dirt_9mm_04", 0.398107, 1, 15};
bullet9[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_01", 0.223872, 1, 15};
bullet10[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_02", 0.223872, 1, 15};
bullet11[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_03", 0.223872, 1, 15};
bullet12[] = {"A3\sounds_f\weapons\shells\9mm\grass_9mm_04", 0.223872, 1, 15};
class Library {
libTextDesc = "Permet de paralyser temporairement un humain.";
};
descriptionShort = "Permet de paralyser temporairement un humain.";
discreteDistance[] = {25};
discreteDistanceInitIndex = 0;
dispersion = 0.00093;
recoil = "recoil_single_pistol_2outof3";
recoilProne = "recoil_single_pistol_prone_2outof3";
minRange = 0;
minRangeProbab = 1;
midRange = 125;
midRangeProbab = 1;
maxRange = 25;
maxRangeProbab = 1;
aiRateOfFire = 0.3;
aiRateOfFireDistance = 200;
ffCount = 1;
reloadTime = 0.1;
autoReload = 0;
magazineReloadTime = 5;
magazines[] = {"DDOPP_1Rnd_X26"};
//class Drive_Stun_Mode : Drive_Stun {};
//muzzles[] = {this, "Drive_Stun_Mode"};
optics = 1;
//cursor = "mg";
cursoraim = "mg";
cursorSize = 1;
class FlashLight {
ambient[] = {0.1, 0.1, 0.1, 1};
angle = 30;
brightness = 0.1;
color[] = {0.9, 0.9, 0.7, 0.9};
direction = "flash_pos";
position = "flash_dir";
scale[] = {1, 1, 0.5};
};
drySound[] = {"A3\sounds_f\weapons\other\dry1", 0.398107, 1, 20};
reloadMagazineSound[] = {"A3\sounds_f\weapons\pistols\p07_reload", 0.562341, 1, 30};
class EventHandlers {
Init = "[] execVM ""\DDOPP_taserPack\scripts\Init_Taser.sqf""";
};
};
class DDOPP_X26_b : DDOPP_X26 {
model = "DDOPP_taserPack\taser_x26\DDOPP_x26_b";
displayName = "X26 Taser";
picture = "\DDOPP_taserPack\taser_x26\w_x26_b.paa";
UiPicture = "\DDOPP_taserPack\taser_x26\w_x26_b.paa";
};
class DDOPP_X3 : DDOPP_X26 {
model = "DDOPP_taserPack\taser_x3\DDOPP_x3";
displayName = "X3 Taser (Yellow)";
picture = "\DDOPP_taserPack\taser_x3\w_x3.paa";
UiPicture = "\DDOPP_taserPack\taser_x3\w_x3.paa";
class Library {
libTextDesc = "X3 Taser. Can keep human targets stunned up to 20 seconds. Can carry up to 3 cartridges.";
};
descriptionShort = "X3 Taser. Can keep human targets stunned up to 20 seconds. Can carry up to 3 cartridges.";
reloadTime = 0.1;
autoReload = 0;
magazineReloadTime = 5;
magazines[] = {"DDOPP_3Rnd_X3"};
class FlashLight {
ambient[] = {0.1, 0.1, 0.1, 1};
angle = 30;
brightness = 0.1;
color[] = {0.9, 0.9, 0.7, 0.9};
direction = "flash_pos";
position = "flash_dir";
scale[] = {1, 1, 0.5};
};
};
class DDOPP_X3_b : DDOPP_X3 {
model = "DDOPP_taserPack\taser_x3\DDOPP_x3_b";
displayName = "X3 Taser (Black)";
picture = "\DDOPP_taserPack\taser_x3\w_x3_b.paa";
UiPicture = "\DDOPP_taserPack\taser_x3\w_x3_b.paa";
};
};
class CfgVehicleClasses {
class DDOPP_TaserLogic {
displayName = "D.Doppler: Taser Mod";
};
};
class CfgVehicles {
class Logic; // External class reference
class All; // External class reference
class Strategic; // External class reference
class Land; // External class reference
class DDOPP_TaserInit : Logic {
vehicleClass = "DDOPP_TaserLogic";
displayName = "Initialize Taser Scripts";
model = "\ca\weapons\empty";
Icon = "\DDOPP_taserPack\data\icon_init.paa";
class EventHandlers {
init = "[] execVM""\DDOPP_taserPack\scripts\init_taser.sqf"";";
};
};
};
class CfgSounds {
class taser_hit {
sound[] = {"\DDOPP_taserPack\Taser_Hit.wav", 0.1, 1};
name = "taser_hit";
titles[] = {};
};
class taser_spark {
sound[] = {"\DDOPP_taserPack\Taser_Spark.wav", 0.1, 1};
name = "taser_spark";
titles[] = {};
};
};
class RscText; // External class reference
class RscEdit; // External class reference
class RscShortcutButton; // External class reference
class RscControlsGroup; // External class reference
class RscListBox; // External class reference
class RscTitles {
class RscPicture {
type = 0;
idc = -1;
style = 48;
colorBackground[] = {1, 1, 1, 1};
colorText[] = {1, 1, 1, 1};
font = "";
sizeEx = 0.02;
text = "";
};
class taser_hit_fx {
name = "taser_hit_fx";
duration = 5;
idd = -1;
movingEnable = 0;
controls[] = {"taser_hit_fx"};
class taser_hit_fx : RscPicture {
text = "DDOPP_taserPack\data\taser_hit_fx.paa";
x = "-0.000481755 * safezoneW + safezoneX";
y = "6.49715e-006 * safezoneH + safezoneY";
w = "1.0003 * safezoneW";
h = "1.00067 * safezoneH";
};
};
};
So jetzt kommen wir auch schon zum letzten Schrift dazu gehen wir in die core/functions/fn_handleDamage.sqf in unserer MissionFile. Dort löschen wir alles raus und fügen das ein:
Spoiler anzeigen
#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 ["DDOPP_X26","DDOPP_X26_b"]) then {
if (side _source isEqualTo west && playerSide isEqualTo civilian playerSide isEqualTo independent playerSide isEqualTo east playerSide 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 (vehicle player != 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 civilian playerSide isEqualTo independent playerSide isEqualTo east playerSide isEqualTo west playerSide isEqualTo civilian) then {
_damage = 0;
};
};
};
};
// [] spawn life_fnc_hudUpdate;
_damage;
Jetzt habt ihr's geschafft
Bei Fragen melden!!!
Bitte schreibt mir ob es bei euch geklappt hat!