[Release] K9 Script [REMOVED]

try naming it “k9” instead of “swift_k9”.

kk, brb (Deleted the message couse of my server ip was in the link LUL)

Yeah was actually about to flag it for removal.

1 Like

Still the same :confused:

Do you have this code at the bottom of your script.js

// Event Listener
document.onreadystatechange = () => {
    if (document.readyState === "complete") {
        window.addEventListener('message', function(event) {
            if (event.data.type == "open_k9_menu") {
                app.EnableApp();
            } else if (event.data.type == "update_resource_name") {
                app.UpdateResource(event.data.name);
            }
        });
    }
}

Yes i do

in the client.lua

Replace this

    RegisterNUICallback("closemenu", function(data)
        SetNuiFocus(false, false)
    end)

with this

RegisterNUICallback("closemenu", function(data)
	SetNuiFocus(false, false)
	print("Closing Menu Called")
end)

then when you close the menu press F8 and see if you can see Closing Menu Called

ForAnswer

I dont have anyone of them?

You shouldn’t have edited any of those.

Ohh, there is no picture…

Editing those NUI callback names is breaking the NUI. You should have left those alone.

Ohh, so i cant translate it?

There is no need to translate it. Those don’t show up on the screen at all.

Yes they do, they are changed to what i called it
I havent deleted any of those 2 you wrote :confused:

No they dont. NUI Callbacks don’t show up on the screen… I have been writing NUI a while. If you wanna translate the menu you edit the HTML file you don’t edit the NUI callbacks.

Ohhh, then that will change it in the script? :open_mouth:

All I know is you broke the script by editing those. You are gonna have to redownload it to fix it or put the callbacks back to the way they were.

It is pretty late so I got to go to bed.

Fair enough, i just reinstalled the script, and are now on my way to see if it works, ty for the help, i will let you know if it didnt :smiley: Sleep well

it will work if the script is default and the resource name is all lowercase. :v:

Well :confused: It didnt, this is my cmd

stack traceback:
        @k9/server.lua:4: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:219: in function <citizen:/scripting/lua/scheduler.lua:218>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:218: in function <citizen:/scripting/lua/scheduler.lua:182>```