FlacoBey

Untitled

Jan 1st, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.60 KB | None | 0 0
  1. #include <sourcemod>
  2. #include <sdktools>
  3.  
  4. public OnPluginStart()
  5. {
  6.     HookEvent("weapon_fire", EventPlayerHurt);
  7. }
  8.  
  9. public Action EventPlayerHurt(Event event, const char[] name, bool dontBroadcast)
  10. {
  11.     int i = GetClientOfUserId(event.GetInt("userid"));
  12.    
  13.     decl String:classname[64];
  14.     GetClientWeapon(i, classname, sizeof(classname));
  15.     if(StrEqual(classname, "weapon_rifle_m60"))
  16.     {
  17.         float velocity[3];
  18.         GetEntPropVector(i, PropType:1, "m_vecVelocity", velocity, 0);
  19.         velocity[0] = 0.0;
  20.         velocity[1] = 0.0;
  21.         velocity[2] = 0.0;
  22.         TeleportEntity(i, NULL_VECTOR, NULL_VECTOR, velocity)
  23.     }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment