[Release] K9 Script [REMOVED]

This was refered to JJpro. he probably messed something up like I did.

1 Like

Ah. I see what your saying now. I got a bit confused cause i was sitting here thinking. “Have i changed anything?” Lol

Is this still working? Just downloaded it to mess around with and when I try to spawn the dog nothing happens? The menu reacts like it knows I’ve pressed an option.

Check the client console to see if there are any errors.

Soon after i get done with life stuff i will be switching the menu to a custom build NUI to make it easier to install.

No errors, I debugged it first. It seems the call isn’t working to spawn the dog.

Hm… it is working for me… weird.

What skin are you using when it works?

I just use the rottweiler and cop or sheriff ped.

s_m_y_cop_01?

20 characters

Im not 100 percent sure of what ped it is in that terms. Just the city cop one i use all the time. I put the pedlist table so that people would add in all the ones they needed as i may have left a few out.

I decided to stop being lazy and fix it for you lol. Your cfg had commas at the end of each list as if you were going to be adding more, it’s always the little things.

K9_Config = setmetatable(K9_Config, {})

K9_Config.DogModel = "A_C_Rottweiler" -- Set dog model of your choice
K9_Config.PedRestricted = true -- [true means the menu is restricted to cop peds. false means the menu can be used by everyone.]
K9_Config.VehicleRestricted = true -- [true means the dog can only get into police vehicles listed. false means he can enter any vehicle told to.]
K9_Config.GodmodeDog = true -- [true means the dog can NOT die. false means the dog CAN die.]
K9_Config.SearchSetting = "random" -- [random means it randomly generates items in the vehicle.]

K9_Config.PedList = {
	-- Police --
	"s_m_y_cop_01",
	"s_f_y_cop_01",
	-- Highway --
	"s_m_y_hwaycop_01",
	-- Sheriff --
	"s_m_y_sheriff_01",
	"s_f_y_sheriff_01",
	-- SWAT --
	"s_m_y_swat_01",
	-- Ranger --
	"s_m_y_ranger_01",
	"s_f_y_ranger_01"
}

K9_Config.VehicleList = {
	"POLICET", -- 456714581
	"FBI", -- FBI
	"FBI2", -- FBI2
	"POLICE", -- Police
	"POLICE2", -- Police2
	"POLICE3", -- POlice3
	"POLICE4", -- Police4
	"PRANGER", -- Pranger
	"RIOT", -- Riot
	"SHERIFF", -- Sheriff
	"SHERIFF2" -- Sheriff2
}

K9_Config.Items = {
	illegal = {
		"Meth",
		"Marijuana",
		"Crack Cocaine",
		"Bath Salts",
		"Heroin"
	},
	suspicious = {
		"Open Alcahol Container(s)",
		"Marijuana Seed(s)",
		"Marijuana Stem(s)",
		"Large Wad of Cash",
        "Scale",
        "Small Baggies"
	},
	legal = {
		"Dirty Socks",
		"Bag(s) of candy",
		"Empty Food Wrapper(s)",
		"Empty Cup(s)",
		"Change"
    },
}

Its a habbit of mine due to me always adding onto it. So yeah. XD.

Really dont have time to do a whole lot of fivem scripting anymore.

xander how long you been writing code?

A few years.
(20 chars)

Nice. I don’t write code very much from scratch I just grab things and change things up and upgrade it.

I usually don’t touch other peoples code as I feel I can just make one from scratch and make it my way so I have no complaints. I felt like I learned more doing it myself then looking at others work. But that is just me.

I always get permission.

You know how long I have been looking for a k9 script sense fivem came out. haha

I am removing WarMenu now and replacing it with a NUI menu.

Good cause warmenu was causing problems with my server