English Add closure for police officers only

I'm the Boss

Admin
2/1/20
472
2
43
1 100
This tutorial will allow you to add a function so that only "Cop" can open/close doors.
___________________________________

Installation

  • Go to the root of your mission then core/cop
  • Create a file fn_lockCop.sqf
  • In this file add the following code:

S’il vous plaît, Connexion ou S'inscrire pour voir le code !
  • Go to your Functions.hpp at the root of your mission and add this
S’il vous plaît, Connexion ou S'inscrire pour voir le code !
  • Go to your mapping and add this code to the object you want to block
S’il vous plaît, Connexion ou S'inscrire pour voir le code !

  • For those who want to do the close/open with an object Y here is the code
Without modification it will be impossible to close the entire building with more than 2 doors
 
Dernière édition par un modérateur:
  • Like
Les réactions: Teravince
20/4/20
53
1
300
hello, i replaced my line by this one :
this addAction ["Ouvrir/Fermer", life_fnc_lockdoor,"",0,false,false,"","side player isEqualTo civilian && license_civ_martinez"]; in my init

in my file i putted this one :

if !(side player isEqualTo civilian && license_civ_martinez) exitWith {};

i made it for en enterprise

Should it work ???

Thank you ;)
 
Activité
Pour l'instant, il n'y a personne ici