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?
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?
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.
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).
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.
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).
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!
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.
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.
