[Ajuda] Veiculos
#6

PHP код:
    if(strcmp(cmd"/criarveiculo"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
         {
         if (
PlayerInfo[playerid][pAdmin] >= MASTER)
         {
            if(
CreatedCar >= 200)
            {
                
SendClientMessage(playeridCOLOR_GRAD1"Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 
true;
            }
              
tmp strtok(cmdtextidx);
            if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /criarveiculo [IDCARRO] [COR1] [COR2]");
                return 
true;
               }
               new 
car;
               
car strval(tmp);
               if(
car 400 || car 611) { SendClientMessage(playeridCOLOR_GREY"   Modelo Do Carro Tem Que Ser Entre 411 e 600 !"); return true; }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /criarveiculo [IDCARRO] [COR1] [COR2]");
                return 
true;
               }
               new 
COLOR1;
               
COLOR1 strval(tmp);
               if(
COLOR1 || COLOR1 236) { SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !"); return true; }
               
tmp strtok(cmdtextidx);
               if(!
strlen(tmp))
               {
                
SendClientMessage(playeridCOLOR_GRAD2"USE: /criarveiculo [IDCARRO] [COR1] [COR2]");
                return 
true;
               }
               new 
COLOR2;
               
COLOR2 strval(tmp);
               if(
COLOR2 || COLOR2 236) { SendClientMessage(playeridCOLOR_GREY"   Nъmero Da Cor tem que ser entre 0 e 126 !"); return true; }
               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 
true;
     } 
Reply


Messages In This Thread
Veiculos - by s4kuL - 04.09.2012, 22:08
Re: Veiculos - by Delay - 04.09.2012, 22:18
Re: Veiculos - by Victor' - 04.09.2012, 22:25
Re: Veiculos - by Joao Pedro - 04.09.2012, 22:30
Re: Veiculos - by Victor' - 04.09.2012, 22:32
Respuesta: Veiculos - by Lucas_Rocha - 04.09.2012, 22:35
Re: Veiculos - by s4kuL - 04.09.2012, 22:50
Re: Veiculos - by LeLeTe - 04.09.2012, 23:36
Re: Veiculos - by s4kuL - 04.09.2012, 23:41

Forum Jump:


Users browsing this thread: 1 Guest(s)