Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. public Action CommandListener_Inspect(int iClient, const char[] sCommand, int sArgs)
  2. {
  3.     if(!IsValidClient(iClient) || !Jailbreak_Warden_IsWarden(iClient) || !IsPlayerAlive(iClient))
  4.     {
  5.         return Plugin_Continue;
  6.     }
  7.    
  8.     float vAngles[3], vOrigin[3];
  9.     GetClientEyePosition(iClient, vOrigin);
  10.     GetClientEyeAngles(iClient, vAngles);
  11.    
  12.     Handle hTrace = TR_TraceRayFilterEx(vOrigin, vAngles, MASK_SOLID, RayType_Infinite, Filter_DontHitPlayers);
  13.     if(TR_DidHit(hTrace))
  14.     {
  15.         if(TR_GetEntityIndex(hTrace) == 0)
  16.             {
  17.                 TR_GetEndPosition(g_vMarkerPos, hTrace);   
  18.             }
  19.     }
  20.    
  21.     delete hTrace;
  22.    
  23.     g_vMarkerPos[2] += 7.5;
  24.    
  25.     return Plugin_Continue;
  26. }
  27.  
  28. public bool Filter_DontHitPlayers(entity, contentsMask, any: data)
  29. {
  30.     return !((entity > 0) && (entity <= MaxClients));
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement