Categories > Coding > Lua >
How can i use hookfunction?
Posted
I cant find a good tutorial or anything that helps me understand how to use hookfunction. I want to hook OnClientEvent and cancel it if its have an unwanted argument.
https://imgur.com/a/oOomuUo
Replied
hookfunction basically 'switches' functions between them, example:
hookfunction(print, warn) -- first argument is what you want to switch and 2 nd argument is what u wanna switch it into
print("hello world!") -- this will WARN hello world!
you can also use arguments in hookfunctions like:
hookfunction(print, function(text) -- first argument is what u wanna switch, and 2nd one is what u wanna switch it into with the argument
warn("hooked: ", text)
end)
print("hello world!") -- this will WARN hooked: hello world!
i hope u understand lol
Cancel
Post
https://cdn.discordapp.com/attachments/909012795851407390/927492917394821140/siggy.png
Replied
epic lua coder is here
hookfunction(print, warn)
print("fag)
EZZZ
Cancel
Post
when the function got hennessey
https://imgur.com/a/oOomuUo
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post