so players can't spam their use button
Forum
Scripts
Cooldown on "Use" Hook
Cooldown on "Use" Hook
3 replies
1

so players can't spam their use button
Masea: Since he said "use hook" it apparently means not the actual game but the modded one.Also i think there's a return 1 thingy for defusing hook.. so?
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
cooldown={}
addhook("use","_use")
function _use(id)
if cooldown[id]==0 then
bla bla bla
cooldown[id]=10 --in seconds
addhook("seconds","_s")
function _s()
for id=1,32 do
if cooldown[id]>0 then
cooldown[id]=cooldown[id]-1
bla bla bla
Ajmin: The thread itself is kinda confusing. But you're right about "defuse" hook.
1

Offline