Door script bug

  • Offline night
  • First Blood
  • ***
  • Posts: 95

Door script bug

« posted: Jan 09, 2018, 12:10 AM »
I'm using door script which runs the following from the client to hide the object
[_x, true] call fn_hideObjectGlobal;
I'm pretty sure also tried
[[_x, true], "A3W_fnc_hideObjectGlobal"] call A3W_fnc_MP;
and the result was the same.
Door object is basically a wall that disappears when unlocking.
But it's not "global", it becomes invisible only for the player which unlocked the door and not server-wide.
Any way to make it truly global?
Thanks
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2489

Re: Door script bug

« Reply #1 posted: Jan 09, 2018, 01:00 AM »
fn_hideObjectGlobal was disabled because fucking hackers used it in the past to hide literally all objects (buildings, vehicles, players). A3W_fnc_hideObjectGlobal does not exist in the vanilla mission.

If you want to re-enable the thing, you can add the following code in server\functions\setupServerPVars.sqf
Code: [Select]
["pvar_hideObjectGlobal", { (PVAL select 0) hideObjectGlobal (PVAL select 1) }],
  • Offline night
  • First Blood
  • ***
  • Posts: 95

Re: Door script bug

« Reply #2 posted: Jan 09, 2018, 01:02 AM »
So it's still not safe to enable it, right?
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2489

Re: Door script bug

« Reply #3 posted: Jan 09, 2018, 01:30 AM »
No I mean if you want to use it go ahead, it's just I didn't want it in the vanilla code because of the hacker thing that happened once. If you do actually get a hacker on the server, nothing's gonna stop him from wreaking havoc one way or another.
  • Offline night
  • First Blood
  • ***
  • Posts: 95

Re: Door script bug

« Reply #4 posted: Jan 09, 2018, 01:39 AM »
Fucking hackers.
Thank you  :)
  • Offline night
  • First Blood
  • ***
  • Posts: 95

Re: Door script bug

« Reply #5 posted: Jan 09, 2018, 03:21 AM »
Sorry again, I edited my pvars file to look like this: https://pastebin.com/rxt3J8ba
And its still not global.
Door script calls
[_x, true] call fn_hideObjectGlobal;
and
[_x, false] call fn_hideObjectGlobal;
Please advice, base doors are a nice feature to have.
  • Offline AgentRev
  • Developer
  • Veteran
  • ******
  • Posts: 2489

Re: Door script bug

« Reply #6 posted: Jan 09, 2018, 05:33 AM »
Sorry I made a little error, here is the fix:
Code: [Select]
["pvar_hideObjectGlobal", { objectFromNetId (PVAL select 0) hideObjectGlobal (PVAL select 1) }]
  • Offline night
  • First Blood
  • ***
  • Posts: 95

Re: Door script bug

« Reply #7 posted: Jan 09, 2018, 04:26 PM »
Yes, that worked. Thank you very much!