FlacoBey

Untitled

Jan 4th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.58 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3. #include <sdkhooks>
  4.  
  5. public OnPluginStart()
  6. {
  7.     RegConsoleCmd("sm_ac", cA);
  8. }
  9.  
  10. public Action:cA(i, args)
  11. {
  12.     static iEntity;
  13.     iEntity = CreateEntityByName("point_viewcontrol_survivor");
  14.    
  15.     DispatchSpawn(iEntity);
  16.     ActivateEntity(iEntity);
  17.    
  18.     float a[3], v[3];
  19.     GetClientEyeAngles(i, a);
  20.     GetEntPropVector(i, Prop_Send, "m_vecOrigin", v);
  21.     v[2] += 90.0;
  22.     v[1] += -25.0;
  23.     v[0] -= 25.0;
  24.     TeleportEntity(iEntity, v, a, NULL_VECTOR);
  25.     AcceptEntityInput(iEntity, "SetParent", i);
  26.     AcceptEntityInput(iEntity, "SetParentAttachment");
  27. }
Advertisement
Add Comment
Please, Sign In to add comment