forked from Giallustio/HeartsAndMinds
-
-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1240 from Vdauphin/Add-rep_wheel
Add: Remove wheels of civilian vehicles decrease reputation
- Loading branch information
Showing
9 changed files
with
79 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/rep/wheelChange.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
/* ---------------------------------------------------------------------------- | ||
Function: btc_rep_fnc_wheelChange | ||
Description: | ||
Change reputation when a player change a wheel of a civilian car. | ||
Parameters: | ||
_object - Vehicle. [Object] | ||
_hitPoint - Hitpoint. [String] | ||
_damage - Damage value. [Number] | ||
Returns: | ||
Examples: | ||
(begin example) | ||
[cursorObject, "", 1] call btc_rep_fnc_wheelChange; | ||
(end) | ||
Author: | ||
Vdauphin | ||
---------------------------------------------------------------------------- */ | ||
|
||
params [ | ||
"_object", | ||
"_hitPoint", | ||
"_damage" | ||
]; | ||
|
||
if ( | ||
_damage < 1 || | ||
{_object in btc_veh_respawnable} || | ||
{_object in btc_vehicles} || | ||
{getNumber(configOf _object >> "side") isNotEqualTo 3} | ||
) exitWith {}; | ||
|
||
private _instigator = nearestObject [_object, btc_player_type]; | ||
[ | ||
btc_rep_malus_wheelChange, | ||
_instigator | ||
] call btc_rep_fnc_change; | ||
|
||
if (btc_debug_log) then { | ||
[format ["THIS = %1 _instigator = %2", _this, _instigator], __FILE__, [false]] call btc_debug_fnc_message; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters