[Pomoc] /fare

Započeo Zigic19
2. Jan. 2013. Zaključano
301
pregleda
2
postova
Zigic19
3
Hustler
2. Jan. 2013.
Skripta: NBE
Problem: Kada neko udje u taksi ne skida mu pare :/
Dio skripte:
if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo == 10||PlayerInfo == 10|| PlayerInfo == 14)
{
if(TransportDuty > 0)
{
    if(TransportDuty == 1)
    {
        TaxiDrivers -= 1;
    }
    else if(TransportDuty == 2)
    {
        BusDrivers -= 1;
    }
    TransportDuty = 0;
format(string, sizeof(string), "* Sada ste van duznosti i zaradili ste $%d.", TransportMoney);
SendClientMessage(playerid, COLOR_WHITE, string);
JBC_GivePlayerMoney(playerid, TransportMoney);
TransportValue = 0; TransportMoney = 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 ");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 200) { SendClientMessage(playerid, COLOR_GREY, "Cena voznje ne sme biti ispod $1 i preko $200 !"); return 1; }
    TaxiDrivers += 1; TransportDuty = 1; TransportValue = moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Taxista {FFFFFF}%s {48E31C}je na duznosti. | Cena: {FFFFFF}%d$.", sendername, TransportValue);
    OOCNews(0xEDCA29AA,string);
    new taxicar = GetPlayerVehicleID(playerid);

if(taxicar == 61)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii1, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 62)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii2, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 63)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii3, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 64)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii4, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 65)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii5, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 66)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii6, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 67)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii7, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 68)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii8, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 69)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
Update3DTextLabelText(Taxiii9, COLOR_LIGHTGREEN, xita);
}
if(taxicar == 70)
{
new xita;
format(xita, sizeof(xita), "[ TAXI ]\ncena:%d $",TransportValue);
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 ");
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 = 2; TransportValue= moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Vozac autobusa %s je na duznosti, Cena: $%d.", sendername, TransportValue);
    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;
}

Slika/video:
Ricardo Diaz
2
Rookie
3. Jan. 2013.
Probaj unesi,od Makedonija sam zato e tako
  if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo == 10||PlayerInfo == 10|| PlayerInfo == 14)
{
if(TransportDuty > 0)
{
    if(TransportDuty == 1)
    {
        TaxiDrivers -= 1;
    }
    else if(TransportDuty == 2)
    {
        BusDrivers -= 1;
    }
    TransportDuty = 0;
format(string, sizeof(string), "{37F906}INFO:{FFFFFF}Vekje ne ste na dolznost,zarabotivte $%d.", TransportMoney);
SendClientMessage(playerid, WH, string);
SafeGivePlayerMoney(playerid, TransportMoney);
TransportValue = 0; TransportMoney = 0;
                    Delete3DTextLabel(farebText);
Delete3DTextLabel(faretText);
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, "{FF8306}KORISTETE:{FFFFFF}/fare .");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 201) { SendClientMessage(playerid, WH, "{{FF0000}GRESKA:{FFFFFF}Cena na prevozot nemoze da bide pomalku od $1 ili povekje od $200."); return 1; }
    TaxiDrivers += 1; TransportDuty = 1; TransportValue = moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Taksi vozac %s e na dolznost | Kontakt: /call 444 | Cena na vozenje: $%d.", sendername, TransportValue);
                        OOCNews(ZELENKASTA,string);
//new string11;
//format(string11, sizeof(string11), "{F3FF02}(( TAXI ))\nCena Voznje: {FFFFFF}$%d", TransportValue);
//faretText = Create3DTextLabel(string11,0xFF000099,0,0,0,50,-1,1);
                        //Attach3DTextLabelToPlayer(faretText, playerid, 0,0,1.2);
                       
}
else
{
    SendClientMessage(playerid, WH, "{FF0000}GRESKA:{FFFFFF}Ne ste taksi vozac.");
    return 1;
}
}
else if(Veh == 178 || Veh == 179)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "{F3FF02}Koriscenje: {FFFFFF}/fare ");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 301) { SendClientMessage(playerid, COLOR_YELLOW, "{F3FF02} {FFFFFF}Cijena prevoza ne smije biti ispod $1 ni preko $300 !"); return 1; }
    BusDrivers += 1; TransportDuty = 2; TransportValue= moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "{F81414} {FFFFFF}Vozac %s je na duznosti | Cijena Prevoza: $%d.", sendername, TransportValue);
                        OOCNews(TEAM_GROVE_COLOR,string);
format(string, sizeof(string), "{F81414}(( AUTOBUS ))\nCena Voznje: {FFFFFF}$%d", TransportValue);
farebText = Create3DTextLabel(string,0xFF000099,0,0,0,50,-1,1);
                        Attach3DTextLabelToPlayer(farebText, playerid, 0,0,1.2);
}
else
{
    SendClientMessage(playerid, WH, " Niste Vozac !");
    return 1;
}
}
else
{
    SendClientMessage(playerid, WH, "{FF0000}GRESKA:{FFFFFF}Ne ste vo taksi.");
}
}
else
{
    SendClientMessage(playerid,WH,"{FF0000}GRESKA:{FFFFFF}Ne ste taksist.!");
    return 1;
}
    }
    return 1;
}

Morate biti prijavljeni da biste odgovorili na ovu temu.

Prijava

© 2026 SmartShark. All rights reserved.

Powered by Momentum|v2026.3.001 Alpha