Robin Withes 0 Posted May 2, 2017 Hello, I've been trying for 6 hours now to get my script working on a life server that allows cops to raid a weed processor. This is what i got so far : https://pastebin.com/VDE5WkMq I have a huge problem with the hideobjectglobal though.. If i use the normal hideObject it only hides the object from the guy who triggers the script and if i put it on hideobjectglobal, nothing happens. How do i fix this? Share this post Link to post Share on other sites
7erra 629 Posted May 2, 2017 Quote [_weedShop, true] remoteExec ["hideObjectGlobal", 2]; [_weedMachine, true] remoteExec ["hideObjectGlobal", 2]; remoteExec with param 2 means you are executing the code only on the server. Use 0 instead. Eventhough I don't think you have to execute a global command globaly (do you? Other opinions and facts?) Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 No, ive tried doing 0 as well. Didn work Share this post Link to post Share on other sites
7erra 629 Posted May 2, 2017 What about leaving out the remoteExec part? object hideObjectGlobal true; Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 Also doesnt work. That doesnt do anything. Share this post Link to post Share on other sites
7erra 629 Posted May 2, 2017 Okay I'd need some more information: Are you server/client/host? How are you executing the script? (Where from and with which command?) Did you try to restart the device? (jk) Is the rest of the script working? Did you check with eg systemchat? Hopefully we can fix this, eh? Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 The rest of the script is working, im running this on a server with the altis life framework, the script executes when a addaction is pressed ingame Share this post Link to post Share on other sites
bloodwyn1756 130 Posted May 2, 2017 hideObjectGlobal has to be executed on the server to work properly as far as I tested. [_weedShop, true] remoteExec ["hideObjectGlobal", 2]; Or _weedShop remoteExec ["hideObjectGlobal", 2]; work both for me. Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 I tried this now bloodwyn: /* Author: Robin Withes */ //Denying anyone else than bluefor to execute this script if (playerSide != west) exitWith {Hint "Only Bluefor can raid this processor.";}; //Declaring the 3 items that will need to be hided / unhided during the script _laptop = getpos player nearestObject "Land_Laptop_unfolded_F"; _sign = getpos player nearestObject "Land_InfoStand_V2_F"; _prop = getpos player nearestObject "Land_Device_assembled_F"; [_laptop, true] remoteExec ["hideObjectGlobal", 2]; [_sign, true] remoteExec ["hideObjectGlobal", 2]; [_prop, true] remoteExec ["hideObjectGlobal", 2]; hint "Hidden all the props"; It still doesnt work. It gives me the hint but it does NOT hide the objects. Share this post Link to post Share on other sites
7erra 629 Posted May 2, 2017 Try to verify the objects with _laptop = getpos player nearestObject "Land_Laptop_unfolded_F"; _sign = getpos player nearestObject "Land_InfoStand_V2_F"; _prop = getpos player nearestObject "Land_Device_assembled_F"; systemChat str [_laptop, _sign, _prop]; Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 This is what it put in chat https://gyazo.com/8e6d45a54539d4dcaf795e64e77843e2 Share this post Link to post Share on other sites
pierremgi 4900 Posted May 2, 2017 Yep, your object must be within 50 m (of the player here) with nearestObject command. Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 Its 5 - 10 meters away. Share this post Link to post Share on other sites
pierremgi 4900 Posted May 2, 2017 So, things seem to run like you created an object ocal. Where your info stand comes from? editor?, script? One sure thing, the remoteExec on server (2) for hideObjectGlobal works even if the variable (_laptop or else) is local to a client. Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 Info stand came from the editor. Share this post Link to post Share on other sites
pierremgi 4900 Posted May 2, 2017 Did you test a simple hideObject, remoteExec everywhere (0)? [_laptop, true] remoteExec ["hideObject", 0]; Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 Trying it now.. Ill post back in 5 mins Share this post Link to post Share on other sites
Robin Withes 0 Posted May 2, 2017 tried this /* Author: Robin Withes */ //Denying anyone else than bluefor to execute this script if (playerSide != west) exitWith {Hint "Only Bluefor can raid this processor.";}; //Declaring the 3 items that will need to be hided / unhided during the script _laptop = getpos player nearestObject "Land_Laptop_unfolded_F"; _sign = getpos player nearestObject "Land_InfoStand_V2_F"; _prop = getpos player nearestObject "Land_Device_assembled_F"; systemChat str [_laptop, _sign, _prop]; [_laptop, true] remoteExec ["hideObject", 0]; [_sign, true] remoteExec ["hideObject", 0]; [_prop, true] remoteExec ["hideObject", 0]; hint "done 1"; //_laptop hideObjectGlobal true; //_sign hideObjectGlobal true; //_prop hideObjectGlobal true; //[_laptop, true] remoteExec ["hideObjectGlobal", 2]; //[_sign, true] remoteExec ["hideObjectGlobal", 2]; //[_prop, true] remoteExec ["hideObjectGlobal", 2]; And it still does not work. Share this post Link to post Share on other sites
Robin Withes 0 Posted May 3, 2017 bump.. I really need help Share this post Link to post Share on other sites
pierremgi 4900 Posted May 3, 2017 are your _laptop and so on, attached to something? or have some specific textures? Did you test it with an other object, named in editor, without any other consideration than hide it via this script.? I'm still trying to help and wondering what could be wrong here. I hope you will have better help. 1 Share this post Link to post Share on other sites
mrcurry 507 Posted May 3, 2017 Are you testing this on server or in editor? Is the server using a command whitelist to prevent hacking? If yes is hideObjectGlobal allowed? Are you using a command whitelist in mission? If yes is hideObjectGlobal allowed there? Share this post Link to post Share on other sites
Robin Withes 0 Posted May 3, 2017 It works now. I made 2 functions one of them hides the object one of them unhides it and initialised them in cfgremotexec and functions.hpp. I than did basically this: /* Author: Robin Withes Description: This is a example how to hide and unhide objects. _weedmachine is the object. */ _weedMachine = nearestObject [player, "Land_Device_assembled_F"]; _clientID = owner _weedMachine; _id = _clientID; [_weedMachine] remoteExecCall ["life_fnc_hideObj",-_id]; hint "hid object, now waiting 10 seconds!"; sleep 10; hint "Woke up, attempting to unhide obj!"; [_weedMachine] remoteExecCall ["life_fnc_unHideObj",-_id]; Share this post Link to post Share on other sites
killzone_kid 1331 Posted May 3, 2017 6 hours ago, mrcurry said: Is the server using a command whitelist to prevent hacking? If yes is hideObjectGlobal allowed? Are you using a command whitelist in mission? If yes is hideObjectGlobal allowed there? This ^^^ Share this post Link to post Share on other sites