A3Armory / A3A_A3Wasteland.Altis

A3Wasteland is a survival sandbox mission for Arma 3 where two teams and independent players fight for survival. Built in collaboration between GoT, TPG, KoS, 404Games, and others.
http://a3wasteland.com
GNU Affero General Public License v3.0
9 stars 6 forks source link

Some quick help #52

Closed Gigatek1 closed 7 years ago

Gigatek1 commented 7 years ago

I want to fix a issue with some code I added to r3f to prevent releasing objects in water. I'm having problems defining some objects I want to allow. Here's a link to the original that works. I just cant figure out how to define the object variable in some new code.

https://github.com/A3Armory/A3A_A3Wasteland.Altis/blob/dev/addons/R3F_ARTY_AND_LOG/R3F_LOG/objet_deplacable/relacher.sqf#L14-#L17

private ["_objet"];

_objet = _this select 0;

if ((surfaceIsWater position player) && !({_objet isKindOf _x} count ["ReammoBox_F", "SDV_01_base_F", "Rubber_duck_base_F", "Scooter_Transport_01_base_F", "Boat_Civil_01_base_F", "Boat_Transport_02_base_F"] > 0)) exitWith { ["You can only place objects on terra firma", 5] call mf_notify_client; R3F_LOG_mutex_local_verrou = false; };

AgentRev commented 7 years ago
if (surfaceIsWater getPosASL player && {R3F_LOG_joueur_deplace_objet isKindOf _x} count ["ReammoBox_F", "Ship"] == 0) exitWith {