[Pomoc] /fare

Započeo Zigic19, Novembar 20, 2012, 18:31:34 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju 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:

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;
}


Neke slike/video za lakse dobivanje pomoci(neobavezno): /
[GG] Maper