SA-MP Forums Archive
[Ajuda] comando para criar veiculos - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] comando para criar veiculos (/showthread.php?tid=449692)



comando para criar veiculos - RPB - 09.07.2013

alguem podia me ajudar a criar um comando para criar veiculos para eles ficarem a venda na concessionaria. ficaria muito grato se alguem podesse me ajudar


Re: comando para criar veiculos - silenthill - 09.07.2013

procura no search pelo /ccar e estuda o codigo


Re: comando para criar veiculos - RPB - 10.07.2013

parece q esse comando n existe no meu gm o unico q eu uso pra isso e /criarcarro mas esse n deixa o carro a venda


Re: comando para criar veiculos - LucaAllexandre - 10.07.2013

vocк, quer um sistema de concessionaria? й isso? use Search!

depois pra mudar os carros que estгo na concessionaria, mude pelo codigo, ou adicione usando CreateVehicleEx...

Entendeu?


Re: comando para criar veiculos - silenthill - 10.07.2013

Ponha o seu /criarcarro aqui, pra ficar mais facil as pessoas te ajudar


Re: comando para criar veiculos - RPB - 10.07.2013

ok vlw ae. te agradeзo cara


Re: comando para criar veiculos - RPB - 10.07.2013

ok o cod ta ai, se n existir como fazer nd nesse cod ta de boa
PHP код:
    if(strcmp(cmd, "/criarcarro", true) == 0)
    {
        if(
IsPlayerConnected(playerid))
         {
            if (
PlayerInfo[playerid][pAdmin] < 1338)
            {
                
SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
                   return 
1;
            }
            if(
admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341 && PlayerInfo[playerid][pAdmin] != 1340)
            {
                
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/jogar)");
                return 
1;
            }
            if(
CreatedCar >= 96)
            {
                
SendClientMessage(playerid, COLOR_GRAD1, "Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 
1;
            }
              
tmp = strtok(cmdtext, idx);
            if(!
strlen(tmp))
               {
                
SendClientMessage(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
car;
               
car = strval(tmp);
               if(
car < 400 || car > 611) { SendClientMessage(playerid, COLOR_GREY, "   Modelo Do Carro Tem Que Ser Entre 411 e 600 !"); return 1; }
               
tmp = strtok(cmdtext, idx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
COLOR1;
               
COLOR1 = strval(tmp);
               if(
COLOR1 < 0 || COLOR1 > 252) { SendClientMessage(playerid, COLOR_GREY, "   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
               
tmp = strtok(cmdtext, idx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
COLOR2;
               
COLOR2 = strval(tmp);
               if(
COLOR2 < 0 || COLOR2 > 252) { SendClientMessage(playerid, COLOR_GREY, "   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
               new 
Float:X,Float:Y,Float:Z;
               
GetPlayerPos(playerid, X,Y,Z);
               new 
carid = CreateVehicle(car, X,Y,Z, 0.0, COLOR1, COLOR2, 60000);
               
CreatedCars[CreatedCar] = carid;
               
CreatedCar ++;
               
format(string, sizeof(string), "   Veiculo %d Criado.", carid);
               
SendClientMessage(playerid, COLOR_GREY, string);
          }
          return 
1;
     }