
This is a very simple script I cooked off overnight for myself that causes peds to react to you beeping the horn at them. When you beep the horn at them they get startled and run away. I’ve always wanted peds to react when I beep the horn on them, so they can get out of the way. Normally if you beep the horn at peds they just keep walking nonchalantly and ignore you but with this script you can actually make them skittish off and run away, if they happen to be in front of your vehicle. If you find this useful give it some stars or comment.
Features:
* Proximity-based Distance: This means the script only works within a certain distance from the ped(s). If you’re about 3-6 meters from the ped(s) the script can trigger a horn-based reaction. If they’re too far away the script won’t engage.
* Frontal-Only Triggers: This means the script gets triggered if ped(s) are roughly within a 45° cone angle in front of your vehicle but, sometimes peds on sidewalks or around your vehicle will react as well.
* I used the same animation used when you’re about to hit them with your car. If peds are within the trigger zone in front of your vehicle, the script will detect your horn, detect the peds in the reaction zone then trigger the default gta “flee” animation and make them scatter out of your way. They will just run basically.
This mod is useful specially when you’re driving in narrow alleys and/or doing a mission and all of the sudden you see peds crossing in front of you. Also works well on traffic lights, red lights, you see peds crossing…just beep the horn and you’re good to go!. Use the horn to make ’em scatter without running them over and triggering a wanted star.
MAIN REQUIREMENTS:
Script Hook V
ScriptHookVDotNet (latest nightly version)
INSTALLATION:
Just move BeepHornOnPeds.3.cs to ‘scripts’ folder.
Bugs:
– The script won’t work if you’re driving towards a whole bunch of peds at high speed while beeping the horn, that’s not gonna work. This script works if you’re driving either at slow to normal speed (hence: As if you were drving towards a narrow alley and all of the sudden a couple of peds happen to be crossing in front of you). It will NOT work if you’re driving at high speed towards them. Keep that in mind! GTA 5 NPC logic doesn’t react quickly enough to high vehicle speeds, their brains are not equipped to react that fast. Take a look at the demo video I posted for this mod, it shows the before and after.
– There may be some stubborn npc’s that won’t move even after you’ve beeped the horn at them but, those are peds that are either on the phone or taking pictures or doing something around those lines. Based on my tests some still run away, if you get close enough to them, but some do not. It is something that can be edited in the script but requires much more complex algorithm which I’m not planning on editing anytime soon. The script does the basic job anyways, which is to get peds out of your way when you beep the horn at them.
– Even though I tried to make this in such a way that only peds in front of your vehicle react, sometimes peds on sidewalks or around you will react to your honking as well but, who cares about those anyways really.
– DO NOT Beep the horn repeatedly at peds, if you do that it will just reset the ped in place (You will see peds freeze in place if you keep beeping on the horn). If you do that it will just reset the ped in place, and make them freeze constantly. What I recommend is once you’re within range of the ped just tap on the horn once and they should flee.
Credits:
JAM102970




