Guest User

Untitled

a guest
Apr 2nd, 2020
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.26 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_respawned.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Sets the player up if he/she used the respawn option.
  8. */
  9. private ["_handle"];
  10. //Reset our weight and other stuff
  11.  
  12. life_action_inUse = false;
  13. life_use_atm = true;
  14. life_hunger = 100;
  15. life_thirst = 100;
  16. life_carryWeight = 0;
  17. CASH = 0; //Make sure we don't get our cash back.
  18. life_respawned = false;
  19. player playMove "AmovPercMstpSnonWnonDnon";
  20.  
  21. life_corpse setVariable ["Revive",nil,true];
  22. life_corpse setVariable ["name",nil,true];
  23. life_corpse setVariable ["Reviving",nil,true];
  24. player setVariable ["Revive",nil,true];
  25. player setVariable ["name",nil,true];
  26. player setVariable ["Reviving",nil,true];
  27.  
  28. [] call life_fnc_startLoadout;
  29.  
  30. //Cleanup of weapon containers near the body & hide it.
  31. if (!isNull life_corpse) then {
  32. private "_containers";
  33. life_corpse setVariable ["Revive",true,true];
  34. _containers = nearestObjects[life_corpse,["WeaponHolderSimulated"],5];
  35. {deleteVehicle _x;} forEach _containers; //Delete the containers.
  36. deleteVehicle life_corpse;
  37. };
  38.  
  39. //Destroy our camera...
  40. life_deathCamera cameraEffect ["TERMINATE","BACK"];
  41. camDestroy life_deathCamera;
  42.  
  43. //Bad boy
  44. if (life_is_arrested) exitWith {
  45. hint localize "STR_Jail_Suicide";
  46. life_is_arrested = false;
  47. [player,true] spawn life_fnc_jail;
  48. [] call SOCK_fnc_updateRequest;
  49. };
  50.  
  51. //Johnny law got me but didn't let the EMS revive me, reward them half the bounty.
  52. if (!isNil "life_copRecieve") then {
  53.  
  54. if (life_HC_isActive) then {
  55. [getPlayerUID player,player,life_copRecieve,true] remoteExecCall ["HC_fnc_wantedBounty",HC_Life];
  56. } else {
  57. [getPlayerUID player,player,life_copRecieve,true] remoteExecCall ["life_fnc_wantedBounty",RSERV];
  58. };
  59.  
  60. life_copRecieve = nil;
  61. };
  62.  
  63. //So I guess a fellow gang member, cop or myself killed myself so get me off that Altis Most Wanted
  64. if (life_removeWanted) then {
  65.  
  66. if (life_HC_isActive) then {
  67. [getPlayerUID player] remoteExecCall ["HC_fnc_wantedRemove",HC_Life];
  68. } else {
  69. [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV];
  70. };
  71.  
  72. };
  73.  
  74. [] call SOCK_fnc_updateRequest;
  75. [] call life_fnc_hudUpdate; //Request update of hud.
Advertisement
Add Comment
Please, Sign In to add comment