Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. /*
  2. Author: ELF TEAM AKA LA MUERTE
  3. Title: fn_Menu_credit.sqf
  4. */
  5.  
  6. _mode = _this select 0;
  7.  
  8.  
  9. if(!dialog) then {
  10. createDialog "credit_bank";
  11. };
  12. disableSerialization;
  13. _display = findDisplay 33000;
  14. _timeingame = (life_playtime splitstring ",[]") select 3;
  15. diag_log _timeingame;
  16. switch (_mode) do{
  17. case 0 : {//PRESENTATION
  18.  
  19. _presentation = "
  20. Bienvenue a la banque Bretonne,
  21. <br/>
  22. <br/>
  23. Vous avez besoin d'argent??
  24. <br/>
  25. <br/>
  26. Ne vous inquietez pas et remplissez ce formulaire.
  27. <br/>
  28. L'argent sera disponible d'ici 24h (si acceptation du dossier).
  29. <br/>
  30. <br/>
  31. La banque Bretonne.
  32. ";
  33.  
  34. (_display displayCtrl 33004) ctrlSetStructuredText parseText format ["<t align='center'><t color='#FF8000'><t size='0.9'>%1</t></t></t>",_presentation];
  35.  
  36. };
  37. case 1 : {//Simultation
  38.  
  39. _montant = parseNumber (ctrlText 33007);
  40. _mensualite = parseNumber (ctrlText 33009);
  41. _v1 = "300";//5H
  42. _v2 = "600";//10h
  43. _v3 = "1440";//24h
  44. _v4 = "2880";//48h
  45.  
  46. diag_log "_timeingame";
  47. diag_log _timeingame;
  48.  
  49. //If (life_atmbank =< 0) exitWith {hint "Nous ne prettons pas d'argent vu votre compte en banque!"};
  50. If (_montant isEqualTo "" || _montant <= 0) exitWith {hint "Vous n'avez pas indiqué de montant!"};
  51. If (_montant >= 250001) exitWith {hint "Le Montant maximum autorisé est de 250 000 €"};
  52. If (_mensualite isEqualTo "" || _mensualite isEqualTo 0) exitWith {hint "Vous n'avez pas indiqué de Mensualitée!"};
  53. if ((_montant < 35001) && (_v1 > _timeingame )) exitWith {_condition = "Non"} else {_condition = "Oui"};
  54. if ((_montant < 75001) && (_v2 > _timeingame )) exitWith {_condition = "Non"} else {_condition = "Oui"};
  55. if ((_montant < 125001) && (_v3 > _timeingame )) exitWith {_condition = "Non"} else {_condition = "Oui"};
  56. if ((_montant < 250001) && (_v4 > _timeingame )) exitWith {_condition = "Non"} else {_condition = "Oui"};
  57.  
  58.  
  59. _simu = format ["Montant de l'emprunt : %1 %3 / Mensualités : %2/par jours.<br/>Condition remplie %4", _montant, _mensualite, "€",_condition];
  60. (_display displayCtrl 33010) ctrlSetStructuredText parseText format ["<t align='center'><t color='#FF8000'><t size='0.9'>%1</t></t></t>",_simu];
  61.  
  62. };
  63.  
  64. Case 2 : {
  65.  
  66. _montant = parseNumber (ctrlText 33007);
  67. _mensualite = parseNumber (ctrlText 33009);
  68. };
  69. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement