Page MenuHomeFeedback Tracker

Sqf Scripting Recomendation: Weapons, Water, Wells, and Ponds
New, WishlistPublic

Description

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}

Details

Legacy ID
1684847175
Severity
None
Resolution
Open
Reproducibility
Always
Category
General
Additional Information

Also I noticed for ponds it doesnt even you any action at all to drink or fill if you have a weapon out. This can be fixed in the same manner to allow you to click drink and it will just set your gun down for a moment and drink and then pick up your gun.

Event Timeline

Mizzle420420 edited Additional Information. (Show Details)Oct 26 2015, 2:37 AM
Mizzle420420 set Category to General.
Mizzle420420 set Reproducibility to Always.
Mizzle420420 set Severity to None.
Mizzle420420 set Resolution to Open.
Mizzle420420 set Legacy ID to 1684847175.May 8 2016, 11:57 PM

Maybe you are right but I think that it would procure plenty of lost weapons and stuff and this forum would be swarmed with threads about it.

It would be better to inform a player that he has no space to hide an item which is currently in player's hands (weapon, ammo, can of soda etc.) so his hands are full and thus he cannot perform an action (drinking from a water pump, searching for apples etc.).

if you notice when eating a can of food or drinking from a bottle with a weapon in your hands it will do an animation to set the gun or item on the ground (not in your inventory) and it plays the same animation and automaticly picks the weapon back up when you are done eating or drinking. this is what i would implement for water foundtains or ponds