Advertisement
Guest User

Untitled

a guest
Jul 16th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQF 2.49 KB | None | 0 0
  1. //telecharger le script ici: http://www.armaholic.com/page.php?id=26499
  2.  
  3. //copier coller le dossier AF_Keypad dans la racine de votre mission.
  4.  
  5. //dans le fichier description.sqf de votre mission coller les deux lignes suivantes:
  6.  
  7. #include "AF_Keypad\AF_KP_defines.hpp"
  8. #include "AF_Keypad\AF_KP_dialogs.hpp"
  9.  
  10. //dans le fichier init.sqf de votre mission coller la ligne suivante:
  11.  
  12. _nul = []execVM "AF_Keypad\AF_KP_vars.sqf";
  13.  
  14. //placer une porte ou portail dans l'editeur EDEN, la nommer door1 par exemple.
  15.  
  16. //dans l'init de la porte ou du portail mettre la ligne suivante:
  17.  
  18. door1 setVariable ['bis_disabled_door_1',1,true];  //la porte sera fermée au lancement de la mission.
  19.  
  20. //ensuite dans le dossier AF_Keypad ouvrir le fichier AF_KP_fncs.sqf pour pouvoir changer les codes des portes
  21. //et rentrer les noms de vos portes.
  22.  
  23.  
  24. //contenu du fichier AF_KP_fncs.sqf (exemple pour trois portes différentes):
  25.  
  26.  
  27. //This checks the variables passed in the execVM statments("number","enter" or "clear")
  28. switch (_this select 0) do {
  29. case "number": {
  30. InputText = InputText + format["%1", _this select 1];
  31. ctrlSetText[1000, InputText];
  32. };
  33.  
  34. case "clear": {
  35. InputText = "";
  36. ctrlSetText[1000, ClearText];
  37. };
  38.  
  39. case "enter": {
  40.     _error="1";
  41. OutputText = InputText;
  42. // hint format["code trouvé %1 ", OutputText];
  43. closeDialog 0;
  44. InputText = "";
  45.  
  46. // codes portes:
  47. //porte n°1
  48. if (OutputText == "3525") then {
  49. hint "DEVERROUILLAGE";
  50. door1 setVariable ['bis_disabled_door_1',0,true];
  51. _error="0";
  52. sleep 4;
  53. hintSilent "";
  54. };
  55.  
  56. if (OutputText == "3526") then {
  57. hint "VERROUILLAGE";
  58. door1 setVariable ['bis_disabled_door_1',1,true];
  59. _error="0";
  60. sleep 4;
  61. hintSilent "";
  62. };
  63.  
  64. //porte n°2
  65. if (OutputText == "200005") then {
  66. hintSilent "DEVERROUILLAGE";
  67. door2 setVariable ['bis_disabled_door_1',0,true];
  68. _error="0";
  69. sleep 4;
  70. hintSilent "";
  71. };
  72.  
  73. if (OutputText == "200006") then {
  74. hintSilent "VERROUILLAGE";
  75. door2 setVariable ['bis_disabled_door_1',1,true];
  76. _error="0";
  77. sleep 4;
  78. hintSilent "";
  79. };
  80.  
  81. //porte n°3
  82. if (OutputText == "200003") then {
  83. hintSilent "DEVERROUILLAGE";
  84. door3 setVariable ['bis_disabled_door_1',0,true];
  85. _error="0";
  86. sleep 4;
  87. hintSilent "";
  88. };
  89.  
  90. if (OutputText == "200004") then {
  91. hintSilent "VERROUILLAGE";
  92. door3 setVariable ['bis_disabled_door_1',1,true];
  93. _error="0";
  94. sleep 4;
  95. hintSilent "";
  96. };
  97.  
  98.  
  99. if (_error == "1") then {
  100. hintSilent "CODE INVALIDE";
  101. sleep 4;
  102. hintSilent "";
  103. }
  104. // -----------------------------------
  105.  
  106. };
  107. };
  108.  
  109. //et voilà... enjoy.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement