Jump to content
  • 0

chi

Question

 I've been trying to figure this out for 2 days.

I have the zupa single currency and have the "check Wallet" function added to selfactions. I also have a dead player journal that can be checked. The problem is that the dead player journal also shows up on dead zombies and AI

Spoiler

   // CURSOR TARGET NOT ALIVE
    if (!_isAlive) then {

        // Gut animal/zed
        if((_isAnimal || _isZombie) && _hasKnife) then {
            _isHarvested = _cursorTarget getVariable["meatHarvested",false];
            if (!_isHarvested) then {
                _player_butcher = true;
            };
        };

        // Study body
        if ((_isMan || _isZombie) && !_isAnimal) then {
            _player_studybody = true;
        }
    } else {

        // unit alive
        // gear access on surrendered player
        if(_isMan && !_isZombie && !_isAnimal) then {
            _isSurrendered = _cursorTarget getVariable ["DZE_Surrendered",false];
            if (_isSurrendered) then {
                _player_SurrenderedGear = true;
            };
        };
    };


    // Human Gut animal || zombie
    if (_player_butcher) then {
        if (s_player_butcher < 0) then {
            if(_isZombie) then {
                s_player_butcher = player addAction [localize "STR_EPOCH_ACTIONS_GUTZOM", "\z\addons\dayz_code\actions\gather_zparts.sqf",_cursorTarget, 0, true, true, "", ""];
            } else {
                s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",_cursorTarget, 3, true, true, "", ""];
            };
        };
    } else {
        player removeAction s_player_butcher;
        s_player_butcher = -1;
    };


    // Study Body
    if (_player_studybody) then {
        if (s_player_studybody < 0) then {
            s_player_studybody = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "custom\zsc\actions\check_wallet.sqf",_cursorTarget, 0, false, true, "",""];
            
            s_player_studybody_2 = player addAction [("<t color=""#FF0000"">"+("Search") + "</t>"), "custom\DeadBodyJournal\DeadBodyJournal.sqf",_cursorTarget, 0, false, true, "",""];

    };

    } else {
        player removeAction s_player_studybody;
        s_player_studybody = -1;
        player removeAction s_player_studybody_2;
        s_player_studybody_2 = -1;
    };

.

Could you help me out with this and maybe explain how whatever you do works, just so i can maybe learn a little something from this experience?

 

P.S. I have the check wallet function showing up on AI, Zombies, and players, and i want to keep it that way. Doesn't really matter if the journal stays on AI either, i just really dont want it on the zombies. If i could remove it from the AI, that would be great. DZAI and WAI

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

see.. here youre defined studybody as true:

Spoiler

// Study body
        if ((_isMan || _isZombie) && !_isAnimal) then {
            _player_studybody = true;

thats means... if is player  and is zombie.. and is NOT animal... then player studybody is true...  here is ure issue as @Tech_Support say you...

must be If is player and is NOT zombie and is NOT animall then,,,

so

Spoiler

if (_isMan && !_isZombie && !_isAnimal) then {
            _player_studybody = true;

 

but also close studybody before studybody_2

 

Spoiler


    // Study Body
    if (_player_studybody) then {  //IF study_body is true
        if (s_player_studybody < 0) then {
            s_player_studybody = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "custom\zsc\actions\check_wallet.sqf",_cursorTarget, 0, false, true, "",""];
            };

            if (s_player_studybody_2 < 0) then {
            s_player_studybody_2 = player addAction [("<t color=""#FF0000"">"+("Search") + "</t>"), "custom\DeadBodyJournal\DeadBodyJournal.sqf",_cursorTarget, 0, false, true, "",""];
};


    } else {
        player removeAction s_player_studybody;
        s_player_studybody = -1;

        player removeAction s_player_studybody_2;
        s_player_studybody_2 = -1;

    };

 

also you need add

player removeAction s_player_studybody_2;
s_player_studybody_2 = -1;

 

bellow:

player removeAction s_player_fillfuel;
    s_player_fillfuel = -1;
    player removeAction s_player_studybody;
    s_player_studybody = -1;

Link to comment
Share on other sites

  • 0

Thats how i had the study body before. 

 

The thing is, it's like i need to define 2 different study body functions or something.

1- I want check wallet to show up on players & zombies, so _isman || _iszombie is what i need for that part.

2- I want deadbodyjournal to ONLY show on players. not zombies, but at the same time i need check wallet to show for zombies and players.

 

Anyway to do that?

 

Thanks for the replies guys!

 

Link to comment
Share on other sites

  • 0
1 hour ago, chi said:

Thats how i had the study body before. 

 

The thing is, it's like i need to define 2 different study body functions or something.

1- I want check wallet to show up on players & zombies, so _isman || _iszombie is what i need for that part.

2- I want deadbodyjournal to ONLY show on players. not zombies, but at the same time i need check wallet to show for zombies and players.

 

Anyway to do that?

 

Thanks for the replies guys!

 

try it: remove all about study_body2

find in your selfactions:

 // Study body

add Bellow :

Spoiler

if(_isMan && !_isZombie && !_isAnimal) then {
if (s_player_studybody_2 < 0) then {
            s_player_studybody_2 = player addAction [("<t color=""#FF0000"">"+("Search") + "</t>"), "custom\DeadBodyJournal\DeadBodyJournal.sqf",_cursorTarget, 0, false, true, "",""];
};


    } else {
        player removeAction s_player_studybody_2;
        s_player_studybody_2 = -1;
    };

and add:

player removeAction s_player_studybody_2;
s_player_studybody_2 = -1;

 

bellow:

player removeAction s_player_fillfuel;
    s_player_fillfuel = -1;
    player removeAction s_player_studybody;
    s_player_studybody = -1;

*So its looks:

Spoiler

 

   // CURSOR TARGET NOT ALIVE
    if (!_isAlive) then {

        // Gut animal/zed
        if((_isAnimal || _isZombie) && _hasKnife) then {
            _isHarvested = _cursorTarget getVariable["meatHarvested",false];
            if (!_isHarvested) then {
                _player_butcher = true;
            };
        };

if(_isMan && !_isZombie && !_isAnimal) then {
if (s_player_studybody_2 < 0) then {
            s_player_studybody_2 = player addAction [("<t color=""#FF0000"">"+("Search") + "</t>"), "custom\DeadBodyJournal\DeadBodyJournal.sqf",_cursorTarget, 0, false, true, "",""];
};


    } else {
        player removeAction s_player_studybody_2;
        s_player_studybody_2 = -1;
    };

 

        
        
        // Study body
        if ((_isMan || _isZombie) && !_isAnimal) then {
            _player_studybody = true;
        }
    } else {

        // unit alive
        // gear access on surrendered player
        if(_isMan && !_isZombie && !_isAnimal) then {
            _isSurrendered = _cursorTarget getVariable ["DZE_Surrendered",false];
            if (_isSurrendered) then {
                _player_SurrenderedGear = true;
            };
        };
    };


    // Human Gut animal || zombie
    if (_player_butcher) then {
        if (s_player_butcher < 0) then {
            if(_isZombie) then {
                s_player_butcher = player addAction [localize "STR_EPOCH_ACTIONS_GUTZOM", "\z\addons\dayz_code\actions\gather_zparts.sqf",_cursorTarget, 0, true, true, "", ""];
            } else {
                s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",_cursorTarget, 3, true, true, "", ""];
            };
        };
    } else {
        player removeAction s_player_butcher;
        s_player_butcher = -1;
    };


    // Study Body
    if (_player_studybody) then {
        if (s_player_studybody < 0) then {
            s_player_studybody = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "custom\zsc\actions\check_wallet.sqf",_cursorTarget, 0, false, true, "",""];
            };
            
    } else {
        player removeAction s_player_studybody;
        s_player_studybody = -1;
    };

 

 

