Basicly there is a server ran script that does something along the lines of:
_unit = player;
_hand = currentWeapon _unit;
if (_hand == "") then
{
_wName = typeof itemInHands _unit;
};
_wName = getText(configFile >> "cfgWeapons" >> _hand >> "displayName");
if (_wName == "") then
{
_wName = _hand;
};
if (!(_wName == "drink_waterbottle") or !(_wName == "drink_canteen")) then
{
[Player,format['%1 cannot be filled up.',_hand],'colorAction'] call fnc_playerMessage;
};
I think it would make a lot more sense to make it so instead of telling you your gun cant be filled with water, make it so it sets your gun on the ground and take a sip as it does when you drink from a water bottle or soda.
if ((_wName == "drink_waterbottle") or (_wName == "drink_canteen")) then
{
comment "take a drink";
};
if (!(_wName == "drink_waterbottle") or !(_wName == "drink_canteen")) then
{
comment "Drop Weapon and Take a Drink and then pick Weapon back up";
};
If you have any issues coding it just ask and I can help or just code it myself. {F32753} {F32754} {F32755} {F32756} {F32757}