1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
weapons_table_shake2 = {1,2,4,6}
weapons_table_shake3 = {3,5,21,23,32,38,39,74,88}
weapons_table_shake4 = {20,22,24,30,31,33,34,40,46,54,75,86}
weapons_table_shake5 = {10,11,35,36,37,45,47,49,51,52,53,69,72,73,76,77,78,85,87}
function contains(table, element)
for _, value in pairs(table) do
if value == element then
return true
end
end
return false
end
addhook("attack","attackshake")
function attackshake(id)
if contains(weapons_table_shake2,player(id,"weapon")) then
parse("shake "..id.." 2")
end
if contains(weapons_table_shake3,player(id,"weapon")) then
parse("shake "..id.." 3")
end
if contains(weapons_table_shake4,player(id,"weapon")) then
parse("shake "..id.." 4")
end
if contains(weapons_table_shake5,player(id,"weapon")) then
parse("shake "..id.." 5")
end
end
addhook("hit","hitshake")
function hitshake(id)
parse("shake "..id.." 3")
end
The thing can't read my Tabs so the code is untabbed.