Link to comment
Share on other sites

  • 0
2 hours ago, juandayz said:

try it: remove all about study_body2

find in your selfactions:

 // Study body

add Bellow :

  Reveal hidden contents

if(_isMan && !_isZombie && !_isAnimal) then {
if (s_player_studybody_2 < 0) then {
            s_player_studybody_2 = player addAction [("<t color=""#FF0000"">"+("Search") + "</t>"), "custom\DeadBodyJournal\DeadBodyJournal.sqf",_cursorTarget, 0, false, true, "",""];
};


    } else {
        player removeAction s_player_studybody_2;
        s_player_studybody_2 = -1;
    };

and add:

player removeAction s_player_studybody_2;
s_player_studybody_2 = -1;

 

bellow:

player removeAction s_player_fillfuel;
    s_player_fillfuel = -1;
    player removeAction s_player_studybody;
    s_player_studybody = -1;

*So its looks:

  Reveal hidden contents

 

   // CURSOR TARGET NOT ALIVE
    if (!_isAlive) then {

        // Gut animal/zed
        if((_isAnimal || _isZombie) && _hasKnife) then {
            _isHarvested = _cursorTarget getVariable["meatHarvested",false];
            if (!_isHarvested) then {
                _player_butcher = true;
            };
        };

if(_isMan && !_isZombie && !_isAnimal) then {
if (s_player_studybody_2 < 0) then {
            s_player_studybody_2 = player addAction [("<t color=""#FF0000"">"+("Search") + "</t>"), "custom\DeadBodyJournal\DeadBodyJournal.sqf",_cursorTarget, 0, false, true, "",""];
};


    } else {
        player removeAction s_player_studybody_2;
        s_player_studybody_2 = -1;
    };

 

        
        
        // Study body
        if ((_isMan || _isZombie) && !_isAnimal) then {
            _player_studybody = true;
        }
    } else {

        // unit alive
        // gear access on surrendered player
        if(_isMan && !_isZombie && !_isAnimal) then {
            _isSurrendered = _cursorTarget getVariable ["DZE_Surrendered",false];
            if (_isSurrendered) then {
                _player_SurrenderedGear = true;
            };
        };
    };


    // Human Gut animal || zombie
    if (_player_butcher) then {
        if (s_player_butcher < 0) then {
            if(_isZombie) then {
                s_player_butcher = player addAction [localize "STR_EPOCH_ACTIONS_GUTZOM", "\z\addons\dayz_code\actions\gather_zparts.sqf",_cursorTarget, 0, true, true, "", ""];
            } else {
                s_player_butcher = player addAction [localize "str_actions_self_04", "\z\addons\dayz_code\actions\gather_meat.sqf",_cursorTarget, 3, true, true, "", ""];
            };
        };
    } else {
        player removeAction s_player_butcher;
        s_player_butcher = -1;
    };


    // Study Body
    if (_player_studybody) then {
        if (s_player_studybody < 0) then {
            s_player_studybody = player addAction [("<t color=""#FF0000"">"+("Check Wallet") + "</t>"), "custom\zsc\actions\check_wallet.sqf",_cursorTarget, 0, false, true, "",""];
            };
            
    } else {
        player removeAction s_player_studybody;
        s_player_studybody = -1;
    };

 

 

Works perfect. I was over thinking it.

 

Thanks a lot juandayz!!!!!!!!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Discord

×
×
  • Create New...