Jump to content
MrOreo3

Tazer 1 shot

Recommended Posts

Tazers 1 shot no mater what... How do I fix that so they do damage instead of just instant taze?

Also, how can I get it to taze medics and cops as well?

#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_F","SMG_02_F","arifle_SPAR_01_blk_F","arifle_MXM_Black_F","arifle_SPAR_02_blk_F","srifle_DMR_07_blk_F","srifle_DMR_02_F","srifle_DMR_03_F"] &&    _projectile in ["B_9x21_Ball","B_556x45_Ball","B_65x39_Caseless","B_556x45_Ball_Tracer_Red","B_65x39_Case_green","B_338_Ball","B_762x51_Ball"]) 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 = 10000;
                    //if (_projectile == "B_556x45_Ball") then {_distance = 10000;};
                    if (_unit distance _source < _distance) then {
                        if !(isNull objectParent player) then {
                            if (typeOf (vehicle player) == "B_Quadbike_01_F") then {
                                player action ["Engine Off",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;
            };
        };
    };
};


//Anti VDI
if (((vehicle _source isKindOf "Ship") OR ( vehicle _source isKindOf "Air") OR (vehicle _source isKindOf "LandVehicle")) AND (_projectile == "")) then
{
    _unit allowDamage false;
    _unit setVariable ["life_fnc_allowDamage", False];
    _unit spawn {
        sleep 2;
        _this setVariable ["life_fnc_allowDamage", True];
        _this allowDamage true;
    };
};

[] spawn life_fnc_hudUpdate;
_damage;

 

Edited by MrOreo3

Share this post


Link to post
Share on other sites

Ok i have a few questions

1. Why do you have so many weapons being tazers, isn't that just overpowered & stupid

2. Please provide rpt logs

3. Please use the <> button when pasting code or use a website like pastebin

4. Please tell us what version of alrpg you are using so we know how to help you / what to compare to

5. Please post your server and client rpt logs whenever you ask for help

6. please read  the code before asking questions, look at the line below and find where it is, then take a guess at what that does

 if (side _source isEqualTo west && playerSide isEqualTo civilian) then {

7. Why would you want medics to be tasered when they are trying to revive + save people, literally stupid idea tbh

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, Deadlesszombie said:

Ok i have a few questions

1. Why do you have so many weapons being tazers, isn't that just overpowered & stupid

2. Please provide rpt logs

3. Please use the <> button when pasting code or use a website like pastebin

4. Please tell us what version of alrpg you are using so we know how to help you / what to compare to

5. Please post your server and client rpt logs whenever you ask for help

6. please read  the code before asking questions, look at the line below and find where it is, then take a guess at what that does

 if (side _source isEqualTo west && playerSide isEqualTo civilian) then {

7. Why would you want medics to be tasered when they are trying to revive + save people, literally stupid idea tbh

1. It is for the dif rank cops

2. I have no idea where to find rpt logs

3. Sorry about that did not know

4. 5.0

5. again idk where those logs are... i dont find anything called rpt logs...

6... i read it but I am having trouble understanding it..

7. Its just how I want it i guess xD... may seem stupid.. but help would be nice..

Share this post


Link to post
Share on other sites
4 hours ago, MrOreo3 said:

1. It is for the dif rank cops

2. I have no idea where to find rpt logs

3. Sorry about that did not know

4. 5.0

5. again idk where those logs are... i dont find anything called rpt logs...

6... i read it but I am having trouble understanding it..

7. Its just how I want it i guess xD... may seem stupid.. but help would be nice..

Appdata>local>arma3, arma3server is the server logs, normal Arma is client side logs. Literally the Bible that tells you what went wrong if something breaks

 

 

Share this post


Link to post
Share on other sites
5 minutes ago, Deadlesszombie said:

Literally the Bible

The bible is a fake book though.

:kappa:

Edited by Tommy Browning
Kappa
  • Like 1

Share this post


Link to post
Share on other sites

yes

you also have this error

15:04:00 Error in expression <ass\fn_initSpy.sqf"











exitWith {};
private ["_binConfigPatches","_cfgPa>
15:04:00   Error position: <{};
private ["_binConfigPatches","_cfgPa>
15:04:00   Error Missing ;
15:04:00 File mpmissions\__CUR_MP.Altis\SpyGlass\fn_initSpy.sqf, line 12

 

Share this post


Link to post
Share on other sites
9 hours ago, MrOreo3 said:

It is not an error though. I was wondering how to Fix the code to not always 1 shot.

so you what a random chance that the taser effect will happen?

Share this post


Link to post
Share on other sites

I want it to do damage to 10, at 10 hp they get tazed. Right now Someone can wear full gear and I have a p07 and 1 shot taze them.

Share this post


Link to post
Share on other sites

If this issue has been resolved, please confirm and reply with the resolution. This topic will be closed if no reply is given in 72 hours.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×