[pomoc] 3D na Vozilima

Započeo sampzone, April 21, 2011, 11:19:58 PRE PODNE

prethodna tema - sledeća tema

0 članova i 3 gostiju pregledaju ovu temu.

ne, nego izbrises zagradu na kraju  PlayerInfo[playerid][pJob] == 14) i to je to...

znaci, napravis ovako
if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14|| PlayerInfo[playerid][pJob] == 13)

wvo ubacio sam 3D i neradi dobro nepise koja je cjena i kada uzadjem iz taxija neskida se....

tolko postova a nema znanja ;P sala

neskida se jer nisi zavrsio sa duznosti upisi jos jednom fare nakon sto si prvi put upisao i maknut ce se ;)

ok ali nepise mi cjena voznje samo pise cj i nema dalje nista xD

daj mi komandu da vidim sta si napravio :D
u code stavi   :)

if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14|| PlayerInfo[playerid][pJob] == 13)
{
if(TransportDuty[playerid] > 0)
{
    if(TransportDuty[playerid] == 1)
    {
        TaxiDrivers -= 1;
    }
    else if(TransportDuty[playerid] == 2)
    {
        BusDrivers -= 1;
    }
    TransportDuty[playerid] = 0;
format(string, sizeof(string), "* Vise nisi na duznosti kao TAXI vozac i zaradio si $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SafeGivePlayerMoney(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
Delete3DTextLabel(taaxi[playerid]);
return 1;
}
new Veh = GetPlayerVehicleID(playerid);
                 new model = GetVehicleModel(Veh);
                 if(model == 438 || model == 420)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /fare [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "Cena voznje mora biti izmedju 1 i 999$!"); return 1; }
    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Taxi Vozac %s je sada na duznosti,cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
    new str[64];
                        format(str,sizeof str,"{00ff00}TAXI VOZAC NA DUZNOSTI\n{cccc00}/service taxi\n{ff0000}Cena: %d",TransportValue[playerid]);
                        taaxi[playerid] = Create3DTextLabel(str,0x008080FF,30.0,40.0,50.0,40.0,0);
                        Attach3DTextLabelToVehicle(taaxi[playerid],GetPlayerVehicleID(playerid), 0.0, 0.0,0.6);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nisi Vozac !");
    return 1;
}
}
else if(model == 437 || model == 431)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /fare [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "Cena voznje mora biti izmedju 1 i 999$ !"); return 1; }
    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Bus Vozac %s je sada na duznosti, cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, " Nisi vozac !");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  Nisi u TAXI vozilu/BUSu !");
}
}
else
{
    SendClientMessage(playerid,COLOR_GREY,"   Nisi TAXI/Bus vozac !");
    return 1;
}
    }
    return 1;
}



Jesi ubacio na pocetku new Text3D:taaxi[MAX_PLAYERS]; ? Ako nisi ubaci to i radice ti 1000%,meni radi...


Citat: [CH]Mario poslato April 22, 2011, 16:04:41 POSLE PODNE
Jesi ubacio na pocetku new Text3D:taaxi[MAX_PLAYERS]; ? Ako nisi ubaci to i radice ti 1000%,meni radi...

citaj gore!!
napiso je da mu izbaci tekst al ne i string!  :D

ma meni sve pise oka l nepise Cena (iznos) samo pise Ce

