Hello All, this is my first release here I hope you enjoy it!
This is an AI waypoint based taxi service, allowing players to use the /taxi command to call a taxi that will transport them to the desired location using their map marker. Players will be charged a fee based on the distance of the route which is configurable in the source/shared/shared.ts file along with several other configurable options.
QB-Target is no longer required but is recommended, using the default vehicle entry key for controller and keyboard will trigger the player to enter the back of the taxi.
Edit: GitHub now has TS source as well, added an idle timer after spawning the taxi, added option if using cash as item to show QB-Inventory item boxes.
If you download the latest version on GitHub I have removed the need for qb-target and made it possible to enter the taxi using the âfâ key or âyâ button.
Seems to be a bug Iâve introduced in a recent push. Will investigate this when Iâm back at the computer, and let you know to pull the repo again. Should have a fix for this tonight.
Sorry for the long delay, I have been doing other projects.
Youâll need to figure out what the export or event is that your fuel script uses for setting fuel for vehicles, then call it after the vehicle is spawned on the client side.
go into zc-aitaxi/source/client/client.ts
Approx. line #: 139
if(thisTaxi == null) {
thisTaxi = CreateVehicle(Config[0][âTaxiCabHashâ], vehicleSpawn[0], vehicleSpawn[1], vehicleSpawn[2], vehicleHeading, true, true);
//Exports[âyour_fuel_scriptâ].setFuel(thisTaxi, 100); or you could put an event emitNet(âfuel_script_event:server:setFuelâ, thisTaxi, 100);
} else {DebugLog("There is already a taxi Entity ID: " + thisTaxi);}
hello i have a problem that when i want to access the cab it does not open the doors and i can not find where to modify the values to let me get into the vehicle. if someone can help me i would appreciate it.
The event is initially triggered if the player is within entry range of the taxi and presses the âYâ button on a game pad or the vehicle entry control key.
That function is defined at approx. line # 60 in source/client/client.ts and the event is being triggered at approx. line # 70.
The function gets called and starts checking for proximity between the player and cab coordinates once the player and cab are close enough if the player presses the vehicle entry key or button then the player is placed in the rear of the vehicle.
The event that it is calling is being defined at approx. line # 182 in source/client/client.ts
Also, make sure that you have the taxi cab defined as an unlocked vehicle in the qb-vehiclekeys resource.