Advertisement
DarkSilencer

Untitled

Jan 23rd, 2016
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 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_use_atm = true;
  13. life_hunger = 100;
  14. life_thirst = 100;
  15. life_carryWeight = 0;
  16. CASH = 0; //Make sure we don't get our cash back.
  17. life_respawned = false;
  18. player playMove "amovpercmstpsnonwnondnon";
  19.  
  20. life_corpse SVAR ["Revive",nil,TRUE];
  21. life_corpse SVAR ["name",nil,TRUE];
  22. life_corpse SVAR ["Reviving",nil,TRUE];
  23. player SVAR ["Revive",nil,TRUE];
  24. player SVAR ["name",nil,TRUE];
  25. player SVAR ["Reviving",nil,TRUE];
  26.  
  27. //Load gear for a 'new life'
  28. switch(playerSide) do
  29. {
  30. case west: {
  31. _handle = [] spawn life_fnc_copLoadout;
  32. };
  33. case civilian: {
  34. _handle = [] spawn life_fnc_civLoadout;
  35. };
  36. case independent: {
  37. _handle = [] spawn life_fnc_medicLoadout;
  38. };
  39. waitUntil {scriptDone _handle};
  40. };
  41.  
  42. //Cleanup of weapon containers near the body & hide it.
  43. if(!isNull life_corpse) then {
  44. private "_containers";
  45. life_corpse SVAR ["Revive",TRUE,TRUE];
  46. _containers = nearestObjects[life_corpse,["WeaponHolderSimulated"],5];
  47. {deleteVehicle _x;} foreach _containers; //Delete the containers.
  48. deleteVehicle life_corpse;;
  49. };
  50.  
  51. //Destroy our camera...
  52. life_deathCamera cameraEffect ["TERMINATE","BACK"];
  53. camDestroy life_deathCamera;
  54.  
  55. //Bad boy
  56. if(life_is_arrested) exitWith {
  57. hint localize "STR_Jail_Suicide";
  58. life_is_arrested = false;
  59. [player,TRUE] spawn life_fnc_jail;
  60. [] call SOCK_fnc_updateRequest;
  61. };
  62.  
  63. //Johnny law got me but didn't let the EMS revive me, reward them half the bounty.
  64. if(!isNil "life_copRecieve") then {
  65. [player,life_copRecieve,true] remoteExecCall ["life_fnc_wantedBounty",RSERV];
  66. life_copRecieve = nil;
  67. };
  68.  
  69. //So I guess a fellow gang member, cop or myself killed myself so get me off that Altis Most Wanted
  70. if(life_removeWanted) then {
  71. [getPlayerUID player] remoteExecCall ["life_fnc_wantedRemove",RSERV];
  72. };
  73.  
  74. [] call life_fnc_playerSkins;
  75. [] call SOCK_fnc_updateRequest;
  76. [] call life_fnc_hudUpdate; //Request update of hud.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement