Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <sdktools>
- public OnPluginStart()
- {
- HookEvent("weapon_fire", EventPlayerHurt);
- }
- public Action EventPlayerHurt(Event event, const char[] name, bool dontBroadcast)
- {
- int i = GetClientOfUserId(event.GetInt("userid"));
- decl String:classname[64];
- GetClientWeapon(i, classname, sizeof(classname));
- if(StrEqual(classname, "weapon_rifle_m60"))
- {
- float velocity[3];
- GetEntPropVector(i, PropType:1, "m_vecVelocity", velocity, 0);
- velocity[0] = 0.0;
- velocity[1] = 0.0;
- velocity[2] = 0.0;
- TeleportEntity(i, NULL_VECTOR, NULL_VECTOR, velocity)
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment