friquentin

Untitled

Nov 7th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. #include "..\..\script_macros.hpp"
  2. /*
  3. File: fn_knockedOut.sqf
  4. Author: Bryan "Tonic" Boardwine
  5.  
  6. Description:
  7. Starts and monitors the knocked out state.
  8. */
  9. private "_obj";
  10. params [
  11. ["_target",objNull,[objNull]],
  12. ["_who","",[""]]
  13. ];
  14.  
  15. if (isNull _target) exitWith {};
  16. if !(_target isEqualTo player) exitWith {};
  17. if (_who isEqualTo "") exitWith {};
  18.  
  19. titleText[format [localize "STR_Civ_KnockedOut",_who],"PLAIN"];
  20. player playMoveNow "Incapacitated";
  21. disableUserInput true;
  22.  
  23. _obj = "Land_ClutterCutter_small_F" createVehicle ASLTOATL(visiblePositionASL player);
  24. _obj setPosATL ASLTOATL(visiblePositionASL player);
  25.  
  26. life_isknocked = true;
  27. player attachTo [_obj,[0,0,0]];
  28. [] spawn theprogrammer_effects_fnc_assomer;
  29. sleep 15;
  30. player playMoveNow "AmovPpneMstpSrasWrflDnon";
  31. disableUserInput false;
  32. detach player;
  33. deleteVehicle _obj;
  34. life_isknocked = false;
  35. player setVariable ["robbed",false,true];
Advertisement
Add Comment
Please, Sign In to add comment