[FilterScript] jTaxi - A taxi driver system
#1

jTaxi - A driver system

About this script
I wrote this script for my own server, and decided to release it since a little while ago this was requested in the scripting thread alot.
It basically adds a job as taxi driver, with a nice textdraw visible for both passengers and taxi driver in the same car.
You earn money per 100 meters, the amount is configurable in the script itself.
  • Version 1.2:
If you look trough the source code, you probably notice some code that hints to custom sprite/textdraw templates for the taxi meter. This is an idea for the next version.
  • Things you can configure:
  • Money per 100 Meters
  • Enable/Disable spawn taxi command
  • Start amount for fares
  • Taxi meter layout to be used
To change the layout and appearance of the taxi meter, change the following
pawn Code:
#define DESIGN_NUMBER 2 //Change the number according to the design you want, refer to the release thread for pictures of the designs
The default design number is 2, which is the new design. Number 1 is the old design. In the next update I'll explain thoroughly how to make a new layout/appearance.
Installation
  1. Copy the includes from the archive(inside the pawno > include) folder, to your server's pawno > include folder.
  2. Copy the jTaxi.amx to your server's filterscripts folder.
  3. Add jTaxi to your server.cfg on the filterscripts line. Remember, it's case sensitive!
  4. Run the server and enjoy!
Screenshots
  • New design

  • Old design

Commands
  • /duty - This will give you on/off duty status. You have to be on duty in order to use the /fare command.
  • /fare - This command can only be used when there is a passenger in the car, it will count the distance you drive and the price the customer has to pay.
  • /spawntaxi - Will spawn a taxi for you to drive at your location (if this command is enabled)
Suggestions for the next update
  • /fare command (to set the fee price yourself) [Ready - In the next update]
  • Choice between distance payment or time payment [Ready - In the next update]
  • Add /service taxi command so that players can call taxi's
  • Possibility for taxi drivers to take a call
Bugs
  • No bugs have been reported yet, if you find one, please post it, and I will fix it!
Extra requirements
Note! - These includes are all provided inside the archive!
Download
Things this script is used in

Also used this script in a released compilation or released gamemode? Let me know, and I'll add it here. Might help your work get seen if people come across this thread.


License

You are NOT allowed to re-upload or re-release this without my WRITTEN permission!
Keep the credits intact!
Reply
#2

wow this is sexy man good awsome buddy 10/10 reason am gonna use it
Reply
#3

Thanks
Reply
#4

Apply some opacity, because we can't see the game !
Good job 8/10 =)
(and use sprites ! )
Reply
#5

Added the opacity to the to do list
And, what do you mean with sprites?
Reply
#6

You can try to use sprite to make less ugly the textdraw ? (sorry for english)
Reply
#7

I get the part that the textdraw has to be changed, but I don't know what you mean with sprites :\
Reply
#8

https://sampforum.blast.hk/showthread.php?tid=291202

https://sampforum.blast.hk/showthread.php?tid=291722
Reply
#9

Aah, like this, thanks for the suggestions, I added the 'Rework the textdraw' suggestion, I will do something nice for the next update
Reply
#10

Epic, Recommended for CnR servers
anyways Keep it up
Reply
#11

I have to edit this #define MONEYPER100 1.00 to change the fare prices
Reply
#12

That's the money that will be added to the total fare cost each 100 meters. So, if you want to increase the total fare price, then yes, you have to edit it.
Reply
#13

the 1.00 ?
Reply
#14

Yeah, 1.00 stands for 1$
Reply
#15

what is this for #define STARTAMOUNT 2.66 ?

and also can the workers use a normal taxi(carid: 420)
I mean without cmd: spawntaxi

Edit: You know what, this is useless. all players can use the command without join the job.
Reply
#16

This filterscript is not made for your gamemode. If you want to use it as a job, you just need to add one little if statement in each command, to detect if they joined the job. How can I know what job ID it is for your mode? That's why I left it open for the end user to edit it. Also, the start amount define is the money added to the total fare amount, when the passenger gets in the taxi, even if they haven't drove yet, they have to pay 2.66 anyways. Offcourse people can use the standard taxi, id 420, without spawning a taxi. If you look at this code:
pawn Code:
forward IsATaxi(vehicleid);
public IsATaxi(vehicleid)
{
    new vmodel = GetVehicleModel(vehicleid);
    if(vmodel == 420 || vmodel == 438)
    {
        return 1;
    }
    return 0;
}
It looks if the vehicle the player is in is either car id 420 or 438, you can even disable the spawntaxi command at the top.
Before saying things are useless, you might want to look trough the code first.
Reply
#17

Epic

Thank you
Reply
#18

this is amazing...
Reply
#19

Textdraw is too big :/
Reply
#20

The textdraw is already noted as an update. I'll redo the textdraw for the next update, but I'm still figuring out how to make it. There's no planned update date yet, but whenever I know how it would look nice, I'll work on it.

EDIT: I might have an idea. If there are any more suggestions, things I should add, please tell me!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)