Jump to content
Sign in to follow this  
SilverDoveTV

how can i make this building doors open help

Recommended Posts

I added a mod which has a building with doors but i was the doors to only be opened by cops how can i do that ? please help

  • Like 1

Share this post


Link to post
Share on other sites
16 minutes ago, SilverDoveTV said:

I added a mod which has a building with doors but i was the doors to only be opened by cops how can i do that ? please help

this will run locally on the client by setting the last parameter to false so we can filter out who we dont want the doors to be locked/unlocked for. we do a if/else statement, if the side of the player is west(im assuming your cop side) then doors will be unlocked, if the side is anything other than west then the doors will stay locked. do this for however many doors there are in that building, right now its only for 3 doors, you should be able to see how many doors there are in the editor by double clicking on the building and seeing where you can set the doors by default for locked/unlocked/open.

if ((side player) == WEST) then
{
	buildingName setVariable["bis_disabled_Door_1",0,false];
	buildingName setVariable["bis_disabled_Door_2",0,false];
	buildingName setVariable["bis_disabled_Door_3",0,false];
}
else
{
	buildingName setVariable["bis_disabled_Door_1",1,false];
	buildingName setVariable["bis_disabled_Door_2",1,false];
	buildingName setVariable["bis_disabled_Door_3",1,false];
};

 

  • Like 2

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×