Jump to content
  • 0

Sprijin- Problema masini factiuni


Question

Posted

Nick: NaturaL

Problema: La taxi de exemplu cand intru intr-o masina de la taxi imi zice nu esti membru P.R sau la unele mafii ma scoate din masina pur si simplu ...

Erori / warnings: -

Ai incercat sa rezolvi singur ?: Sunt incepator ..

Lini/Script:

[pawn]//-----------------------------------[Taxi Vehicles]--------------------------------------------//

taxicar[1] = AddStaticVehicleEx(420,1786.79,-1932.44,13.01,0.5207,6, 6, 60000); //Taxi 154

    taxicar[2] = AddStaticVehicleEx(420,1790.79,-1932.44,13.01,0.3221,6, 6, 60000); //Taxi

    taxicar[3] = AddStaticVehicleEx(420,1794.79,-1932.44,13.01,0.3643,6, 6, 60000); //Taxi

taxicar[4] = AddStaticVehicleEx(420,-1970.1433,103.5688,27.4670,90.1277,-1, -1, 60000);//Taxi

taxicar[5] = AddStaticVehicleEx(420,-1970.0803,98.9967,27.4662,91.6938,-1, -1, 60000);//Taxi

taxicar[6] = AddStaticVehicleEx(420,-1971.1157,84.3696,27.4678,90.0329,-1, -1, 60000);//Taxi

taxicar[7] = AddStaticVehicleEx(420,-1971.1923,88.3699,27.4671,90.5881,-1,-1,60000);//Taxi 160[/pawn]

[pawn]//-----------------------------------[Clanul Tobosaru Vehicles]--------------------------------------------//

tobocar[1] = AddStaticVehicleEx(409,712.9325,-1421.5901,13.3321,359.5059,211,211,60000); // tobosaru 58 type 409

tobocar[2] = AddStaticVehicleEx(487,702.7555,-1455.1440,17.8719,344.5846,211,211,60000); // tobosaru 59 type 487

tobocar[3] = AddStaticVehicleEx(579,703.7527,-1423.7708,13.4717,359.4744,211,211,60000); // tobosaru 60 type 579 --> la masina asta ma scoate din ea ...

tobocar[4] = AddStaticVehicleEx(560,728.0515,-1432.9966,13.2440,89.8331,211,211,60000); // tobosaru 62 type 560

tobocar[5] = AddStaticVehicleEx(560,735.8386,-1432.9734,13.2405,90.3263,211,211,60000); // tobosaru 61 type 560

tobocar[7] = AddStaticVehicleEx(521,1451.8896,744.8723,10.5915,66.1975,211,211,600002); // tobosaru 64 type 521[/pawn]

7 answers to this question

Recommended Posts

  • Administrator
Posted

Uita-te la OnPlayerStateChange, cauta dupa mesajul pe care il primesti cand te scoate afara.

Posted

[pawn] if(IsATobosaruCar(newcar))

{

    if(PlayerData[playerid][pMember] == 15 || PlayerData[playerid][pLeader] == 15 ) { }

    else

    {

        SendClientMessage(playerid, COLOR_WHITE, "Nu faci parte din Clanul Tobosaru!");

        RemovePlayerFromVehicle(playerid);

    }

}[/pawn]

Ce am gasit

  • Administrator
Posted

Uita-te la functia "IsATobosaruCar". Acolo trebuie sa ai id-ul masinilor din clanul tau.

Posted

Daca am inlocuit IsATobosaruCar de la acea linie cu [pawn]if(newcar == camacar[1] || newcar == camacar[2] || newcar == camacar[3] || newcar == camacar[4] || newcar == camacar[5] || newcar == camacar[6] || newcar == camacar[7] || newcar == camacar[8])[/pawn] are ceva?

  • Administrator
Posted

Daca vrei sa folosesti functia aia pentru masinile din clanul respectiv adica Tobosarul da, are. Daca vrei sa le folosesti si pentru celalalt, faci o functie asemanatoare si inlocuiesti cu ce ai facut tu.

Posted

A mers , multumesc de ajutor . Acuma am depistat alta problema cand dau /fare imi zice ca nu sunt in taxi ...

[pawn]//-----------------------------------------Comanda-----------------------------------------//

if(strcmp(cmd, "/fare", true) == 0)

    {

        if(IsPlayerConnected(playerid))

    {

        if(PlayerData[playerid][pMember] == 6 || PlayerData[playerid][pLeader] == 6)

{

if(TransportDuty[playerid] > 0)

{

    if(TransportDuty[playerid] == 1)

    {

        TaxiDrivers -= 1;

    }

    TransportDuty[playerid] = 0;

format(string, sizeof(string), "* Acum numai esti la servici, ai castigat $%d pentru munca depusa.", TransportMoney[playerid]);

SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

GivePlayerCash(playerid, TransportMoney[playerid]);

ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;

return 1;

}

new Veh = GetPlayerVehicleID(playerid);

if(Veh >= 420 && Veh <= 420)

{

    if(GetPlayerState(playerid) == 2)

    {

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendUsage(playerid,"/fare [price]");

return 1;

}

moneys = strval(tmp);

if(moneys < 1 || moneys > 500) { SendClientMessage(playerid, COLOR_GREY, "Pretul (Fare) trebuie sa fie cuprins intre $1 si $500 !"); return 1; }

    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;

    GetPlayerName(playerid,sendername,sizeof(sendername));

    format(string, sizeof(string), "Taximetristul %s este la servici, pret: $%d. Daca ai nevoie de un taxi, scrie /service", sendername, TransportValue[playerid]);

    OOCNews(TEAM_GROVE_COLOR,string);

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "Nu esti taximetrist!");

    return 1;

}

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "Nu esti intr-un taxi!");

}

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "Nu esti taximetrist sau sofer pe autobuz!");

    return 1;

}

    }

    return 1;

}[/pawn]

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.