SA-MP Forums Archive
[Ajuda] /veh - Quando cria o veнculo ele aparece trancado - 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] /veh - Quando cria o veнculo ele aparece trancado (/showthread.php?tid=428696)



/veh - Quando cria o veнculo ele aparece trancado - Dick_Vigarista - 06.04.2013

Quando eu digito /veh id cor cor, o carro aparece trancado. Nгo consigo entrar com ele.

Cуdigo:

PHP Code:
    if(strcmp(cmd"/veh"true) == 0)
    {
        if(
IsPlayerConnected(playerid)) 
         {
            if (
PlayerInfo[playerid][pAdmin] < 1337)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"   Vocк nгo esta autorizado a usar este comando!");
                   return 
1;
            }
            if(
CreatedCar >= 200)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 
1;
            }
              
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /veh [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
car;
               
car strval(tmp);
               if(
car 400 || car 611) { SendClientMessage(playeridCOLOR_GREY"   Modelo Do Carro Tem Que Ser Entre 411 e 600 !"); return 1; }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /veh [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
COLOR1;
               
COLOR1 strval(tmp);
               if(
COLOR1 || COLOR1 236) { SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /veh [IDCARRO] [COR1] [COR2]");
                return 
1;
               }
               new 
COLOR2;
               
COLOR2 strval(tmp);
               if(
COLOR2 || COLOR2 236) { SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
               new 
Float:X,Float:Y,Float:Z;
               
GetPlayerPos(playeridX,Y,Z);
               new 
carid CreateVehicle(carX,Y,Z0.0COLOR1COLOR260000);
               
CreatedCars[CreatedCar] = carid;
               
CreatedCar ++;
               
format(stringsizeof(string), "   Veiculo %d Criado."carid);
               
SendClientMessage(playeridCOLOR_GREYstring);
          }
          return 
1;
   } 



Re: /veh - Quando cria o veнculo ele aparece trancado - Coreia - 06.04.2013

Deve ser alguma Var que estб com o valor errado.


Re: /veh - Quando cria o veнculo ele aparece trancado - Dick_Vigarista - 06.04.2013

Tudo que eu achei sobre o comando:

PHP Code:
new CreatedCars[200];
new 
CreatedCar 0
PHP Code:
    // CreatedCars check
    
for(new 0sizeof(CreatedCars); i++)
    {
        
CreatedCars[i] = 0;
    } 



Re: /veh - Quando cria o veнculo ele aparece trancado - Dick_Vigarista - 06.04.2013

ninguйm? .-.