SchwEde Posted May 15, 2015 Report Share Posted May 15, 2015 This is a little Tutorial how to fix the issue named in the title. As allways: Do not expect any noob-frienldy tutorials nor so much support on this, try to fix it on your own ;) What it does? Fixing this Issue. What you need? compiles.sqf player_death.sqf Step 1: compiles.sqf redirect player_death Step 2: place the default player_death to your redirected path player_death.sqf find _killsV = _source getVariable ["banditKills",0]; _source setVariable ["banditKills",(_killsV + 1),true]; and replace it with _myKillsB = ((player getVariable ["banditKills",0]) / 30) * 1000; _humanityHit = (2000 + _myKillsB); _killsV = _source getVariable ["banditKills",0]; _source setVariable ["banditKills",(_killsV + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; add this variable to the private [....]; section _myKillsB Save and you are done ========================= As you can see we will use the exact same system as for gaining humanity. You are able to play around with this as much as you like, if you know how to script. PS: I did not test this, so would be nice if someone can give some feedback on this. Pasquale 1 Link to comment Share on other sites More sharing options...
cen Posted May 15, 2015 Report Share Posted May 15, 2015 Testing now! SchwEde 1 Link to comment Share on other sites More sharing options...
Buck0 Posted May 15, 2015 Report Share Posted May 15, 2015 ill let cen be the errand boy, ill wait :) cen 1 Link to comment Share on other sites More sharing options...
Guest Posted May 15, 2015 Report Share Posted May 15, 2015 _myKillsB = ((player getVariable ["banditKills",0]) / 30) * 1000; Won't this result in ERROR Zero Divisor, if the bandit Kills is for example 28 ? Link to comment Share on other sites More sharing options...
SchwEde Posted May 15, 2015 Author Report Share Posted May 15, 2015 28/30 = 0.93333333333 0.9333 * 1000 = 933.33 I'm doing wrong math here? Link to comment Share on other sites More sharing options...
Guest Posted May 15, 2015 Report Share Posted May 15, 2015 28/30 = 0.93333333333 0.9333 * 1000 = 933.33 I'm doing wrong math here? Nope, that's just what i mean :D If result of first operation is 0, it could throw an error, but it will continue with the script anyway. I'm not sure, i never done something like this, i'm just thinking it might be better to round the result of the first operation. Link to comment Share on other sites More sharing options...
SchwEde Posted May 15, 2015 Author Report Share Posted May 15, 2015 I just the same system as the epoch devs just the other way around :) Link to comment Share on other sites More sharing options...
cen Posted May 15, 2015 Report Share Posted May 15, 2015 Hero humanity is on top, bandit on bottom, so should work since the top is done by epoch devs :D if (!_punishment) then { //i'm "not guilty" - kill me && be punished _myKills = ((player getVariable ["humanKills",0]) / 30) * 1000; _humanityHit = -(2000 - _myKills); _kills = _source getVariable ["humanKills",0]; _source setVariable ["humanKills",(_kills + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; } else { //i'm "guilty" - kill me as bandit //_killsV = _source getVariable ["banditKills",0]; //_source setVariable ["banditKills",(_killsV + 1),true]; _myKillsB = ((player getVariable ["banditKills",0]) / 30) * 1000; _humanityHit = (2000 + _myKillsB); _killsV = _source getVariable ["banditKills",0]; _source setVariable ["banditKills",(_killsV + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; }; Link to comment Share on other sites More sharing options...
LunatikCH Posted May 15, 2015 Report Share Posted May 15, 2015 Hero humanity is on top, bandit on bottom, so should work since the top is done by epoch devs :D lol. Link to comment Share on other sites More sharing options...
Pasquale Posted May 26, 2015 Report Share Posted May 26, 2015 Does not work. I may be where the bug happen? _array = _this; if (count _array > 0) then { _source = _array select 0; _method = _array select 1; if ((!isNull _source) && (_source != player)) then { _canHitFree = player getVariable ["freeTarget",false]; _isBandit = (player getVariable["humanity",0]) <= -2000; _punishment = _canHitFree || _isBandit; //if u are bandit || start first - player will not recieve humanity drop _humanityHit = 0; if (!_punishment) then { //i'm "not guilty" - kill me && be punished _myKills = ((player getVariable ["humanKills",0]) / 30) * 1000; _humanityHit = -(2000 - _myKills); _kills = _source getVariable ["humanKills",0]; _source setVariable ["humanKills",(_kills + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; } else { //i'm "guilty" - kill me as bandit _myKillsB = ((player getVariable ["banditKills",0]) / 30) * 1000; _humanityHit = (2000 + _myKillsB); _killsV = _source getVariable ["banditKills",0]; _source setVariable ["banditKills",(_killsV + 1),true]; PVDZE_send = [_source,"Humanity",[_source,_humanityHit,300]]; publicVariableServer "PVDZE_send"; }; }; _body setVariable ["deathType",_method,true]; }; Link to comment Share on other sites More sharing options...
Antichrist Posted May 26, 2015 Report Share Posted May 26, 2015 Does not work. I may be where the bug happen? ... Well your file is almost exactly the same, except for adding skin to inventory on death so check your compiles.sqf and see if you're pointing player_death.sqf file to the right place Link to comment Share on other sites More sharing options...
Pasquale Posted May 26, 2015 Report Share Posted May 26, 2015 Well your file is almost exactly the same, except for adding skin to inventory on death so check your compiles.sqf and see if you're pointing player_death.sqf file to the right place All norms now, everything was connected in compiles.sqf. The problem is in the server, why it sometimes does not count murder. Thanks for the FIX ;) Link to comment Share on other sites More sharing options...
Pasquale Posted May 26, 2015 Report Share Posted May 26, 2015 Found one file, interesting implementation of enrollment humanity player_death.sqf Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now