[HELP] Problem with CMD (/fare).
#1

I got some problem after i add fare to can work on two vehicles but its not working always giving me the last
"Ti nemas licenca" but before i got an "ptaxilicense =1" .

Old:
pawn Код:
if(IsAnTaxi(vehid))
NEW (Added by me)
pawn Код:
if(!IsSATaxi(GetPlayerVehicleID(playerid)) && !IsSATaxiL(GetPlayerVehicleID(playerid)))
pawn Код:
CMD:fare(playerid, params[])
{
    if(!IsTaxiDriver(playerid))
    {
        new string[128], fare;
        if(sscanf(params, "d", fare)) return SendClientMessage(playerid, COLOR_WHITE, "INFO: /fare [cena]");

        if(TransportDuty[playerid] > 0)
        {
            if(TransportDuty[playerid] == 1)
            {
                TaxiDrivers -= 1;
            }
            else if(TransportDuty[playerid] == 2)
            {
                BusDrivers -= 1;
            }
            TransportDuty[playerid] = 0;
            format(string, sizeof(string), "* Ti povekje ne si na dolznost i zaraboti $%d.", TransportMoney[playerid]);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
            GiveDodMoney(playerid, TransportMoney[playerid]);
            ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
            SetPlayerColor(playerid,COLOR_WHITE);
            return 1;
        }
        if(JobDuty[playerid] != 0) return SendClientMessage(playerid,COLOR_GREY,"Ti mora da ides nadvor od dolznost za da mozes pak /fare.");
        new vehid = GetPlayerVehicleID(playerid);
    if(!IsSATaxi(GetPlayerVehicleID(playerid)) && !IsSATaxiL(GetPlayerVehicleID(playerid)))
        {
            if(GetPlayerState(playerid) == 2)
            {
                if(fare < 1 || fare > 500)
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Cenata moze da bide pomegju $1 i $500!");
                    return 1;
                }
                TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = fare;
                format(string, sizeof(string), "Ti si sega na dolznost kako Taxi Vozac, Cena: $%d.", TransportValue[playerid]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SetPlayerColor(playerid,TEAM_TAXI_COLOR);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Ti ne si taksi vozac!");
                return 1;
            }
        }
        else if(IsAnBus(vehid))
        {
            if(GetPlayerState(playerid) == 2)
            {
                if(fare < 1 || fare > 500)
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Cenata moze da bide pomegju $1 i $500!");
                    return 1;
                }
                BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]=fare;
                format(string, sizeof(string), "Ti si sega na dolznost kako Bus Vozac, Cena: $%d.", TransportValue[playerid]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SetPlayerColor(playerid,TEAM_TAXI_COLOR);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Ti ne si bus vozac!");
                return 1;
            }
        }
        else if (PlayerInfo[playerid][pTaxiLicense] == 1)
        {
            if(GetPlayerState(playerid) == 2)
            {
                if(fare < 1 || fare > 500)
                {
                    SendClientMessage(playerid, COLOR_GREY, "   Cenata mora da bide pomegju $1 i $500!");
                    return 1;
                }
                TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = fare;
                format(string, sizeof(string), "Ti si sega na dolznost kako Taxi Vozac, cena: $%d.", TransportValue[playerid]);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SetPlayerColor(playerid,TEAM_TAXI_COLOR);
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Ti ne si Taksista!");
                return 1;
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "Ti ne si vo Avtomobilot.");
        }
    }
    else
    {
        SendClientMessage(playerid,COLOR_GREY,"Ti nemas licanca!");
        return 1;
    }
    return 1;
}
Reply


Messages In This Thread
[HELP] Problem with CMD (/fare). - by GBLTeam - 21.11.2014, 00:23
Re: [HELP] Problem with CMD (/fare). - by ikey07 - 21.11.2014, 00:27
Re: [HELP] Problem with CMD (/fare). - by GBLTeam - 21.11.2014, 02:08
Re: [HELP] Problem with CMD (/fare). - by Rdx - 21.11.2014, 05:52
Re: [HELP] Problem with CMD (/fare). - by GBLTeam - 21.11.2014, 10:27
Re: [HELP] Problem with CMD (/fare). - by Rdx - 21.11.2014, 14:02

Forum Jump:


Users browsing this thread: 1 Guest(s)