[Pomoc] Taxi

Započeo Milos25, Novembar 17, 2012, 15:57:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: NBE
Detaljan opis problema: Kada neko udje u taxi ne placa nista ( A duty sam - fare ) kako to da sredim da mu skida pare
Dio skripte: /
Neke slike/video za lakse dobivanje pomoci(neobavezno): /
Trazim Mapera

probaj ovu komandu staviti if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pClan] == 10||PlayerInfo[playerid][pLider] == 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 vise niste na duznosti i zaradili ste $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_WHITE, string);
GivePlayerMoney(playerid, TransportMoney[playerid]);
TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
return 1;
}
new Veh = GetPlayerVehicleID(playerid);
if(Veh == 86 || Veh == 87 || Veh == 88 || Veh == 89 || Veh == 90 || Veh == 91 || Veh == 92 || Veh == 93 || Veh == 94 || Veh == 95 || Veh == 96)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFB00}[Koriscenje]:{FFFFFF} /fare [Cena]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 201) { SendClientMessage(playerid, COLOR_YELLOW, "   Cena voznje ne smije biti ispod $1 i preko $200 !"); 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, /call 444 da pozovete taxi. Cena Voznje: $%d.", sendername, TransportValue[playerid]);
    OOCNews(0xEDCA29AA,string);
}
else
{
    SendClientMessage(playerid, COLOR_YELLOW, "   Niste Vozac !");
    return 1;
}
}
else if(Veh == 178 || Veh == 179)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "{FFFB00}[Koriscenje]:{FFFFFF} /fare [Cena]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_YELLOW, "   Cena prevoza ne smije biti ispod $1 ni preko $999 !"); return 1; }
    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Vozac Busa %s je na duznosti, Cena prevoza: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
}
else
{
    SendClientMessage(playerid, COLOR_YELLOW, "   Niste Vozac !");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_YELLOW, "   Niste u  Taxi Vozilu / Autobusu !");
}
}
else
{
    SendClientMessage(playerid,COLOR_YELLOW,"   Niste Taxi / Bus Vozac !");
    return 1;
}
    }
    return 1;
}

nece izbacime iz pawn kad ocu da compile

skripta:
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;
}
Poslednja Izmena: Novembar 17, 2012, 20:43:06 POSLE PODNE od Milos25
Trazim Mapera

Bump - izvinjavam se sto spam pre vremena
Trazim Mapera