Advertisement
Guest User

Untitled

a guest
Feb 14th, 2020
305
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.30 KB | None | 0 0
  1. /**
  2. * PlayerBase.c
  3. *
  4. * 6IX
  5. * https://steamcommunity.com/id/6IX6OD/
  6. * © 2019 - 2020 6IX Development
  7. *
  8. * Author : 6IX
  9. *
  10. *
  11. * Notes : N/A
  12. *
  13. *
  14. * This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
  15. * To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
  16. * This work is property of 6IX Development. You do not have permissions to edit/distribute any of this content
  17. * without written permission from the content author (6IX).
  18. * Failure to adhere to the content license(s) above will result in actions from Bohemia Interactive Studios.
  19. */
  20. modded class PlayerBase
  21. {
  22.  
  23.     void SpawnItemOnTargetTest() {
  24.         Weapon weapon = this.m_WeaponDebug.GetWeaponInHands();
  25.  
  26.         vector camera_dir = GetGame().GetCurrentCameraDirection();
  27.         vector camera_pos = GetGame().GetCurrentCameraPosition();
  28.         vector end_point = camera_pos + camera_dir * 1000;
  29.  
  30.         vector contact_point;
  31.         vector contact_dir;
  32.         int contact_component;
  33.        
  34.         Object player_object;
  35.         Class.CastTo(player_object, GetGame().GetPlayer());
  36.  
  37.         DayZPhysics.RaycastRV(camera_pos, end_point, contact_point, contact_dir, contact_component,null, null, player_object , false, false, ObjIntersectFire, 0.1);
  38.  
  39.         SpawnEntityOnGroundPos("AKM", contact_point);
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement