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
35
36
37
38
39
40
41
42
43
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
35
36
37
38
39
40
41
42
43
weapcooldown = 2 weaplocked = {} weaplockround = {} weaponsallow = {34,35} addhook("join","e_join") function e_join(id) weaplocked[id] = false weaplockround[id] = 0 end addhook("leave","e_leave") function e_leave(id) weaplocked[id] = nil weaplockround[id] = nil end addhook("endround","e_endround") function e_endround() for _, id in ipairs(player(0,"table")) do if weaplocked[id] then weaplockround[id] = weaplockround[id] + 1 if weaplockround[id] == weapcooldown then weaplocked[id] = false weaplockround[id] = 0 end end end end addhook("buy","e_buy") function e_buy(id,wp) if wp == weaponsallow then if weaplocked[id] then msg2(id,"\169255000000You can't buy another weap until "..(weapcooldown-weaplockround[id]).." round(s) later!") return 1 else weaplocked[id] = true end end end
I tried to place = {IDs of the weapons I want to block the purchase temporarily}. But he just does not let buy the scout gun more than the awp he lets buy, I need help on that subject. Thank you