[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.

mod koji ja koristim: Ravens edit

problem: mozel mi neko pomoci kako da napravim 3D text na autima tj samo za odredjeno auto i usput mozel mi neko pomoci kako da napravim da iznad taxija pise cjena voznje.....ali kada ju igrac promjeni da se i 3D cjena promjeni ..... malo je zeznuto al mozda neko zna :D

Hvala za pomoc unaprijed!

Kad bi samo znao kako je to jednostavno.

Napravis novu funkciju za taxi, npr

new Text3D:taxi;

i onda kad upise komandu /fare, neka se 3D prikaze i da bude odredjena cjena.

3D text prikacis za auto ovako: http://wiki.sa-mp.com/wiki/Attach3DTextLabelToVehicle
I da mu promijenis string(text): http://wiki.sa-mp.com/wiki/Update3DTextLabelText

Nije tesko,za pocetnika mozda, al bez muke nema nauke. BloodMaster ti nije dao sve na izvolite nego se potrudi malo nije tesko vjeruj mi ;)
Citat: Correlli poslato Maj 03, 2011, 17:45:02 POSLE PODNE
Citat: Petar_Black poslato Maj 03, 2011, 17:19:10 POSLE PODNE
Ohh..Nisam se nadao da ce ovakve odlicne ocene biti..:D..Na prvoj stranici sve 0/10 a na drugoj 100000/10 :D...Hvala puno..:DD :-*

U moju si temu došao, a ne u svoju...
Hahahah koji isus izgubio se malo :D

jel ovako treba da izgleda?

new Text3D:mylabel

mylabel = Create3DTextLabel("I'm at the coordinates:\n30.0,40.0,50.0",0x008080FF,30.0,40.0,50.0,40.0,0);
Update3DTextLabelText(mylabel, 0xFFFFFFFF, "New text.");
    return 1;
}

jel to za 3D text a kako da sada kada kuca /fare da mu cjena pise i npr jos da pise Taxi /call 444

Na ovom si forumu vec tri mjeseca, i imas 66 otvorenih tema. Zar nebi vec trebao znati neke osnove?
Ovo ti je zadnji put da ti serviram na tacnu!!

vrh:
new Text3D:taaxi[MAX_PLAYERS];



u tvoju komandu /fare di pise da si na duznosti...

new str[64];
format(str,sizeof str,"{00ff00}NA DUZNOSTI\n{cccc00}/call 444\n{ff0000}Cijena: %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);


I tamo gdje prestaje fare:


Delete3DTextLabel(taaxi[playerid]);

znam da se slabo znalazim.....jel to treba ovako izgledati?

if(strcmp(cmd,"/fare",true)==0)
    {
    new str[64];
format(str,sizeof str,"{00ff00}NA DUZNOSTI\n{cccc00}/call 444\n{ff0000}Cijena: %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);
        if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pJob] == 13 || PlayerInfo[playerid][pJob] == 14 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            if(TransportDuty[playerid] > 0)
            {
                if(TransportDuty[playerid] == 1)
                {
                    TaxiDrivers -= 1;
                }
                else if(TransportDuty[playerid] == 2)
                {
                    BusDrivers -= 1;
                }
                Delete3DTextLabel(taaxi[playerid]);
                TransportDuty[playerid] = 0;

kompajlas pa testiras!
Uskoro novi stunt server iStunt. DoÄ'ite i zabavite se!




   
   




Dizajniram za $$$
Popis stvari koje radim:

Wallpaper √  Signature ×  Logo √  Dizajn stranice (Ne kodiranje) √  Baner √  Avatar √  Animacija √  Intro √

daj mi cijelu fare, ja cu ti stavit OMG

if(strcmp(cmd,"/fare",true)==0)
    {
        if(IsPlayerConnected(playerid))
       {
           if(PlayerInfo[playerid][pJob] == 13 || PlayerInfo[playerid][pJob] == 14 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
         {
            if(TransportDuty[playerid] > 0)
            {
                if(TransportDuty[playerid] == 1)
                {
                    TaxiDrivers -= 1;
                }
                else if(TransportDuty[playerid] == 2)
                {
                    BusDrivers -= 1;
                }
                TransportDuty[playerid] = 0;
               format(string, sizeof(string), "* Nisi vise na duznosti i zaradio is $%d.", TransportMoney[playerid]);
               SendClientMessage(playerid, COLOR_WHITE, string);
               SafeGivePlayerMoney(playerid, TransportMoney[playerid]);
               /*ConsumingMoney[playerid] = 1;*/
               TransportValue[playerid] = 0;
               TransportMoney[playerid] = 0;
               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, "KORISTI: /fare [price]");
                     return 1;
                  }
                  moneys = strval(tmp);
                  if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "   Fare 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), "[Oglas] Vozac Taksija %s je na duznosti, /call 444 kako bi ga pozvao. Fare: $%d.", sendername, TransportValue[playerid]);
                   OOCNews(0xEDCA29AA,string);
                   SetPlayerToTeamColor(playerid);
               }
               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, "KORISTI: /fare [price]");
                     return 1;
                  }
                  moneys = strval(tmp);
                  if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, "   Fare 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), "Vozac Busa %s je na duznosti, Fare: $%d.", sendername, TransportValue[playerid]);
                   OOCNews(TEAM_GROVE_COLOR,string);
                   SetPlayerToTeamColor(playerid);
               }
               else
               {
                   SendClientMessage(playerid, COLOR_GREY, "   Nisi vozac !");
                   return 1;
               }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "   Nisi u Taxiju / Busu !");
            }
         }
         else
         {
             SendClientMessage(playerid,COLOR_GREY,"   Nisi vozac Taksija / Busa !");
             return 1;
         }
       }
       return 1;
   }

