[Release] Toni's Baitcar Script

Hello Everyone!

This morning I’m releasing a Baitcar script I created for my previous community.

USAGE:

/lockbc (serverid)

/unlockbc (serverid)

WARNING: Currently this script has no method of checking to see if the issuing player is “a cop” or not, you will need to add that part in to meet your needs as i don’t feel like spending hours making this work with 10 different scripts.

INSTALL: This is Standalone and uses no other scripts, just download it and throw it into your server’s resources.

DOWNLOAD:

Feel free to rip this apart and make something better if you wish. if you just download this and use it please credit me somewhere :heart:

SCREENSHOTS:

To Be Retaken

5 Likes

Great script! there’s only one bug that I found. Once the vehicle is disabled and the doors are locked…if the person trys to get out of the vehicle the car starts back up and the person can drive away.

to fix that toni set the engine health to 0 as well as turn the engine off

Updated on github & .ZIP Download

cool and nice script btw

What is the server id? Do you mean player id?

Yes, The Player’s Server ID (or playerid) the same ids you use in most scripts.

Cool! Yea for some reason, it knows the command but nothing happens.

Are you using FXServer? or the old Cfx-Server?

Cfx server. Please dont tell me I need fx

It should technically still work on Cfx. Though yeah eventually things will break on cfx server.

I personally only can say for 100% sure the script works on FXServer but i don’t see a reason why it wouldn’t work on Cfx

There is a bug that… if the player happens to be moving at any speed even 1mph the baitcar says its active… but the car still drives.

Not Sure why that’s happening, I personally haven’t had this issue, Very odd indeed. Have you tried the updated version since the original post? That one will disable the engine completely rather than just shutting it off.

1 Like

@sobo @ToniMorton Yea I have the same problem on my Cfx server. It registers as a command but the pop-up messages don’t pop-up nor does the car stop and lock.

It does the same thing for me as well, I just added the line:

FreezeEntityPosition(Vehicle, true) Then FreezeEntityPosition(Vehicle, False)

Not a fix but it will freeze the player.

Not exactly sure why cfx server is having such an issue with this.

Those of you who are still running it use

For now, consider updating to fxserver as soon as possible as it seems to work mostly flawlessly on that.

If anyone is having any issues with the script of fxserver do let me know asap and i will see what i can do!

Great script, would appreciate if you could add some screenshots of the notification the officer receives when the bait car is entered, exited, etc…

@ToniMorton So I have now updated to an FX server and I am still having the same problem where the commands do nothing, and the console is giving me errors. I also have no idea what the errors mean.

Same error in chat box.

Error from Server:
https://gyazo.com/1808ac707563fc4ac7efbb9050fc7860

Yea I get those errors too, but as of now the bait car script is the only script now working on either of my servers cfx and fx. I even tried adding the line that @DementedDude said, but it still does the same thing, not even the message pops up, so it must be something else in the script.