Jump to content

[REZOLVAT] Am nevoie de ajutor cu /fare


AntiMaterieP2W
 Share

Recommended Posts

Username:LordHitlerAdv
Problema întălnită:cu /fare
Detalii despre problemă:Problema mea cu /fare este ca, se pune duty si cand urca playerul in taxi nu incepe sa ii i-a din bani.
Ce ai încercat să faci înainte să postezi?:am incercat sa refac systemul dar degeaba.
Cod sursă (recomandat pastebin.com) :https://pastebin.com/xwgu26JW
Alte detalii:ii i-a bani doar cand este in masina si dai fare cand ai urcat.

image.thumb.png.5d06bcba42a5d9a2b464137d4956f85c.png

Link to comment
Share on other sites

CMD:fare(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pMember] == 13)
        {
            new string[128],sendername[25];
            if(TransportDuty[playerid] > 0)
            {
                if(TransportDuty[playerid] == 1)
                {
                    TaxiDrivers -= 1;
                }
                TransportDuty[playerid] = 0;
                format(string, sizeof(string), "* You are now Off Duty and earned $%s.", FormatNumber(TransportMoney[playerid]));
                SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                PlayerTextDrawHide(playerid, taxitext[playerid]);
                PlayerTextDrawHide(playerid, findtext2[playerid]);
                GivePlayerCash(playerid, TransportMoney[playerid]);
                ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
                return 1;
            }
            new moneys;
            if(sscanf(params, "d",moneys)) return SendClientMessage(playerid, COLOR_WHITE, "{FF9900}Scrie: {33CCFF}/fare <Amount of Money>");
            new Veh = GetPlayerVehicleID(playerid);
            if(Veh == taxic[1] || Veh == taxic[2] || Veh == taxic[3] || Veh == taxic[4] || Veh == taxic[5] || Veh == taxic[6] || Veh == taxic[7] || Veh == taxic[8] || Veh == taxic[9] || Veh == taxic[10] && PlayerInfo[playerid][pMember] == 13)
            {
                if(GetPlayerState(playerid) == 2)
                {
                    if(moneys < 5000 || moneys > 5000) return SendClientMessage(playerid, COLOR_WHITE, "{FFB870}Fare price must be between $1 and $500.");
                    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
                    GetPlayerName(playerid,sendername,sizeof(sendername));
                    format(string, sizeof(string), "{00D900}* Taxi driver %s is now on duty($%s).[/service taxi]", sendername, FormatNumber(TransportValue[playerid]));
                    SendClientMessageToAll(TEAM_GROVE_COLOR,string);
                }
                else
                {
                    SendClientMessage(playerid, COLOR_WHITE, "You are not the driver.");
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "You are not in a taxi.");
            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_WHITE, "You are not a taxi driver.");
            return 1;
        }
    }
    return 1;
}

Link to comment
Share on other sites

Acum 2 ore, Wildo a spus:

Fii te rog eu mai explicit ca nu inteleg ce doresti...

 

Acum 2 ore, DenisAdv a spus:

fii mai explicit da-ne mai multe detalii pentru a te putea ajuta cu problema aparuta. ce gm folosesti ? 

 

fac un video si o dau link aici

image.thumb.png.5d06bcba42a5d9a2b464137d4956f85c.png

Link to comment
Share on other sites

Acum 3 ore, DenisAdv a spus:

fii mai explicit da-ne mai multe detalii pentru a te putea ajuta cu problema aparuta. ce gm folosesti ? 

 

Acum 3 ore, Wildo a spus:

Fii te rog eu mai explicit ca nu inteleg ce doresti...

 

Uitati aici un video sa vedeti la ce ma refer : 

 

image.thumb.png.5d06bcba42a5d9a2b464137d4956f85c.png

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...