Currently the developers are putting their own money into JC2-MP to keep the servers online.

Please take a few seconds of your time and disable your AdBlock plugin for our website.

Ad revenue is not going to developers, it is used purely for covering our hosting costs.

 

You are also free to donate, which removes all ads from our website!

Patch 0.3 was just released! Full changelog here: https://t.co/4A50m6IKen

2 years ago

Advertisement
July 19, 2019, 05:51:02 am

Author Topic: TaxiDrivers - Drive people across Panau to earn money  (Read 2945 times)

ING

  • Donator
  • Full Member
  • *****
  • Posts: 147
    • View Profile
TaxiDrivers - Drive people across Panau to earn money
« on: January 16, 2014, 04:57:59 pm »
A(nother) Taxi Script with a bit more functionality, how it works...

  • You only earn money if you drive your passenger away from the point where he enters. height and driving in circles doesn't count
  • The driver received a tax every x meters (default: 500), the default price for a kilometer is 10$
  • If a passenger exits your taxi, you get a bonus, depending on the distance and average speed of the ride. if you leave your taxi while passengers inside, you don't get a bonus
  • If a passenger have not enough money to pay you, he got kicked out
  • To avoid drivers are boosting away to farm money, there is a max velocity (default: 250 km/h). if your average speed is faster, you don't get your money!
  • By default, the passenger has to pay nothing, otherwise nobody would use it, i think. You can easily change it be edit the variables in the head of the script (see below)


(i love to drive myself around^^)

Download ZIP | Github Repo



The settings in the head of the script...

Code: Lua
  1. -- vehicle ID's that can be used as a taxi, leave empty to enable all vehicles
  2. vehicles          = {8, 9, 12, 22, 23, 41, 66, 70}
  3.  
  4. -- main settings, the money system works with integers! avoid to produce payout values < 0.5
  5. price             = 10   -- price per kilometer
  6. payBonus          = true -- pay out a bonus when the passenger leave the taxi
  7.  
  8. update            = 2    -- defines the time in seconds between the script checks if a driver earned money
  9. distancePayOut    = 500  -- the distance in meters for every payout the taxes
  10. maxVelocity       = 250  -- the max velocity in km/h, if the driver was faster, no money paid out. it use the average speed for the last <distancePayOut> meters
  11.  
  12. -- defines how much the passenger have to pay of the taxes, all values are multiplier!
  13. -- is the value 0.5, the passenger have to pay the half of the taxes, is it 1 the whole tax and so on...
  14. passengerTax      = 0
  15. passengerBonusTax = 0
  16.  
  17. -- values to calculate the bonus
  18. -- formula: (drivenKM * bonusDistWeight) * (averageKMH * bonusTimeWeight) * bonusMultiplier
  19. bonusMultiplier   = 0.5
  20. bonusDistWeight   = 1
  21. bonusTimeWeight   = 0.5
  22.  
  23. chatTextColor1    = Color(255, 255, 155) -- color for normal messages
  24. chatTextColor2    = Color(255, 55, 55)   -- color for warnings
  25. chatPrefix        = "[Taxi] "

WPK-Wolfseye

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: TaxiDrivers - Drive people across Panau to earn money
« Reply #1 on: January 17, 2014, 02:59:54 pm »
Its kinda fun. ;)


Could you somehow make it possible that the vehicle gets deleted the moment someone for example kills the driver, just to get the car ? Like in Panau Drivers script, for each job a vehicle gets provided and as soon as, for whatever reason, the driver falls out of the car, the vehicle is gone and in the case of that script the job is also over.


If you could prevent a "taxi fare" from killing the driver to get the vehicle, that would be nice. If possible. ;)


Wolfseye


ING

  • Donator
  • Full Member
  • *****
  • Posts: 147
    • View Profile
Re: TaxiDrivers - Drive people across Panau to earn money
« Reply #2 on: January 17, 2014, 09:28:38 pm »
i made some changes / additions to the script...

  • If the driver dies, all passengers will be ejected, the car is setting on fire and will explode after some seconds as usual
  • When a passenger dies in the taxi, the driver has to pay back all money he earned from that passenger plus a penalty (default: 100$)
  • The script shows more informations in the chat window
  • Fixing a little exploit that let drivers earn more money as they deserve
  • Some code improvements

WPK-Wolfseye

  • Full Member
  • ***
  • Posts: 209
    • View Profile
Re: TaxiDrivers - Drive people across Panau to earn money
« Reply #3 on: January 18, 2014, 07:46:16 pm »
Quote
When a passenger dies in the taxi, the driver has to pay back all money he earned from that passenger plus a penalty (default: 100$)

Dies by outside force or killed by the Taxi driver or its vehicle ? Because that way it could be just some **** that is bored and kills people. Nothing related to the driver.

What in that case ?

Wolfseye

SonnySalieri

  • Full Member
  • ***
  • Posts: 189
    • View Profile
Re: TaxiDrivers - Drive people across Panau to earn money
« Reply #4 on: February 18, 2014, 04:15:01 pm »
This is good for rp servers that dont want to add the taxi "job" to a company (faction).
Limo and Bus driver "jobs" can be also made out of this.
Is this in any servers yet?

------------------------------

https://github.com/salieri101/Bus_Drivers-Limo_Drivers
« Last Edit: February 19, 2014, 04:55:49 pm by SonnySalieri »

Fuck_Younicorn

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: TaxiDrivers - Drive people across Panau to earn money
« Reply #5 on: March 08, 2014, 08:55:42 pm »
I Added this to my server and noticed it pays the driver $5 instead of $10 per km and the money he is paid isn't coming from the passenger, the money just comes from nowhere. The passenger has a cost of $0 per km is what it says.

I've been trying to fix this, any help?

misterff1

  • Donator
  • Hero Member
  • *****
  • Posts: 582
    • View Profile
Re: TaxiDrivers - Drive people across Panau to earn money
« Reply #6 on: March 09, 2014, 01:05:41 pm »
I'd love to use this, but the script is spamming the chat dude! Could you put those messages centered below or something and not in the chat? Because my server has alot of chat messages and those will be gone within seconds because of this script now.