Jump to content

🚖 Better taximeter to use instead of the broken one in-game


Recommended Posts

Let's start this with a bold statement  - the scripted taximeter in-game sucks. It's buggy and usually stops counting in the middle of a ride and it only gives you minimal control.

 

So I came up with a solution that is totally a quality-of-life thing! A taximeter coded into a HTML file that's easy to use and reliable!

 

You have control over:

  • Start fee
  • Price per 5 seconds
  • Minimum charge

 

Usage instructions

Spoiler

1. Download the .zip file and unpack it.

2. Double click on taximeter.html to open the web application. 

3. Change the values in Taximeter settings to your preference or stick with the default ones. Remember to save your settings!

4. Click Start Taximeter to begin counting the total price of the ride. It functions just like the taximeter in-game.

 

Defer from moving the taximeter.html file out of the folder it is in! This results in the taximeter being broken as the MDBootstrap framework and jQuery references will not function any longer. 

 

Images: 

Spoiler
Spoiler

wMzlIk1.png

1rd52I3.png

JRbI4YM.png

 

Remember to use a /do to notify your passengers of your rates (RP gluing a note onto your dashboard etc.)!

 

Download:

https://www.mediafire.com/file/bbwwqjnb20rfdjl/Better_taximeter_for_GTAW.zip/file

 

Source code (taximeter.html):

Spoiler
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./assets/mdb/mdb.min.css">
    <title>Better taximeter</title>
</head>
<body>
    <nav class="navbar navbar-light bg-light">
        <div class="container-fluid">
          <span class="navbar-brand mb-0 h1">Better taximeter</span>
        </div>
      </nav>
    <div class="container-fluid">
            <div class="row mt-5">
                <div class="col-md-3 border-end mb-3">
                    <h4 class="border-bottom">Taximeter settings</h4>
                    <div class="form-outline mt-3">
                        <input type="number" id="minCharge" min="0" value="500" class="form-control"/>
                        <label class="form-label" for="minCharge">Minimum charge</label>
                    </div>
                    <div class="form-outline mt-3">
                        <input type="number" id="startFee" min="0" value="100" class="form-control"/>
                        <label class="form-label" for="startFee">Start fee</label>
                    </div>
                    <div class="form-outline mt-3">
                        <input type="number" id="pricePer5" min="0" value="35" class="form-control"/>
                        <label class="form-label" for="pricePer5">Price per 5 sec.</label>
                    </div>
                    <button type="button" id="saveSettings" class="btn btn-info w-100 fw-bold mt-3">Save settings</button>
                </div>
                <div class="col-md-9 text-center">
                    <h6 class="text-center fw-bold">TAXIMETER <span id="taximeterStatus" class="text-danger">STOPPED</span></h6>
                    <h1 class="text-center">Total - $<span id="taximeterTotal">0</span></h4>
                        <button type="button" id="taximeterStart" class="btn btn-success w-25 fw-bold mt-5">Start taximeter</button>
                       
                        <button type="button" id="taximeterStop" class="btn btn-danger w-25 fw-bold mt-5" hidden>Stop taximeter</button>
                </div>
            </div>
        </div>
<script src="./assets/mdb/mdb.min.js"></script>
<script src="./assets/jquery/jquery-3.6.0.min.js"></script>
 
<script>
 
let taximeterStatus = "stopped";
let taximeterTotal = 0;
let minCharge = $("#minCharge").val();
let pricePer5 = $("#pricePer5").val();
let startFee = $("#startFee").val();
var fareCountInterval;
 
$("#saveSettings").click(function() {
minCharge = $("#minCharge").val();
pricePer5 = $("#pricePer5").val();
startFee = $("#startFee").val();
 
alert("Taximeter settings saved!")
});
 
$("#taximeterStart").click(function() {
    taximeterStatus = "running";
    $("#taximeterStart").attr("hidden", true);
    $("#taximeterStop").attr("hidden", false);
    $("#taximeterStatus").text(taximeterStatus.toUpperCase())
    $("#taximeterStatus").removeClass("text-danger");
    $("#taximeterStatus").addClass("text-success");
    taximeterTotal += parseInt(startFee);
    $("#taximeterTotal").text(taximeterTotal);
    fareCountInterval = setInterval(() => {
        countFare();
    }, 5000);
});
 
$("#taximeterStop").click(function() {
    taximeterStatus = "stopped";
 
    $("#taximeterStart").attr("hidden", false);
    $("#taximeterStop").attr("hidden", true);
    $("#taximeterStatus").text(taximeterStatus.toUpperCase())
    $("#taximeterStatus").addClass("text-danger");
    $("#taximeterStatus").removeClass("text-success");
    clearInterval(fareCountInterval);
 
    if (taximeterTotal <= minCharge) {
        $("#taximeterTotal").text(parseInt(minCharge))
    }  
    taximeterTotal = 0;
});
 
function countFare() {
    taximeterTotal += parseInt(pricePer5);
    $("#taximeterTotal").text(taximeterTotal);
}
 
</script>
 
<script>
document.querySelectorAll('.form-outline').forEach((formOutline) => {
    new mdb.Input(formOutline).init();
});
</script>
</body>
</html>

 

Edited by MarcusD
  • Upvote 1
  • Applaud 3
Link to comment
  • vbxa changed the title to 🚖 Better taximeter to use instead of the broken one in-game
  • 1 year later...
3 hours ago, Agent said:

new link please.

I would determain a Range Quote, on a piece of paper and show it to your customer, like 0-2km Price X 2-5 price Y and over 5km max price

less hassle.
I don' mind paying fucktons to a taxidriver but when they put on the meter I just get annoyed hahah

 

Link to comment

There is already a taxi revamp incoming, so it's easy to assume the taximeter has already been considered.

 

On a different note, the vast majority of the taxis I used / RP'd with do not use a pay-per-5-seconds as it is inherently unoptimal if you're trying to RP through the ride, it'll artificially increase the price and subsequently lead to fewer interactions which can kind of ruin the customer-driver vibe. 

 

A price per range would be ideal which is what companies already do (e.g. Habeeb Taxis, 300$ in-city, 500$ city-to-sandy & 600 city-to-paleto iirc, those are old fares I used to apply when working there a year or two ago.)

Link to comment
3 hours ago, HappyPancake said:

There is already a taxi revamp incoming, so it's easy to assume the taximeter has already been considered.

 

On a different note, the vast majority of the taxis I used / RP'd with do not use a pay-per-5-seconds as it is inherently unoptimal if you're trying to RP through the ride, it'll artificially increase the price and subsequently lead to fewer interactions which can kind of ruin the customer-driver vibe. 

 

A price per range would be ideal which is what companies already do (e.g. Habeeb Taxis, 300$ in-city, 500$ city-to-sandy & 600 city-to-paleto iirc, those are old fares I used to apply when working there a year or two ago.)

Exactly!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...