mrkey82 Posted February 6, 2021 Share Posted February 6, 2021 This gives an error. I want the macro to kick automatically as soon as it is pressed, but it doesn't work. Can you help me? codes; function handleOnPlayerACInfo( detectedACList, d3d9Size, d3d9MD5, d3d9SHA256 ) for _,acCode in ipairs( detectedACList ) do if acCode == 31 or acCode == 32 or acCode == 1 or acCode == 4 or acCode == 5 or acCode == 6 or acCode == 7 or acCode == 11 or acCode == 17 or acCode == 21 then kickPlayer( source, "Macro não é permitido no servidor." ) end end end local glitches = {"quickreload","fastmove","crouchbug","highcloserangedamage","hitanim","baddrivebyhitbox"} function enableGlitches () for _,glitch in ipairs(glitches) do) end end addEventHandler ( "onResourceStart", getResourceRootElement ( ),enableGlitches) function source ( source, command ) local reload = aclReload() -- Reload the ACL if ( reload ) then -- Check it was reloaded successfully else -- If not, output it (line below) outputChatBox ( "An unknown error occured. Please check the ACL file exists.", source, 255, 0, 0 ) end else -- If they're not an admin, output it (below) outputChatBox ( "You must be an admin to use this command!", source, 255, 0, 0 ) end end addCommandHandler ( "reload", source ) Link to comment
SpecT Posted February 6, 2021 Share Posted February 6, 2021 (edited) Hello and welcome to the forum! I think that the event handler for "handleOnPlayerACInfo" is missing (which could be the cause) or maybe you didn't paste it here. addEventHandler("onPlayerACInfo", root, handleOnPlayerACInfo) Could you show what the error you get is? Edited February 6, 2021 by SpecT Link to comment
mrkey82 Posted February 6, 2021 Author Share Posted February 6, 2021 14 minutes ago, SpecT said: Merhaba ve foruma hoş geldiniz! "HandleOnPlayerACInfo" için olay işleyicisinin eksik olduğunu düşünüyorum (nedeni bu olabilir) veya belki de buraya yapıştırmadınız. Aldığınız hatanın ne olduğunu gösterebilir misiniz? Here is the picture that gives this error https://hizliresim.com/ypVPNX Link to comment
Furzy Posted February 6, 2021 Share Posted February 6, 2021 (edited) 1 minute ago, mrkey82 said: Here is the picture that gives this error https://hizliresim.com/ypVPNX Remove the ")" after "do" in this line. But check if event is handled as spect said. looks that is missing Edited February 6, 2021 by Furzy Link to comment
SpecT Posted February 6, 2021 Share Posted February 6, 2021 (edited) The error says it all. You have useless/unexpected symbol that stops the code to load. local glitches = {"quickreload","fastmove","crouchbug","highcloserangedamage","hitanim","baddrivebyhitbox"} function enableGlitches () for _,glitch in ipairs(glitches) do end end addEventHandler ( "onResourceStart", resourceRoot,enableGlitches) Edited February 6, 2021 by SpecT Link to comment
mrkey82 Posted February 6, 2021 Author Share Posted February 6, 2021 3 minutes ago, mrkey82 said: Can you remake the code for me? Please 4 minutes ago, SpecT said: The error says it all. You have useless/unexpected symbol that stops the code to load. local glitches = {"quickreload","fastmove","crouchbug","highcloserangedamage","hitanim","baddrivebyhitbox"} function enableGlitches () for _,glitch in ipairs(glitches) do end end addEventHandler ( "onResourceStart", resourceRoot,enableGlitches) Can you remake the code for me? Please Link to comment
SpecT Posted February 6, 2021 Share Posted February 6, 2021 1 hour ago, mrkey82 said: Can you remake the code for me? Please Can you remake the code for me? Please Well I sent you a fixed one. Link to comment
mrkey82 Posted February 6, 2021 Author Share Posted February 6, 2021 1 minute ago, SpecT said: Size sabit bir tane gönderdim. But the function doesn't work. Can you help me with this? I want the macro to kick automatically when it is used. Link to comment
SpecT Posted February 6, 2021 Share Posted February 6, 2021 2 minutes ago, mrkey82 said: But the function doesn't work. Can you help me with this? I want the macro to kick automatically when it is used. Did you try what I suggested at first ? Add: addEventHandler("onPlayerACInfo", root, handleOnPlayerACInfo) Link to comment
mrkey82 Posted February 6, 2021 Author Share Posted February 6, 2021 2 minutes ago, SpecT said: İlk başta önerdiğim şeyi denedin mi? Ekle: Yes I tried the codes you gave but Function did not work Link to comment
SpecT Posted February 6, 2021 Share Posted February 6, 2021 (edited) Try this: function handleOnPlayerACInfo( detectedACList, d3d9Size, d3d9MD5, d3d9SHA256 ) for _,acCode in ipairs( detectedACList ) do if acCode == 31 or acCode == 32 or acCode == 1 or acCode == 4 or acCode == 5 or acCode == 6 or acCode == 7 or acCode == 11 or acCode == 17 or acCode == 21 then kickPlayer( source, "Macro não é permitido no servidor." ) end end end addEventHandler("onPlayerACInfo", root, handleOnPlayerACInfo) local glitches = {"quickreload","fastmove","crouchbug","highcloserangedamage","hitanim","baddrivebyhitbox"} function enableGlitches () for _,glitch in ipairs(glitches) do -- something end end addEventHandler ( "onResourceStart", resourceRoot, enableGlitches) function source ( source, command ) local reload = aclReload() -- Reload the ACL if ( reload ) then -- Check it was reloaded successfully -- something else -- If not, output it (line below) outputChatBox ( "An unknown error occured. Please check the ACL file exists.", source, 255, 0, 0 ) end --else -- If they're not an admin, output it (below) --outputChatBox ( "You must be an admin to use this command!", source, 255, 0, 0 ) --end end addCommandHandler ( "reload", source ) Edited February 6, 2021 by SpecT Link to comment
mrkey82 Posted February 6, 2021 Author Share Posted February 6, 2021 1 hour ago, SpecT said: Bunu dene: Thank you very much, script worked I love you very much can you please delete the topic? Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now