BetterDeadThanZed 1006 Report post Posted December 28, 2016 Let's start with this: I don't care if you think Exile should only be PVP. I am running a PVE server and a lot of people like it so nyah. Anyway, I found this Anti-PVP script on Github: https://github.com/PixelDetonator/A3-Exile-Mod-Anti-PVP I tried to integrate it with the ExileClient_object_player_event_onHandleDamage.sqf that comes with Exile Reborn, but I can't get it to work. I get errors. This is the ExileClient_object_player_event_onHandleDamage.sqf from Exile Reborn: Spoiler /** * Exile Mod * exile.majormittens.co.uk * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"]; //private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile", "_hit", "_damage", "_source", "_ammo"]; _unit = _this select 0; _selectionName = _this select 1; _amountOfDamage = _this select 2; _sourceOfDamage = _this select 3; _typeOfProjectile = _this select 4; _chanceForKnockDown = [_typeOfProjectile] call JohnO_fnc_getBulletRating; _duration = _chanceForKnockDown + 20; if (_chanceForKnockDown >= random 100) then { if !(ExileReborn_playerIsKnockedOut) then { if (ExileClientIsAutoRunning) then { call ExileClient_system_autoRun_stop; }; [_duration] spawn JohnO_fnc_maintainKnockOut; }; }; if (_typeOfProjectile == "") then { } else { if !(vehicle player != player) then { player setBleedingRemaining 90; player setVariable ["JohnO_lastSourceOfDamage",_sourceOfDamage,true]; if !(ExileReborn_playerIsWounded) then { ExileReborn_playerIsWounded = true; ExileReborn_woundWasTreated = false; profileNamespace setVariable ["ExileReborn_playerIsWounded",ExileReborn_playerIsWounded]; profileNamespace setVariable ["ExileReborn_woundWasTreated",ExileReborn_woundWasTreated]; }; if !(ExileRebornClient_CustomHit_soundIsPlaying) then { ExileRebornClient_CustomHit_soundIsPlaying = true; [] spawn JohnO_fnc_playCustomHitSound; }; titleText["","WHITE OUT",0.2]; titleText["","WHITE IN",0.2]; }; }; I was wondering if someone could help me with merging these two files together so the anti-pvp will work with the custom stuff from Exile Reborn. Share this post Link to post Share on other sites
ka0s 457 Report post Posted December 28, 2016 As far as I can see it needs a few other scripts to work. JohnO_fnc_getBulletRating JohnO_fnc_maintainKnockOut ExileReborn_playerIsWounded ExileReborn_woundWasTreated JohnO_lastSourceOfDamage JohnO_fnc_playCustomHitSound That at least gives sense why it doesn't work, it uses like 4 different functions from JohnO, and 2 variables from ExileReborn. Share this post Link to post Share on other sites
hogansheroes 374 Report post Posted December 28, 2016 dam i was about to try this script just on exile not reborn Share this post Link to post Share on other sites
Super Jerome 370 Report post Posted December 28, 2016 Lol, you crack me up @BetterDeadThanZed what is "nyah" HAHAHA. On a serious note, what does an anti-pvp script do actually? By that I mean, how does it discourage PVP. Share this post Link to post Share on other sites
hogansheroes 374 Report post Posted December 28, 2016 not many like playing PvP so having a PvE server so you build bases without the hassle of people fucking shit up and so on, but for the script i think it was to stop people from shooting one another Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted December 28, 2016 8 hours ago, ka0s said: As far as I can see it needs a few other scripts to work. JohnO_fnc_getBulletRating JohnO_fnc_maintainKnockOut ExileReborn_playerIsWounded ExileReborn_woundWasTreated JohnO_lastSourceOfDamage JohnO_fnc_playCustomHitSound That at least gives sense why it doesn't work, it uses like 4 different functions from JohnO, and 2 variables from ExileReborn. I'm using Exile Reborn so I have all that other stuff. I just can't get the placement of the anti-pvp code correct. I keep getting errors any time I try something different. 5 hours ago, Super Jerome said: Lol, you crack me up @BetterDeadThanZed what is "nyah" HAHAHA. On a serious note, what does an anti-pvp script do actually? By that I mean, how does it discourage PVP. From what I can tell, I think the script causes the attacker to receive the damage instead of the person being attacked. Share this post Link to post Share on other sites
hogansheroes 374 Report post Posted December 28, 2016 i cant work it out with just exile as i changed the code with the @Exile code of ExileClient_object_player_event_onHandleDamage.sqf and all it did was let me kill the other player, even if i used the script from the dl still not working. What ashame as this is very useful Share this post Link to post Share on other sites
tinboye 219 Report post Posted December 30, 2016 Scarcode released 1 for epoch, maybe be able to port over? https://github.com/IT07/Game_code Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted December 30, 2016 As far as I can tell, that just notifies everyone in the server that a player killed another player, which is announced in the chat area already. I'm looking to either remove damage done from another player, or to reflect the damage back on the attacker. Share this post Link to post Share on other sites
deadeye2 13 Report post Posted December 30, 2016 (edited) Something like this? Not tested. Spoiler /** * Exile Mod * exile.majormittens.co.uk * © 2015 Exile Mod Team * * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/. */ private["_unit","_selectionName","_amountOfDamage","_sourceOfDamage","_typeOfProjectile"]; _unit = _this select 0; _selectionName = _this select 1; _amountOfDamage = _this select 2; _sourceOfDamage = _this select 3; _typeOfProjectile = _this select 4; if (isPlayer _sourceOfDamage && !(_sourceOfDamage isEqualTo player)) exitWith { _amountOfDamage = 0; _amountOfDamage }; _chanceForKnockDown = [_typeOfProjectile] call JohnO_fnc_getBulletRating; _duration = _chanceForKnockDown + 20; if (_chanceForKnockDown >= random 100) then { if !(ExileReborn_playerIsKnockedOut) then { if (ExileClientIsAutoRunning) then { call ExileClient_system_autoRun_stop; }; [_duration] spawn JohnO_fnc_maintainKnockOut; }; }; if (_typeOfProjectile == "") then { } else { if !(vehicle player != player) then { player setBleedingRemaining 90; player setVariable ["JohnO_lastSourceOfDamage",_sourceOfDamage,true]; if !(ExileReborn_playerIsWounded) then { ExileReborn_playerIsWounded = true; ExileReborn_woundWasTreated = false; profileNamespace setVariable ["ExileReborn_playerIsWounded",ExileReborn_playerIsWounded]; profileNamespace setVariable ["ExileReborn_woundWasTreated",ExileReborn_woundWasTreated]; }; if !(ExileRebornClient_CustomHit_soundIsPlaying) then { ExileRebornClient_CustomHit_soundIsPlaying = true; [] spawn JohnO_fnc_playCustomHitSound; }; titleText["","WHITE OUT",0.2]; titleText["","WHITE IN",0.2]; }; }; Edited December 30, 2016 by deadeye2 made code look a little nicer 1 Share this post Link to post Share on other sites