Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.60 KB | None | 0 0
  1. /*
  2. Author: Jean-Park
  3. Teamspeak 3: ts.the-programmer.com
  4. Web site: www.the-programmer.com
  5.  
  6. Terms of use:
  7. - This file is forbidden unless you have permission from the author. If you have this file without permission to use it please do not use it and do not share it.
  8. - If you have permission to use this file, you can use it on your server however it is strictly forbidden to share it.
  9. - Out of respect for the author please do not delete this information.
  10.  
  11. */
  12. _CurConfig = missionConfigFile >> "The_programmer_Duty_Config";
  13. _east_side = getNumber (_CurConfig >> "east_configuration" >> "east_side");
  14.  
  15. if ((playerSide isEqualto independent) || (playerSide isEqualto west)) exitWith {
  16. hint parseText (['STR_ALREADY_EMT',"The_programmer_Duty_Config","Prise_Service_Localization"] call theprogrammer_core_fnc_localize);
  17. };
  18.  
  19. if ((player getVariable "The_Programmer_IsCop") || (player getVariable "The_Programmer_IsEMT")) exitWith {
  20. hint parseText (['STR_ALREADY_EMT',"The_programmer_Duty_Config","Prise_Service_Localization"] call theprogrammer_core_fnc_localize);
  21. };
  22.  
  23. if ((_east_side isEqualTo 1) && ((playerSide isEqualTo east) || (player getVariable "The_Programmer_IsAdac"))) exitWith {
  24. hint parseText (['STR_ALREADY_EMT',"The_programmer_Duty_Config","Prise_Service_Localization"] call theprogrammer_core_fnc_localize);
  25. };
  26.  
  27. _TP_Authorized_Adac = player getVariable "TP_Authorized_Adac";
  28. _TP_Authorized_Police = player getVariable "TP_Authorized_Police";
  29. _TP_Authorized_Medic = player getVariable "TP_Authorized_Medic";
  30.  
  31. if !(_TP_Authorized_Medic) exitWith {
  32. hint parseText (['STR_NOT_EMT',"The_programmer_Duty_Config","Prise_Service_Localization"] call theprogrammer_core_fnc_localize);
  33. };
  34.  
  35. _syncdata = [] spawn SOCK_fnc_updateRequest;
  36. waitUntil {scriptDone _syncdata};
  37.  
  38. _grp = createGroup independent;
  39. _oldPlayer = player;
  40. _oldPosplayer = getposWorld player;
  41. _dir = getDir player;
  42.  
  43. _unit = _grp createUnit ["I_Survivor_F", position player, [], 0, "FORM"];
  44. _unit allowDamage false;
  45. _oldVarName = vehicleVarName _oldPlayer;
  46.  
  47. _unit setPosWorld _oldPosplayer;
  48. _unit setDir _dir;
  49. [_unit] joinSilent _grp;
  50.  
  51. selectPlayer _unit;
  52. deleteVehicle _oldPlayer;
  53.  
  54. The_programmer_initialised = true;
  55. player allowDamage true;
  56.  
  57. missionNamespace setVariable [_oldVarName,player,true];
  58. [player,_oldVarName] remoteExecCall ["The_programmer_Duty_fnc_SetvehicleVarName",0,player];
  59.  
  60. [(getPlayerUID player)] remoteExec ["TON_fnc_houseCleanup",2];
  61.  
  62. [getText (_CurConfig >> "path_init")] spawn {
  63. _path_init = _this select 0;
  64. [] execVM _path_init;
  65. };
  66.  
  67. if ((getNumber (_CurConfig >> "briefing")) isEqualTo 1) then {
  68. [] execVM "briefing.sqf";
  69. };
  70.  
  71. player setVariable ["The_Programmer_IsCop",false,true];
  72. player setVariable ["The_Programmer_IsEMT",true,true];
  73. player setVariable ["The_Programmer_IsAdac",false,true];
  74. player setVariable ["ace_medical_medicClass",2,true];
  75.  
  76. player setVariable ["TP_Authorized_Adac",_TP_Authorized_Adac,true];
  77. player setVariable ["TP_Authorized_Police",_TP_Authorized_Police,true];
  78. player setVariable ["TP_Authorized_Medic",_TP_Authorized_Medic,true];
  79.  
  80. hint parseText (['STR_ONDUTTY_EMT',"The_programmer_Duty_Config","Prise_Service_Localization"] call theprogrammer_core_fnc_localize);
  81.  
  82. if ((getNumber (_CurConfig >> "save_between_disconnection")) isEqualTo 1) then {
  83. [2,player] remoteExec ["The_programmer_Duty_fnc_UpdateQuery",2];
  84. };
  85.  
  86. ["Prisedeservice",[format[(['STR_NO_TAKE_DUTY',"The_programmer_Duty_Config","Prise_Service_Localization"] call theprogrammer_core_fnc_localize),name player]]] remoteExec ["BIS_fnc_showNotification",independent];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement