[Release] K9 Script [REMOVED]

alright thank you for helping me

Error running system event handling function for resource k9-master: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:10: attempt to index a nil value (global ‘K9Config’)
stack traceback:
server.lua:10: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
hitch warning: frame time of 186 milliseconds
Error running system event handling function for resource k9-master: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:10: attempt to index a nil value (global ‘K9Config’)
stack traceback:
server.lua:10: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
Error running system event handling function for resource k9-master: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: server.lua:10: attempt to index a nil value (global ‘K9Config’)
stack traceback:
server.lua:10: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138

now i get this error in console

Show me your config… Posting just error doesn’t help me understand that…

K9Config = {}
K9Config = setmetatable(K9Config, {})

K9Config.OpenMenuIdentifierRestriction = true
K9Config.OpenMenuPedRestriction = false
K9Config.LicenseIdentifiers = {
“license:c06fbf1faaf995c7b9e207ef77712971a3ed4dc3”
}
K9Config.SteamIdentifiers = {
“steam:example”,
“steam:example”
}
}
K9Config.PedsList = {
“s_m_y_cop_01”,
“s_m_y_sheriff_01”
}

– Restricts the dog to getting into certain vehicles
K9Config.VehicleRestriction = false
K9Config.VehiclesList = {

}

– Searching Type ( RANDOM [AVAILABLE] | VRP [NOT AVAILABLE] | ESX [NOT AVAILABLE] )
K9Config.SearchType = “Random”
K9Config.OpenDoorsOnSearch = true

– Used for Random Search Type –
K9Config.Items = {
{item = “Cocaine”, illegal = true},
{item = “Marijuana”, illegal = true},
{item = “Blunt Spray”, illegal = false},
{item = “Crowbar”, illegal = false},
{item = “Lockpicks”, illegal = false},
{item = “Baggies”, illegal = false},
{item = “Used Needle”, illegal = false},
{item = “Open Container”, illegal = false},
}

– Language –
K9Config.LanguageChoice = “English”
K9Config.Languages = {
[“English”] = {
follow = “Come”,
stop = “Heel”,
attack = “Bite”,
enter = “In”,
exit = “Out”
}
}

How did you install the resource… For some reason it is saying K9Config doesn’t exist… I have not updated this at all and everyone else`s resources are fine. I doubt it would be any different for you if it was installed properly I really don’t know how it manages to be fine and then you change a config table and now the table doesn’t exist…?

put it in my resource folder and put it in the config

Redownload and reinstall it and don’t touch anything just launch.

the only thing i did was remap the buttons which worked then after i put the new steam ids from that code you sent me it stopped working

Post the config again… this time using the actual code block and not just copy paste it.

K9Config = {}
K9Config = setmetatable(K9Config, {})

K9Config.OpenMenuIdentifierRestriction = true
K9Config.OpenMenuPedRestriction = false
K9Config.LicenseIdentifiers = {
	"license:c06fbf1faaf995c7b9e207ef77712971a3ed4dc3"
}
K9Config.SteamIdentifiers = {
    "steam:110000117bc6801",
    "steam:11000013361ee0f"
}
}
K9Config.PedsList = {
	"s_m_y_cop_01",
	"s_m_y_sheriff_01"
}

-- Restricts the dog to getting into certain vehicles
K9Config.VehicleRestriction = false
K9Config.VehiclesList = {
	
}

-- Searching Type ( RANDOM [AVAILABLE] | VRP [NOT AVAILABLE] | ESX [NOT AVAILABLE] )
K9Config.SearchType = "Random"
K9Config.OpenDoorsOnSearch = true

-- Used for Random Search Type --
K9Config.Items = {
	{item = "Cocaine", illegal = true},
	{item = "Marijuana", illegal = true},
	{item = "Blunt Spray", illegal = false},
	{item = "Crowbar", illegal = false},
	{item = "Lockpicks", illegal = false},
	{item = "Baggies", illegal = false},
	{item = "Used Needle", illegal = false},
	{item = "Open Container", illegal = false},
}

-- Language --
K9Config.LanguageChoice = "English"
K9Config.Languages = {
	["English"] = {
		follow = "Come",
		stop = "Heel",
		attack = "Bite",
		enter = "In",
		exit = "Out"
	}
}

I found it. You copy pasted the one I posted over the other and not the whole thing

THIS

K9Config.SteamIdentifiers = {
    "steam:110000117bc6801",
    "steam:11000013361ee0f"
}
}

SHOULD BE

K9Config.SteamIdentifiers = {
    "steam:110000117bc6801",
    "steam:11000013361ee0f"
}

okay thanks for the help man

Cant fiure this out for hte life of me. I did the steam and the liscnse but it doesnt spawn when i type /k9 spawn …:(((((

For some reason when i used this it messed up my esx_identity screen ( not been able to click anything on the identity screen )

Because thats not how it works…

I didn’t make support for ESX. I don’t use ESX or tried it. That’s all on you to figure out.

yeah i see that was an old way apparently. Ive also tried to set it to cntrl+z and nothing happens. nothing happened when i would hit cntrl+home either. Is this ESX only?

I dont think so @davewazere ??

So this is vRP? im not sure what im doing wrong, added a bunch of cop_ped code

K9Config.PedsList = {
	"s_m_y_cop_01",
	"s_m_y_sheriff_01",
	"S_M_Y_Cop_01_p",
	"S_M_Y_HwayCop_01",
	"S_M_Y_HwayCop_01_p",
	"S_M_Y_Ranger_01",
	"S_M_Y_Ranger_01_p",
	"S_M_Y_Swat_01"
}

changed the button press

        -- Trigger Opens Menu
        if IsControlPressed(1, 19) and IsControlJustPressed(3, 172) then
            TriggerServerEvent("K9:RequestOpenMenu")
        end

Hey i am head of k9 on my server and we are looking for a script and saw this did you get all of the kinks worked out? and put in the search vehicle stuff? @xander1998