Recognize a Taxi ?
#1

I am using this kind of faction car system:

pawn Код:
new Taxi[4];
pawn Код:
public IsATaxi(vehicleid)
{
    new TaxiCarFound = 0;
    for(new i = 0; i < sizeof(Taxi); i++)
    {
        if (vehicleid == Taxi[i])
        {
            TaxiCarFound = 1;
        }
    }
    if(TaxiCarFound == 0)
    {
        return 1;
    }
    return 0;
}
pawn Код:
for(new i = 0; i < 4; i++)
        {
            if(vehicleId == Taxi[i])
            {
                if(PlayerInfo[playerid][pJob] == 19)
                {
                }
                else
                {
                SendClientMessage(playerid, COLOR_GREY, " You are not a Taxi Driver!");
            RemovePlayerFromVehicle(playerid);
                return 1;
            }
            }
        }
pawn Код:
Taxi[0] = CreateVehicle(420,1783.8013,-1932.9772,13.1652,1.4375,6,1, 800); //Taxi
    Taxi[1] = CreateVehicle(420,1792.5123,-1932.7697,13.1713,0.9703,6,1, 800); //Taxi
    Taxi[2] = CreateVehicle(420,1777.1268,-1932.9703,13.1641,0.7770,6,1, 800); //Taxi
    Taxi[3] = CreateVehicle(420,1798.7782,-1933.0125,13.1667,359.3042,6,1,800);//Taxi
And i wonder how to add that system to this here:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
    {
      new name[MAX_PLAYER_NAME];
      GetPlayerName(playerid, name, sizeof(name));
      new vehicleid = GetPlayerVehicleID(playerid);
      for(new i = 0; i < MAX_PLAYERS; i++)
      {
        if(IsPlayerConnected(i))
        {
          if(>>>>>>>>> IsPlayerInVehicle(i, vehicleid) <<<<<<<<<<< && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
          {
            if(GetPlayerCash(playerid) < TransportValue[i])
            {
              format(string, sizeof(string), "* You need $%d to enter.", TransportValue[i]);
                        SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                        RemovePlayerFromVehicle(playerid);
            }
            else
            {
              if(TransportDuty[i] == 1)
              {
                format(string, sizeof(string), "* You paid $%d to the Taxi Driver.", TransportValue[i]);
                            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Passenger %s has entered your Taxi.", name);
                            SendClientMessage(i, COLOR_LIGHTBLUE, string);
                            TransportTime[i] = 1;
                TransportTime[playerid] = 1;
                TransportCost[playerid] = TransportValue[i];
                TransportCost[i] = TransportValue[i];
                TransportDriver[playerid] = i;
              }
(Sorry forum idents badly.)
How?
if(IsATaxi(vehicleid) && GetPlayerState(i) == 2 && TransportDuty[i] > 0)
Or?
Reply
#2

Anyone? Please..
Reply
#3

i dont understand, if I did I would help
Reply
#4

Quote:
Originally Posted by [LSR
State_Trooper ]
i dont understand, if I did I would help
And i would be really thankfull
Reply
#5

Help please
Reply
#6

Bump.
Reply
#7

I dont understand what you want either
Reply
#8

Quote:
Originally Posted by Torran
I dont understand what you want either
When im in taxi and do /fare, and someone gets in my car, driver wont get any money at all. Nothing i shappening.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)