No interaction with Drink_Canteen / Water_Bottle / Vodka_Bottle

Newbie Spellweaver
Joined
Jan 26, 2015
Messages
67
Reaction score
0
Hello.

I'm playing on the 0.59-170-130

I found a Canteen, but I can't Drink / Drink All.
I just can Forced-drink someone.

I try to input 0.54 code / The Obnova0.59(0.59-130-861) Code.

And no succes.

Can you help me please ?

I have upload my drinks.pbo if you need to see it
 
Add your init.sqf of server_data!

Below of "player_transferWater"

player_canUseDrinkAction =
{
_canUse = true;
_item = _this select 0;
_person = _this select 1;


if ( _person getVariable ['isUsingSomething',0] != 0 ) then {_canUse = false;};

if ( quantity _item <= 0 ) then {_canUse = false;};

if ( !(isNull itemInHands _person) && (isNull itemParent _item)) then {_canUse = false;};

if (((itemParent _item) isKindOf 'FireplaceBase')) then {_canUse = false;};

_canUse
};
 
ok thanks you so the init.sqf became :

player_transferWater = {
_receiverQty = quantity _tool2;
_senderQty = quantity _tool1;
_name1 = displayName _tool2;

if (_receiverQty >= maxQuantity _tool2) exitWith
{
[_owner,format["The %1 is already full",_name1],""] call fnc_playerMessage;
};
if (damage _tool2 >= 1 || damage _tool1 >= 1) exitWith
{
[_owner,format["The %1 is too badly damaged",_name1],""] call fnc_playerMessage;
};

_exchanged = ((_receiverQty + _senderQty) min (maxQuantity _tool2)) - _receiverQty;
_receiverQty = _receiverQty + _exchanged;
_senderQty = _senderQty - _exchanged;
_tool2 setQuantity _receiverQty;
_tool1 setQuantity _senderQty;

[_owner,format["You have poured the %2 into the %1",_name1,displayName _tool1],"colorAction"] call fnc_playerMessage;
};
player_canUseDrinkAction =
{
_canUse = true;
_item = _this select 0;
_person = _this select 1;


if ( _person getVariable ['isUsingSomething',0] != 0 ) then {_canUse = false;};

if ( quantity _item <= 0 ) then {_canUse = false;};

if ( !(isNull itemInHands _person) && (isNull itemParent _item)) then {_canUse = false;};

if (((itemParent _item) isKindOf 'FireplaceBase')) then {_canUse = false;};

_canUse
};
 
Back