Evo ti:
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);
JB_GivePlayerMoney(playerid, TransportMoney[playerid]);
ConsumingMoney[playerid] = 1; TransportValue[playerid] = 0; TransportMoney[playerid] = 0;
Delete3DTextLabel(taaxi[playerid]);
return 1;
}
new Veh = GetPlayerVehicleID(playerid);
if(TaxiCars(Veh))
{
    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(BuseviVozila(Veh))
{
    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;
}

inace stavljaj u [code].[/code] :)

if(strcmp(cmd,"/fare",true)==0)
   {
       if(IsPlayerConnected(playerid))
      {
          if(PlayerInfo[playerid][pJob] == 13 || PlayerInfo[playerid][pJob] == 14 || PlayerInfo[playerid][pMember] == 10 || PlayerInfo[playerid][pLeader] == 10)
        {
           if(TransportDuty[playerid] > 0)
           {
               if(TransportDuty[playerid] == 1)
               {
                   TaxiDrivers -= 1;
               }
               else if(TransportDuty[playerid] == 2)
               {
                   BusDrivers -= 1;
               }
               TransportDuty[playerid] = 0;
              format(string, sizeof(string), "* Nisi vise na duznosti i zaradio is $%d.", TransportMoney[playerid]);
              SendClientMessage(playerid, COLOR_WHITE, 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, "KORISTI: /fare [price]");
                    return 1;
                 }
                 new str[64];
                 moneys = strval(tmp);
                 if(moneys < 1 || moneys > 999) { SendClientMessage(playerid, COLOR_GREY, "   Fare mora biti izmedju $1 i $999 !"); return 1; }
                  TaxiDrivers += 1; TransportDuty[playerid] = 1; TransportValue[playerid] = moneys;
                  GetPlayerName(playerid,sendername,sizeof(sendername));
                  format(str,sizeof str,"{00ff00}NA DUZNOSTI\n{cccc00}/call 444\n{ff0000}Cijena: %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);
                  OOCNews(0xEDCA29AA,string);
                  SetPlayerToTeamColor(playerid);
              }
              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, "KORISTI: /fare [price]");
                    return 1;
                 }
                 moneys = strval(tmp);
                 if(moneys < 1 || moneys > 99999) { SendClientMessage(playerid, COLOR_GREY, "   Fare 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), "Vozac Busa %s je na duznosti, Fare: $%d.", sendername, TransportValue[playerid]);
                  OOCNews(TEAM_GROVE_COLOR,string);
                  SetPlayerToTeamColor(playerid);
              }
              else
              {
                  SendClientMessage(playerid, COLOR_GREY, "   Nisi vozac !");
                  return 1;
              }
           }
           else
           {
               SendClientMessage(playerid, COLOR_GREY, "   Nisi u Taxiju / Busu !");
           }
        }
        else
        {
            SendClientMessage(playerid,COLOR_GREY,"   Nisi vozac Taksija / Busa !");
            return 1;
        }
      }
      return 1;
   }


eto ti nezaboravi staviti new Text3D:taaxi[MAX_PLAYERS]; nadam se da znas di to spada :D

evo ubacio sam i kada sam compajl izbaci mi 4 errora:


C:\DOCUME~1\Brkovic\Desktop\EXONRP~1\GAMEMO~1\unt.pwn(66938) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Brkovic\Desktop\EXONRP~1\GAMEMO~1\unt.pwn(66938) : warning 215: expression has no effect
C:\DOCUME~1\Brkovic\Desktop\EXONRP~1\GAMEMO~1\unt.pwn(66938) : error 001: expected token: ";", but found ")"
C:\DOCUME~1\Brkovic\Desktop\EXONRP~1\GAMEMO~1\unt.pwn(66938) : error 029: invalid expression, assumed zero
C:\DOCUME~1\Brkovic\Desktop\EXONRP~1\GAMEMO~1\unt.pwn(66938) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664           Copyright (c) 1997-2006, ITB CompuPhase


66938 linija ima sledece:

if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14)|| PlayerInfo[playerid][pJob] == 13)


4 Errors.
Poslednja Izmena: April 21, 2011, 23:49:15 POSLE PODNE od sampzone

negdje si falio ono );

za ostale errore neznam...

if(PlayerInfo[playerid][pMember] == 10||PlayerInfo[playerid][pLeader] == 10|| PlayerInfo[playerid][pJob] == 14)|| PlayerInfo[playerid][pJob] == 13)


to je tvoje... pogledaj ovo:

PlayerInfo[playerid][pJob] == 14)|| PlayerInfo[playerid][pJob] == 13)

PlayerInfo[playerid][pJob] == 14) -> tu si stavio ) a nije kraj reda... zato ti dolazi