How to disable hook for 1round in 60 min
2 replies



07.02.21 11:03:56 pm
Hey, when I mix my both script the hooks hit not working as well (becuase i use 2 hooks for hit (on original script also in ghost script!), so I wanted to disable the original script when the ghost script enable
That why I come to here to ask if someone able to help me and thanks btw
That why I come to here to ask if someone able to help me and thanks btw

Either use
freehook or a boolean variable that overlaps the original hit hook.
Though it would be smarter to just combine them but whatever.

Though it would be smarter to just combine them but whatever.
Look at me standing, here on my own again
with
freehook you could remove a "hooked" function
but i would suggest something like:
edit:
Mami Tomoe was faster

but i would suggest something like:
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
addhook("<your hook>","switchfunc")
function original_one(params)
//do something
end
function original_two(params)
//do something else
end
function switchfunc(params)
if condition then
original_one(params)
else
original_two(params)
end
end
function original_one(params)
//do something
end
function original_two(params)
//do something else
end
function switchfunc(params)
if condition then
original_one(params)
else
original_two(params)
end
end
edit:


loading...



