Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ПРИ НАЖАТИЕ НА ИГРОКА ТОЛКАЕТ ЕГО
- --]]
- local curTime = 0
- hook.Add( "KeyPress", "KeyAttackPlayer", function(ply,key)
- local player = ply:GetEyeTrace().Entity
- if ( key == IN_USE ) then
- if CurTime() < curTime then return end
- if IsValid(player) and player:IsPlayer() and ply:GetPos():Distance(player:GetPos()) < 60 then
- --player_ent:TakeDamage(math.random(2,6))
- player:SetVelocity(ply:GetAimVector() * 130)
- player:EmitSound("player/kevlar2.wav",65,90)
- curTime = CurTime() + 2
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement