10 905
243
10 905
243
We all know about how them barrier arms aren't really all that responsive (if at all). This mod makes it so the toll booth arm and barrier arm open when the player is near (in a vehicle).
Surprised this hasn't been done before (I've scoured but did not see any results). Very simple script, look for nearby barrier arms, if player is in car and nearby then open, otherwise close.
Not overly tested, please provide feedback. Don't mind the fps, I have a pop config I need to work on and tweak. Also only tested on game v 1868.0.
NOTE: forgot to mention, the toll booths in the airport don't have moving scripts or parts for some odd reason. I'll look into what kind of object they are later and see if they can be removed/replaced via scripts.
If not, then I guess any ymap editor could replace those arms and as long as you set it to the same ones like in the movie lot, they'll work the same.
Side note, the scope of this mod will not be to make it so immersive you need to check in with the guy in the booth. I've posted the forum post with the code and will continue to update it with the latest code. If you want to rummage through it to solve certain ideas to make the above mentioned mod then suit yourself.
============================
Requirements
SHV, SHVDN (3.0.4)
============================
Installation
Just drop the dll into your scripts folder.
============================
Bugs
* The toll booth arm at the movie lot is positioned weirdly (R* not me) so the detection can be ran on both when exiting the lot.
* Didn't test the military facility before I release but the rear barriers towards the north-west do not open. This is because its a different gate type. The gates on the other side should work normally but they have a second set of gates so lore wise it shouldn't matter.
* The code is written to detect player distance in the vehicle. Just tested and with a normal semi trailer its closes just after you pass through. However, if you halt, it will unrealistically (maybe realistically - dunno never driven a semi through a toll) come down on the trailer.
Though since the new update, there is a range set in place that now I can add a wait to the close portion to give it ample time for the semi trailer to pass through.
============================
Credit
Help from @Jitnaught & @R3QQ to help clean up and understand coding.
============================
Releases
v 1.0.0 - initial release, realized it only detects player. only affects the toll booth arms and barrier arms like the one you see around the movie lot. Army base unaffected and the static ones at the airport parking is also excluded.
v 1.0.1 - included pedestrian detection (up to 75f units in game, meters?). Added speed detection for peds so if being chased, theres still a good chance the peds won't break the barrier. Player range remains unchanged.
Surprised this hasn't been done before (I've scoured but did not see any results). Very simple script, look for nearby barrier arms, if player is in car and nearby then open, otherwise close.
Not overly tested, please provide feedback. Don't mind the fps, I have a pop config I need to work on and tweak. Also only tested on game v 1868.0.
NOTE: forgot to mention, the toll booths in the airport don't have moving scripts or parts for some odd reason. I'll look into what kind of object they are later and see if they can be removed/replaced via scripts.
If not, then I guess any ymap editor could replace those arms and as long as you set it to the same ones like in the movie lot, they'll work the same.
Side note, the scope of this mod will not be to make it so immersive you need to check in with the guy in the booth. I've posted the forum post with the code and will continue to update it with the latest code. If you want to rummage through it to solve certain ideas to make the above mentioned mod then suit yourself.
============================
Requirements
SHV, SHVDN (3.0.4)
============================
Installation
Just drop the dll into your scripts folder.
============================
Bugs
* The toll booth arm at the movie lot is positioned weirdly (R* not me) so the detection can be ran on both when exiting the lot.
* Didn't test the military facility before I release but the rear barriers towards the north-west do not open. This is because its a different gate type. The gates on the other side should work normally but they have a second set of gates so lore wise it shouldn't matter.
* The code is written to detect player distance in the vehicle. Just tested and with a normal semi trailer its closes just after you pass through. However, if you halt, it will unrealistically (maybe realistically - dunno never driven a semi through a toll) come down on the trailer.
Though since the new update, there is a range set in place that now I can add a wait to the close portion to give it ample time for the semi trailer to pass through.
============================
Credit
Help from @Jitnaught & @R3QQ to help clean up and understand coding.
============================
Releases
v 1.0.0 - initial release, realized it only detects player. only affects the toll booth arms and barrier arms like the one you see around the movie lot. Army base unaffected and the static ones at the airport parking is also excluded.
v 1.0.1 - included pedestrian detection (up to 75f units in game, meters?). Added speed detection for peds so if being chased, theres still a good chance the peds won't break the barrier. Player range remains unchanged.
Первая загрузка: 10 сентября 2020
Последнее обновление: 12 сентября 2020
Последнее скачивание: 42 минуты назад
96 комментариев
More mods by dimedius:
We all know about how them barrier arms aren't really all that responsive (if at all). This mod makes it so the toll booth arm and barrier arm open when the player is near (in a vehicle).
Surprised this hasn't been done before (I've scoured but did not see any results). Very simple script, look for nearby barrier arms, if player is in car and nearby then open, otherwise close.
Not overly tested, please provide feedback. Don't mind the fps, I have a pop config I need to work on and tweak. Also only tested on game v 1868.0.
NOTE: forgot to mention, the toll booths in the airport don't have moving scripts or parts for some odd reason. I'll look into what kind of object they are later and see if they can be removed/replaced via scripts.
If not, then I guess any ymap editor could replace those arms and as long as you set it to the same ones like in the movie lot, they'll work the same.
Side note, the scope of this mod will not be to make it so immersive you need to check in with the guy in the booth. I've posted the forum post with the code and will continue to update it with the latest code. If you want to rummage through it to solve certain ideas to make the above mentioned mod then suit yourself.
============================
Requirements
SHV, SHVDN (3.0.4)
============================
Installation
Just drop the dll into your scripts folder.
============================
Bugs
* The toll booth arm at the movie lot is positioned weirdly (R* not me) so the detection can be ran on both when exiting the lot.
* Didn't test the military facility before I release but the rear barriers towards the north-west do not open. This is because its a different gate type. The gates on the other side should work normally but they have a second set of gates so lore wise it shouldn't matter.
* The code is written to detect player distance in the vehicle. Just tested and with a normal semi trailer its closes just after you pass through. However, if you halt, it will unrealistically (maybe realistically - dunno never driven a semi through a toll) come down on the trailer.
Though since the new update, there is a range set in place that now I can add a wait to the close portion to give it ample time for the semi trailer to pass through.
============================
Credit
Help from @Jitnaught & @R3QQ to help clean up and understand coding.
============================
Releases
v 1.0.0 - initial release, realized it only detects player. only affects the toll booth arms and barrier arms like the one you see around the movie lot. Army base unaffected and the static ones at the airport parking is also excluded.
v 1.0.1 - included pedestrian detection (up to 75f units in game, meters?). Added speed detection for peds so if being chased, theres still a good chance the peds won't break the barrier. Player range remains unchanged.
Surprised this hasn't been done before (I've scoured but did not see any results). Very simple script, look for nearby barrier arms, if player is in car and nearby then open, otherwise close.
Not overly tested, please provide feedback. Don't mind the fps, I have a pop config I need to work on and tweak. Also only tested on game v 1868.0.
NOTE: forgot to mention, the toll booths in the airport don't have moving scripts or parts for some odd reason. I'll look into what kind of object they are later and see if they can be removed/replaced via scripts.
If not, then I guess any ymap editor could replace those arms and as long as you set it to the same ones like in the movie lot, they'll work the same.
Side note, the scope of this mod will not be to make it so immersive you need to check in with the guy in the booth. I've posted the forum post with the code and will continue to update it with the latest code. If you want to rummage through it to solve certain ideas to make the above mentioned mod then suit yourself.
============================
Requirements
SHV, SHVDN (3.0.4)
============================
Installation
Just drop the dll into your scripts folder.
============================
Bugs
* The toll booth arm at the movie lot is positioned weirdly (R* not me) so the detection can be ran on both when exiting the lot.
* Didn't test the military facility before I release but the rear barriers towards the north-west do not open. This is because its a different gate type. The gates on the other side should work normally but they have a second set of gates so lore wise it shouldn't matter.
* The code is written to detect player distance in the vehicle. Just tested and with a normal semi trailer its closes just after you pass through. However, if you halt, it will unrealistically (maybe realistically - dunno never driven a semi through a toll) come down on the trailer.
Though since the new update, there is a range set in place that now I can add a wait to the close portion to give it ample time for the semi trailer to pass through.
============================
Credit
Help from @Jitnaught & @R3QQ to help clean up and understand coding.
============================
Releases
v 1.0.0 - initial release, realized it only detects player. only affects the toll booth arms and barrier arms like the one you see around the movie lot. Army base unaffected and the static ones at the airport parking is also excluded.
v 1.0.1 - included pedestrian detection (up to 75f units in game, meters?). Added speed detection for peds so if being chased, theres still a good chance the peds won't break the barrier. Player range remains unchanged.
Первая загрузка: 10 сентября 2020
Последнее обновление: 12 сентября 2020
Последнее скачивание: 42 минуты назад
Cool new version is up and includes detection of Ped drivers. Detection range set at 2 different values based on how fast the ai is driving. Them ramming the barrier will still happen if they are driving overly fast but I think at that point it doesn't matter (test conducted during wanted chase).
@dimedius Ah right, yeah those ones seem to never open, and I cannot understand why Rockstar made them that way given you puchase the place in single player.
Awesome! Could you also do this for house gates as well?
Thank you! House gates would be awesome too
@NaughtyBoy I did some more digging and I've noticed on mine that when an ai is around the barrier at the same time as you, it makes it not work for you temporarily. This was discovered at the Richards Majestic lot. Investigating this bit.
@eXoud might be something I do in a separate mod down the road. Have you tried https://www.gta5-mods.com/scripts/toggle-closest-vehicle-door or ask to see if that author would include it in his mod?
@dimedius now its working weird btw, can you include on the next update a setting to not show the pop up message? for disabling it because i use with LSPDFR and its annoying.
@NaughtyBoy I'm not sure what to say, I don't have any pop up messages enabled for the mod (I do for the wip version but its all taken out when ready to upload. Also just double checked the code and theres nothing in there about messages). Do you use any other mods that are for doors?
@dimedius i mean the notification area where it says: Toggle door press Page UP. that's what i am talking to disable.
@NaughtyBoy Correct, I don't have any code to include any sort of messages or toggling. The current build is based on distance and should be handled via automation.
I noticed there is a huge FPS drop when using this script along with LSPDFR.
@unitedOrange66 apologies, I don't use LSPDFR so no way to test for compatibility.
I am looking into some of my script releases and looking to see if theres a better way to optimize the code or make it work better. With that said, I didn't much of a performance hit with vanilla.
I also did notice huge fps drops when using this script unfortunately 😔
Works great for me, more immersive!
Since the latest update this has completely removed all traffic lights for me & removes gates entirely at the airport but prior to that it was brilliant!
Nice dude, but is it possible to let the barriers work if you build one in Map Editor? I tried it but it didn't work...
Would be nice if anyone could help ;)
Any chance this could be updated?
How can i use this as an Fivem Script?
@dimedius Any way you could have this work with the Chain Fence Gates too? (Big Sliding Gates found all over the map) None of those open unless you ram them first, and nobody has made anything to fix that issue either.
Seems to work fine for me September 2024, It doesn't remove any traffic lights as someone mentioned above. It doesn't work on ALL barriers such as Vespucci Helipad, but it does on 95% of the rest. Great mod!
Same as @BurgessGaming said, all is good for me with the last game update. Works great at the beginning of October. Cool script, thanks to the author 👍
It always annoyed me when this barriers not opened when I drive through them. Now this is solved! 👍