[PROBLEMA] Cambiar el color al vehнculo.
#2

pawn Код:
if(strcmp(cmd, "/pintar", true) == 0) {
      new tmp[256], tmp2[256];//nuevas bariables
        tmp = strtok(cmdtext,idx);//defines tmp todo en orden
      new vid = GetPlayerVehicleID(playerid);//no defines tmp2 y pasas a sacar la id del auto
        ChangeVehicleColor(GetPlayerVehicleID(playerid),strval(tmp),strval(tmp2));//como tmp2 no esta definido lo toma como un 0 = color negro
        return 1;//retorno
    }
mira el error esta en que no defines tmp2
te recomiendo este lo hice yo XD cobra $100
pawn Код:
if(strcmp(cmd, "/pintar", true) == 0)
  {
    new tmp[256];
    new cor1, cor2;
    new veiculo;
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        {
        SendClientMessage(playerid,COLOR_WHITE,"USE: /pintar [color 1] [color 2]");
    return 1;
        }
    cor1 = strval(tmp);
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
        {
        SendClientMessage(playerid,COLOR_WHITE,"USE: /pintar [color 1] [color 2]");
    return 1;
        }
    cor2 = strval(tmp);
    veiculo = GetPlayerVehicleID(playerid);
    if(IsPlayerInVehicle(playerid,veiculo))
        {
        ChangeVehicleColor(veiculo,cor1,cor2);
        GivePlayerMoney(playerid,-100);
        SendClientMessage(playerid,COLOR_WHITE, "Vehнculo repintado por: $100!");
        } else {
        SendClientMessage(playerid,COLOR_WHITE, "No estas en ningun vehiculo!.");
    }
  return 1;
  }
Reply


Messages In This Thread
[PROBLEMA] Cambiar el color al vehнculo. - by CristianTdj - 24.12.2009, 22:56
Re: [PROBLEMA] Cambiar el color al vehнculo. - by camiloasc1 - 25.12.2009, 15:13
Re: [PROBLEMA] Cambiar el color al vehнculo. - by Miguel - 25.12.2009, 15:37
Re: [PROBLEMA] Cambiar el color al vehнculo. - by camiloasc1 - 25.12.2009, 15:47
Re: [PROBLEMA] Cambiar el color al vehнculo. - by Miguel - 25.12.2009, 16:50
Re: [PROBLEMA] Cambiar el color al vehнculo. - by camiloasc1 - 25.12.2009, 17:01
Re: [PROBLEMA] Cambiar el color al vehнculo. - by elvago - 25.12.2009, 21:35
Re: [PROBLEMA] Cambiar el color al vehнculo. - by CristianTdj - 26.12.2009, 10:00

Forum Jump:


Users browsing this thread: 1 Guest(s)