Jump to content
  • 0

Where i have to put the code for entering the policestation


Re-Style

Question

13 answers to this question

Recommended Posts

  • 0

Hi im setting up a Epoch Australia map, and the problem is that i dont know where i have to put the code (player setVariable ["copLevel",1,true] in which file.

sry for the bad English.

  

Epoch != Altis Life

I don't believe epoch has any variables that prevent entry into any buildings.

As sparky mentioned epoch does not equal altis life.....

Link to comment
Share on other sites

  • 0

  

I don't believe epoch has any variables that prevent entry into any buildings.

As sparky mentioned epoch does not equal altis life.....

 

The script is build into the map restricting access to several buildings.

I've not had time to look properly for a solution.

Link to comment
Share on other sites

  • 0

The script is build into the map restricting access to several buildings.

I've not had time to look properly for a solution.

 

Sorry just noticed he was asking about Australia.

 

Yes he is correct about cop level.

 

Check mm_buildings2.pbo, inside is the police station

inside the config is:

class open_door_1 {

    displayName = "Open Door";

    position = "Interact1";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_1') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_1"", 1]";

   };

   

   class close_door_1 {

    displayName = "Close Door";

    position = "Interact1";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_1') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_1"", 0]";

   };

   

   class open_door_2 {

    displayName = "Open Door";

    position = "Interact2";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_2') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_2"", 1]";

   };

   

   class close_door_2 {

    displayName = "Close Door";

    position = "Interact2";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_2') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_2"", 0]";

   };

   

   class open_door_3 {

    displayName = "Open Door";

    position = "Interact3";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_3') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_3"", 1]";

   };

   

   class close_door_3 {

    displayName = "Close Door";

    position = "Interact3";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_3') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_3"", 0]";

   };

   

   class open_door_4 {

    displayName = "Open Door";

    position = "Interact4";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_4') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_4"", 1]";

   };

   

   class close_door_4 {

    displayName = "Close Door";

    position = "Interact4";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_3') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_4"", 0]";

   };

   

   class open_door_5 {

    displayName = "Open Door";

    position = "Interact5";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_5') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_5"", 1]";

   };

   

   class close_door_5 {

    displayName = "Close Door";

    position = "Interact5";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_5') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_5"", 0]";

   };

   

   class open_door_6 {

    displayName = "Open Door";

    position = "Interact6";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_6') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_6"", 1]";

   };

   

   class close_door_6 {

    displayName = "Close Door";

    position = "Interact6";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_6') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_6"", 0]";

   };

   

   class open_door_7 {

    displayName = "Open Door";

    position = "Interact7";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_7') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_7"", 1]";

   };

   

   class close_door_7 {

    displayName = "Close Door";

    position = "Interact7";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_7') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_7"", 0]";

   };

   

   class open_door_8 {

    displayName = "Open Garage";

    position = "Interact8";

    radius = 5;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_8') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_8"", 1]";

   };

   

   class close_door_8 {

    displayName = "Close Garage";

    position = "Interact8";

    radius = 5;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_8') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_8"", 0]";

   };

 

So as we now see

 

player getVariable ['copLevel',0]) > 0)";
 

Is part of the door actions.

 

 

So to answer your original question.

Add to your onPlayerRespawn.sqf

 

 

player setVariable ['copLevel',1]
 

Thanks Richie for pointing out its Australia in not so many words lol

Link to comment
Share on other sites

  • 0

Sorry just noticed he was asking about Australia.

 

Yes he is correct about cop level.

 

Check mm_buildings2.pbo, inside is the police station

inside the config is:

class open_door_1 {

    displayName = "Open Door";

    position = "Interact1";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_1') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_1"", 1]";

   };

   

   class close_door_1 {

    displayName = "Close Door";

    position = "Interact1";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_1') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_1"", 0]";

   };

   

   class open_door_2 {

    displayName = "Open Door";

    position = "Interact2";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_2') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_2"", 1]";

   };

   

   class close_door_2 {

    displayName = "Close Door";

    position = "Interact2";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_2') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_2"", 0]";

   };

   

   class open_door_3 {

    displayName = "Open Door";

    position = "Interact3";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_3') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_3"", 1]";

   };

   

   class close_door_3 {

    displayName = "Close Door";

    position = "Interact3";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_3') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_3"", 0]";

   };

   

   class open_door_4 {

    displayName = "Open Door";

    position = "Interact4";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_4') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_4"", 1]";

   };

   

   class close_door_4 {

    displayName = "Close Door";

    position = "Interact4";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_3') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_4"", 0]";

   };

   

   class open_door_5 {

    displayName = "Open Door";

    position = "Interact5";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_5') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_5"", 1]";

   };

   

   class close_door_5 {

    displayName = "Close Door";

    position = "Interact5";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_5') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_5"", 0]";

   };

   

   class open_door_6 {

    displayName = "Open Door";

    position = "Interact6";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_6') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_6"", 1]";

   };

   

   class close_door_6 {

    displayName = "Close Door";

    position = "Interact6";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_6') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_6"", 0]";

   };

   

   class open_door_7 {

    displayName = "Open Door";

    position = "Interact7";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_7') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_7"", 1]";

   };

   

   class close_door_7 {

    displayName = "Close Door";

    position = "Interact7";

    radius = 3;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_7') == 4) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_7"", 0]";

   };

   

   class open_door_8 {

    displayName = "Open Garage";

    position = "Interact8";

    radius = 5;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_8') < 0.5) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_8"", 1]";

   };

   

   class close_door_8 {

    displayName = "Close Garage";

    position = "Interact8";

    radius = 5;

    onlyForplayer = "true";

    condition = "((this animationPhase 'Door_8') == 1) && ((player getVariable ['copLevel',0]) > 0)";

    statement = "this animate [""Door_8"", 0]";

   };

 

So as we now see


player getVariable ['copLevel',0]) > 0)";
 

Is part of the door actions.

 

 

So to answer your original question.

Add to your onPlayerRespawn.sqf

 

 


player setVariable ['copLevel',1]
 

Thanks Richie for pointing out its Australia in not so many words lol

BTW,

I checked every PBO inside of the Australia map in each config.cpp and I did not notice any other doors that require a variable to be set on players.

Police Station and Prison seen to be the only two and both are requiring the coplevel

ENJOY

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...