Autor: Matthias Bun
Edit: AmaZiinG
1. Erstellt eine neue SQF namens fn_molotov.sqf und legt sie in den Items Ordner rein.
Code
/*
File: fn_molotov.sqf
Author: Matthias Bun
Edit by AmaZiinG
Description: Handles the Molotov Cocktails
P.S. - Don't be a faggot and delete the Autors.
*/
private["_pos","_fire"];
_pos = [_this,0,[],[[]]] call BIS_fnc_param;
if(_pos isEqualTo []) exitWith {}; //Badddd
_fire = "test_EmptyObjectForFireBig" createVehicle _pos;
sleep 10;
{
if (typeOf _x == "#particlesource") then {deleteVehicle _x}} forEach ((position _fire) nearObjects 5);
Alles anzeigen
2. Geht jetzt in eure fn_handleDamage.sqf und schreibt in der Zeile 46 folgendes rein:
So sollte es bei euch aussehen:
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]]
];
//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;
};
};
if (_projectile in ["mini_Grenade"]) then {
_damage = false;
};
};
};
[] spawn life_fnc_hudUpdate;
_damage;
Alles anzeigen
3. Schreibt in der Functions.hpp unter Items folgendes rein:
4. Geht nun in eure fn_onFire.sqf und fügt ganz unten folgendes hinzu:
Code
if(_ammoType isEqualTo "mini_Grenade") then {
_projectile spawn {
private "_position";
while {!isNull _this} do {
_position = getPosATL _this;
sleep 0.1;
};
[_position] spawn life_fnc_molotov;
deleteVehicle _this;
};
};
Alles anzeigen
5. Nun müsst ihr noch die mini_Grenade in den Waffenshop einfügen
Fertig!