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


Messages In This Thread
Recognize a Taxi ? - by ДitisOnHuora - 20.02.2010, 12:22
Re: Recognize a Taxi ? - by ДitisOnHuora - 20.02.2010, 14:06
Re: Recognize a Taxi ? - by [LSR]State_Trooper - 20.02.2010, 14:12
Re: Recognize a Taxi ? - by ДitisOnHuora - 20.02.2010, 14:31
Re: Recognize a Taxi ? - by ДitisOnHuora - 20.02.2010, 17:23
Re: Recognize a Taxi ? - by ДitisOnHuora - 22.02.2010, 18:31
Re: Recognize a Taxi ? - by Torran - 22.02.2010, 18:33
Re: Recognize a Taxi ? - by ДitisOnHuora - 22.02.2010, 18:36

Forum Jump:


Users browsing this thread: 1 Guest(s)