[POMOC] TAXI ne fukcionise

Započeo kim3205, April 05, 2013, 23:52:16 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta: dc(nbe edit)
Problem: Lider Taxi i clannovi taxi ne dobijaju pare sto provoze njude sve radi kako treba samo pare ne dobijaju
Deo koda:
if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14)
{
if(TransportDuty[playerid] > 0)
{
    if(TransportDuty[playerid] == 1)
    {
        TaxiDrivers -= 1;
    }
    else if(TransportDuty[playerid] == 2)
    {
        BusDrivers -= 1;
    }
    TransportDuty[playerid] = 0;
format(string, sizeof(string), "* Sada ste van duznosti i zaradili ste $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string);
JBC_GivePlayerMoney(playerid, TransportMoney[playerid]);
TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
return 1;
}
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 61 || Veh == 62 || Veh == 63 || Veh == 64 || Veh == 65 || Veh == 66 || Veh == 67 || Veh == 68 || Veh == 69 || Veh == 70)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koristite: /fare [cena]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "   Cena fare mora biti najmanje 1$ i max 999 !"); return 1; }
    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "[Advert] Taxi vozac %s je na duznosti,ukucajte /call 444 da bi pozvali taxi. Cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(0xEDCA29AA,string);
    new taxicar = GetPlayerVehicleID(playerid);
if(taxicar == 61)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii1, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 62)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii2, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 63)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii3, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 64)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii4, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 65)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii5, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 66)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii6, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 67)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii7, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 68)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii8, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 69)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii9, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 70)
{
new xita[300];
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue[playerid]);
Update3DTextLabelText(Taxiii10, COLOR_LIGHTGREEN, xita);
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Niste vozac !");
    return 1;
}
}
    else if(Veh == 59 || Veh == 60)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Koristite: /fare [cena]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "   Cena duznosti mora biti u granicama $1 do $999 !"); return 1; }
    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Vozac autobusa %s je na duznosti, Cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Niste vozac !");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "   Niste u Taksiju / Bus !");
}
}
else
{
    SendClientMessage(playerid,COLOR_GREY,"   Niste Taxi / Bus vozac !");
    return 1;
}
    }
    return 1;
}

i am king!

mislim da nije problem u komandi, nego dio kad igrac ude u vozilo i tamo treba bit funkcija da mu oduzima par i da daje vozacu
Other Dimension RolePlay | Uskoro
Ukoliko zelite pomoci u razvoju servera, mozete se meni javit na PP/PM!

nadji pod onplayerexitvehicle deo gde musterija izlazi iz vozila, i stavi isplatu igracu,(ako koristis junkbuster stavi prefix JB_)

kako da namestim kad udje musterija da plati cim izadje

i am king!

pod onplayerentervehicle mu das varijablu, i pod onplayerexitvehicle je proveris i oduzmes novac