Sorry,nisam video...Znam u cemu je problem,predugacak je text...if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14|| PlayerInfo[playerid][pJob] == 13)
{
if(TransportDuty[playerid] > 0)
{
    if(TransportDuty[playerid] == 1)
    {
        TaxiDrivers -= 1;
    }
    else if(TransportDuty[playerid] == 2)
    {
        BusDrivers -= 1;
    }
    TransportDuty[playerid] = 0;
format(string, sizeof(string), "* Vise nisi na duznosti kao TAXI vozac i zaradio si $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SafeGivePlayerMoney(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
Delete3DTextLabel(taaxi[playerid]);
return 1;
}
new Veh = GetPlayerVehicleID(playerid);
                 new model = GetVehicleModel(Veh);
                 if(model == 438 || model == 420)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /fare [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "Cena voznje mora biti izmedju 1 i 999$!"); return 1; }
    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Taxi Vozac %s je sada na duznosti,cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
    new str[64];
                        format(str,sizeof str,"{00ff00}TAXI NA DUZNOSTI\n{cccc00}/service taxi\n{ff0000}Cena: %d",TransportValue[playerid]);
                        taaxi[playerid] = Create3DTextLabel(str,0x008080FF,30.0,40.0,50.0,40.0,0);
                        Attach3DTextLabelToVehicle(taaxi[playerid],GetPlayerVehicleID(playerid), 0.0, 0.0,0.6);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nisi Vozac !");
    return 1;
}
}
else if(model == 437 || model == 431)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /fare [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "Cena voznje mora biti izmedju 1 i 999$ !"); return 1; }
    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Bus Vozac %s je sada na duznosti, cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, " Nisi vozac !");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  Nisi u TAXI vozilu/BUSu !");
}
}
else
{
    SendClientMessage(playerid,COLOR_GREY,"   Nisi TAXI/Bus vozac !");
    return 1;
}
    }
    return 1;
}

Stavi to i new Text3D:taaxi[MAX_PLAYERS]; ...

Citat: [CH]Mario poslato April 22, 2011, 17:42:04 POSLE PODNE
Sorry,nisam video...Znam u cemu je problem,predugacak je text...if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
    {
        if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14|| PlayerInfo[playerid][pJob] == 13)
{
if(TransportDuty[playerid] > 0)
{
    if(TransportDuty[playerid] == 1)
    {
        TaxiDrivers -= 1;
    }
    else if(TransportDuty[playerid] == 2)
    {
        BusDrivers -= 1;
    }
    TransportDuty[playerid] = 0;
format(string, sizeof(string), "* Vise nisi na duznosti kao TAXI vozac i zaradio si $%d.", TransportMoney[playerid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
SafeGivePlayerMoney(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
Delete3DTextLabel(taaxi[playerid]);
return 1;
}
new Veh = GetPlayerVehicleID(playerid);
                 new model = GetVehicleModel(Veh);
                 if(model == 438 || model == 420)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /fare [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "Cena voznje mora biti izmedju 1 i 999$!"); return 1; }
    TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Taxi Vozac %s je sada na duznosti,cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
    new str[64];
                        format(str,sizeof str,"{00ff00}TAXI NA DUZNOSTI\n{cccc00}/service taxi\n{ff0000}Cena: %d",TransportValue[playerid]);
                        taaxi[playerid] = Create3DTextLabel(str,0x008080FF,30.0,40.0,50.0,40.0,0);
                        Attach3DTextLabelToVehicle(taaxi[playerid],GetPlayerVehicleID(playerid), 0.0, 0.0,0.6);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "Nisi Vozac !");
    return 1;
}
}
else if(model == 437 || model == 431)
{
    if(GetPlayerState(playerid) == 2)
    {
    tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "KORISTENJE: /fare [price]");
return 1;
}
moneys = strval(tmp);
if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "Cena voznje mora biti izmedju 1 i 999$ !"); return 1; }
    BusDrivers += 1; TransportDuty[playerid] = 2; TransportValue[playerid]= moneys;
    GetPlayerName(playerid,sendername,sizeof(sendername));
    format(string, sizeof(string), "Bus Vozac %s je sada na duznosti, cena: $%d.", sendername, TransportValue[playerid]);
    OOCNews(TEAM_GROVE_COLOR,string);
}
else
{
    SendClientMessage(playerid, COLOR_GREY, " Nisi vozac !");
    return 1;
}
}
else
{
    SendClientMessage(playerid, COLOR_GREY, "  Nisi u TAXI vozilu/BUSu !");
}
}
else
{
    SendClientMessage(playerid,COLOR_GREY,"   Nisi TAXI/Bus vozac !");
    return 1;
}
    }
    return 1;
}

Stavi to i new Text3D:taaxi[MAX_PLAYERS]; ...

moguce da je text velik! :D
ja mislim da treba povecat string da bi mogao pisat vise, nemojte me drzat za rijec.(mislim da sam to cuo negdje)


  • new str[128];

umesto onog new str[64];

EDIT:Jel dobro ovo sto sam ti dao  ? -.-
Poslednja Izmena: April 23, 2011, 12:31:59 POSLE PODNE od [BF]Nxidza