[Release] Police Buddy

hey mate testing this out on my server and we have found that the " buddy doesnt follow us

That’s odd, any errors?

Also everyone, if you have any 3rd party script that changes/edits the AI, it could interfere with the script.

no errors

What artifacts version are you on?

Does the AI police officer engage other players?

1 Like

I think this resource is a great idea to have on RP servers, I just had one question about it. So after testing it works great I was just wondering if there is a way that I can add multiple ped options for the buddy, so with that being said is that a thing or can it become a thing?

1 Like

Absolutely! I am actively working on updates, one can be expected within the next few days. It will have a fully customization menu that you are able to add as many peds as you would like inside the config file.

1 Like

Other Feature:

  • Police Buddy will hold a weapon if he detects the local player holding a weapon.
  • You cannot hurt your police friend (at least with a weapon).
1 Like

Hey !

Actually when i place the script and start it, it says “Resource PoliceBuddy does not specify an fx_version in fxmanifest.lua.”

And the script cant be started…

It is using the latest fxmamifest, you need to update your server artifacts to the latest version.

It should, however I did notice some bugs, they will be fixed by next update.

1 Like

This is great. I have been working on a pretty much identical version of this script (using relationship groups, blip creation, removal etc)! Although not as polished (it’s all in a Client/Server lua file) as yours.

A feature you could add that I have been playing around with, is the ability to toggle lethal/non-lethal. So basically just set the npc’s current weapon to carbine or stun-gun. I was doing something basic like this:

-- Control Ped
RegisterNetEvent('pd')
AddEventHandler('pd', function(p)
	
	local selectedWeaponNum = string.lower(p)
	local selectedWeapon = "WEAPON_STUNGUN"
	
	if(pedExists == true) then
	
		if(selectedWeaponNum == "1") then selectedWeapon = "WEAPON_STUNGUN"
		elseif(selectedWeaponNum == "2") then selectedWeapon = "WEAPON_COMBATPISTOL"
		elseif(selectedWeaponNum == "3") then selectedWeapon = "WEAPON_CARBINERIFLE"
		end
		
		SetCurrentPedWeapon(spawnedPed, GetHashKey(selectedWeapon), False)		

	end
end )

Though you have to put your own weapon away and get it out for it the npc’s to update - I expect you could just tell the npc to put their weapon away and get it out though after setting the current one.

This is particularly useful when we use FivePD, as then the npc doesn’t automatically kill any suspects that get aggro-ed, though after enough tazer shots they do often succumb (I would imagine their heart cannot take that much electricity).

1 Like

Awesome! I have been working on something similar, it will now only kill other AI when they are armed, if they aren’t, it will simply stun them. Update coming soon!

1 Like

When do you think youll have an update for attacking players? But is there a way when they do, they dont attack PD

That’s the idea, they will only attack non-emergency services that are lethally threatening. I do not give any times on my updates as I don’t want to stress any obligation on myself to rush.

i had a few laugh… thanks Buddy!

1 Like

Lol, have fun!

is there away we can change what weapon the ped uses

It is not in the config yet, but you can change the hash code on the weapon line.