#1

Hello, I am trying to add a taxi system to my script but I can't find any decent one, I was searching on ****** all day for tutorials and filterscripts but none of them are how I want it, I want a system that I can do /fare from 1 to 500 and doing that to go on duty, also after player exits my car the money will be taken from him automatically and as soon as I will do /fare again, I will receive all the money I made.

here is what I got from my friend, but after I add it to my script I got bunch of errors, also I am trying to add it to zGaming gamemode.


Код:
CMD:fare(playerid, params[])
{
	if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob2] == 17 || PlayerInfo[playerid][pTaxiLicense] == 1)
	{
		new string[128], fare;
		if(sscanf(params, "d", fare)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /fare [price]");

		if(TransportDuty[playerid] > 0)
		{
			if(TransportDuty[playerid] == 1)
			{
				TaxiDrivers -= 1;
			}
			else if(TransportDuty[playerid] == 2)
			{
				BusDrivers -= 1;
			}
			TransportDuty[playerid] = 0;
			format(string, sizeof(string), "* You are now off duty and earned $%d.", TransportMoney[playerid]);
			SendClientMessageEx(playerid, COLOR_LIGHTBLUE, string);
			GivePlayerCash(playerid, TransportMoney[playerid]);
			ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
			SetPlayerToTeamColor(playerid);
			return 1;
		}
		if(JobDuty[playerid] != 0) return SendClientMessageEx(playerid,COLOR_GREY," You need to get off duty with your mechanic/lawyer job first.");
		new newcar = GetPlayerVehicleID(playerid);
		if(IsAnTaxi(newcar))
		{
			if(GetPlayerState(playerid) == 2 && PlayerInfo[playerid][pJob] == 17 || PlayerInfo[playerid][pJob2] == 17)
			{
				if(fare < 1 || fare > 500)
				{
					SendClientMessageEx(playerid, COLOR_GREY, "   Fare price must be between $1 and $500!");
					return 1;
				}
				TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = fare;
				format(string, sizeof(string), "You are now on-duty as Taxi Driver, fare: $%d.", TransportValue[playerid]);
				SendClientMessageEx(playerid, COLOR_WHITE, string);
				SetPlayerToTeamColor(playerid);
			}
			else
			{
				SendClientMessageEx(playerid, COLOR_GREY, "   You are not the taxi driver!");
				return 1;
			}
The problem is that I see that here is added the bus too, I don't want bus I just want to be a simple taxi system which automatically takes money from the player as soon as he/she enters my taxi car.
I just need help from someone to tell me what to do.

Thanks!
Reply
#2

This is not the full taxi system... There's parts missing such as "IsAnTaxi(newcar)", which leads to a stock (not included in the scrip provided).
Reply
#3

Well, I don't know which is all the script, and yes I know its not all the script this is just the command /fare , but I don't know how to find all the parts of it.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)