My friends and I are doing police roleplay on my server and we’re getting pretty tired of half the NPCs in the area shooting at our cops every time they gun down another player.
Is there an easy way to stop all NPCs from becoming aggressive towards players’ gunshots? I’m not necessarily trying to stop NPCs from becoming aggressive altogether, but if that’s a side effect then I’m OK with that.
@Vespura At first I thought it was working due to a bug in another script. But now It seems it’s actually not. Does anything need to be put between the brackets after “PlayerId”? Basically want it to apply to every player on the server.
Try this code, it will verify if the player is inside the area “Sandy Shores”.
while true do
if IsEntityInZone(GetPlayerPed(-1), "SANDY") then
Error parsing script client.lua in resource d91NoAgro: client.lua:7: 'then' expected near 'SetEveryoneIgnorePlayer'
@BlueJ vBasic doesn’t have any settings related to ped aggressiveness as far as I can see. I’ve used it in the past and didn’t notice any difference with peds. It’s more likely your trainer if you use one.
Strange thing is that both @ghosty and @Vespura’s code doesn’t seem to work. NPCs still pay full attention to me and freak out or attack when I fire weapons or attack someone. I get the impression that the function has been renamed or maybe even removed in the latest version of the FiveM framework.
Are you guys sure that that’s all that needs to be in the client.lua? I’m pretty sure I’ve set up the __resource.lua properly.
Alright, so still can’t get it to work. Here’s what I’ve got:
while true do
I fire guns or punch a ped and other peds around still react.
Anyone able to successfully target ambient vagos? I’m able to set ballas friendly towards player ballas, and marabunta friendly towards player marabunta, but for some reason vagos isn’t seeming to work. I’ve tried using ‘AMBIENT_GANG_MEXICAN’, ‘AMBIENT_GANG_SALVA’. Is there no ‘AMBIENT_GANG_VAGOS’?