From f44901db1b3e232c66e1f2556be38c7a58f8f114 Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Sat, 30 Apr 2016 16:47:58 -0400 Subject: [PATCH] Prevent spamming change clothes Vanilla development commit: https://github.com/DayZMod/DayZ/commit/98733d37abf14e3dca92fe62846761b662fabf18 --- SQF/dayz_code/actions/player_wearClothes.sqf | 3 +++ SQF/dayz_code/init/variables.sqf | 1 + 2 files changed, 4 insertions(+) diff --git a/SQF/dayz_code/actions/player_wearClothes.sqf b/SQF/dayz_code/actions/player_wearClothes.sqf index 72ad70510..7e22a47b7 100644 --- a/SQF/dayz_code/actions/player_wearClothes.sqf +++ b/SQF/dayz_code/actions/player_wearClothes.sqf @@ -1,3 +1,6 @@ +if (dayz_lastClothesChange + 5 > diag_tickTime) exitWith {localize "str_player_actionslimit" call dayz_rollingMessages;}; +dayz_lastClothesChange = diag_tickTime; + if (_this in DZE_RestrictSkins) exitWith { format[localize "str_epoch_player_315",_this] call dayz_rollingMessages; }; if (DZE_ActionInProgress) exitWith {localize "str_epoch_player_83" call dayz_rollingMessages;}; DZE_ActionInProgress = true; diff --git a/SQF/dayz_code/init/variables.sqf b/SQF/dayz_code/init/variables.sqf index 0cf075809..dd7a20c50 100644 --- a/SQF/dayz_code/init/variables.sqf +++ b/SQF/dayz_code/init/variables.sqf @@ -563,6 +563,7 @@ if (!isDedicated) then { dayz_temperaturmin = 27; //TeeChange //player special variables + dayz_lastClothesChange = 0; dayZ_lastPlayerUpdate = 0; dayz_hunger = 0; dayz_thirst = 0;