FlacoBey

Untitled

Jan 1st, 2019
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.55 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. public OnGameFrame()
  5. {
  6.     for(int i = 1; i <= MaxClients; ++i)
  7.     {
  8.         decl String:classname[64];
  9.         GetClientWeapon(i, classname, sizeof(classname));
  10.         if(StrEqual(classname, "weapon_rifle_m60"))
  11.         {
  12.             if (GetClientButtons(i) & IN_ATTACK)
  13.             {
  14.                 float velocity[3];
  15.                 GetEntPropVector(i, PropType:1, "m_vecVelocity", velocity, 0);
  16.                 velocity[0] = 0.0;
  17.                 velocity[1] = 0.0;
  18.                 velocity[2] = 0.0;
  19.                 TeleportEntity(i, NULL_VECTOR, NULL_VECTOR, velocity)
  20.             }
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment