[ajuda]funзгo do carro invalido
#1

ajudem ai pessoal, eu nгo estou a conseguir fazer a funзгo, nгo dб erros, mas nгo funciona
pawn Код:
//...
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GREY, "[USO:] /car buy [car id]");
                    return 1;
                }
                new amodel;
            amodel = strval(tmp);
                if(IsInvalidCar(playerid) == strval(tmp))
            {
                    SendClientMessage(playerid, COLOR_GRAD2, "Carro Invбlido!");
                    return 1;
            }//...

stock IsInvalidCar(Carid)
{
  #define   MAX_BAD_CARS 83
  new BadCars[MAX_BAD_CARS] =
  {
        611, 610, 608, 607, 606, 601, 599, 598, 597,
        596, 594, 592, 591, 590, 588, 584, 582, 583,
        577, 574, 573, 572, 570, 564, 563, 557, 556,
        553, 553, 548, 544, 538, 537, 532, 530, 525,
        524, 523, 520, 509, 504, 503, 502, 501, 499,
        497, 495, 494, 490, 488, 486, 486, 581, 569,
        564, 457, 456, 450, 449, 448, 447, 444, 443,
        441, 438, 437, 435, 433, 432, 431, 430, 428,
        427, 425, 423, 420, 417, 416, 414, 408, 407,
        406, 403
  };
  #undef MAX_BAD_CARS
  #pragma unused Carid
  #pragma unused BadCars
  return 1;
}
Reply
#2

ok... agora tentei fazer isto mas nгo estб a dar:
pawn Код:
public IsAStundCar(vehicleid)
{  new model = GetVehicleModel(vehicleid);
    if(model == 400 || model == 401 || model == 402 || model == 404 || model == 405 || model == 409 || model == 410 || model == 411 || model == 412 || model == 413 || model == 415 || model == 418 || model == 419 || model == 421 || model == 422 || model == 424 || model == 426 || model == 429 || model == 434 || model == 436 || model == 439 || model == 440 || model == 442 || model == 445 || model == 451 || model == 458 || model == 461 || model == 462 || model == 463 || model == 466 || model == 467 || model == 468 || model == 470 || model == 471 || model == 474 || model == 475 || model == 477 || model == 478 || model == 479 || model == 480 || model == 482 || model == 483 || model == 489 || model == 491 || model == 492 || model == 496 || model == 498 || model == 500 || model == 505 || model == 506 || model == 507 || model == 508 || model == 516 || model == 517 || model == 518 || model == 521 || model == 522 || model == 526 || model == 527 || model == 529 || model == 531 || model == 533 || model == 534 || model == 535 || model == 536 || model == 540 || model == 541 || model == 542 || model == 543 || model == 545 || model == 546 || model == 547 || model == 549 || model == 550 || model == 551 || model == 554 || model == 555 || model == 558 || model == 559 || model == 560 || model == 561 || model == 562 || model == 565 || model == 566 || model == 567 || model == 572 || model == 575 || model == 576 || model == 579 || model == 580 || model == 581 || model == 585 || model == 586 || model == 587 || model == 589 || model == 600 || model == 602 || model == 603 || model == 604 || model == 605)
    {
        return 1;
    }
    return 0;
}
mas da estes erros:
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19323) : warning 235: public function lacks forward declaration (symbol "IsAStundCar")
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19324) : error 075: input line too long (after substitutions)
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19325) : error 075: input line too long (after substitutions)
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19327) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19327 -- 19328) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19328) : error 001: expected token: ";", but found ")"
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19328) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\GTA San Andreas\server\gamemodes\BC_RP.pwn(19328) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


6 Errors.
Reply
#3

pawn Код:
forward IsAStundCar(vehicleid);/* Vocк ja deveria sabe isso mocinho :mrgreen:*/
public IsAStundCar(vehicleid)
{
new model = GetVehicleModel(vehicleid);
if(model == 400 || model == 401 || model == 402 || model == 404 || model == 405 || model == 409 || model == 410 || model == 411 || model == 412 || model == 413 || model == 415 || model == 418 || model == 419 || model == 421 || model == 422 || model == 424 || model == 426 || model == 429 || model == 434 || model == 436 || model == 439 || model == 440 || model == 442 || model == 445 || model == 451 || model == 458 || model == 461 || model == 462 || model == 463 || model == 466 || model == 467 || model == 468 || model == 470 || model == 471 || model == 474 || model == 475 || model == 477 || model == 478 || model == 479 || model == 480 || model == 482 || model == 483 || model == 489 || model == 491 || model == 492 || model == 496 || model == 498 || model == 500 || model == 505 || model == 506 || model == 507 || model == 508 || model == 516 || model == 517 || model == 518 || model == 521 || model == 522 || model == 526 || model == 527 || model == 529 || model == 531 || model == 533 || model == 534 || model == 535 || model == 536 || model == 540 || model == 541 || model == 542 || model == 543 || model == 545 || model == 546 || model == 547 || model == 549 || model == 550 || model == 551 || model == 554 || model == 555 || model == 558 || model == 559 || model == 560 || model == 561 || model == 562 || model == 565 || model == 566 || model == 567 || model == 572 || model == 575 || model == 576 || model == 579 || model == 580 || model == 581 || model == 585 || model == 586 || model == 587 || model == 589 || model == 600 || model == 602 || model == 603 || model == 604 || model == 605)
{
/* ALGUM CУDIGO AQUI */
}
return 1;
}
return 0;
}
Reply
#4

ja tinha feito isso, o problema й ser tгo comprido, vi isso agora
o
Код:
forward
estб no inico e nгo pode ter nenhum codigo exp:
pawn Код:
public IsABoat(vehicleid)
{  new model = GetVehicleModel(vehicleid);
    if(model == 430 || model == 446 || model == 452 || model == 453 || model == 454 || model == 472 || model == 573 || model == 484 || model == 493 || model == 595)
    {
        return 1;
    }
    return 0;
}
neste nгo dб erros o problema й ser comprido mas nгo sei resolver isso
Reply
#5

tentei assim:
mas nгo estб a dar
pawn Код:
public IsAStandCar(vehicleid)
{  new model = GetVehicleModel(vehicleid);
    if(model == CarModels[1])
    {
        return 1;
    }
    return 0;
}

new CarModels[100] =
{
    400,
    401,
    402,
    404,
    405,
    409,
    410,
    411,
    412,
    413,
    415,
    418,
    419,
    421,
    422,
    424,
    426,
    429,
    434,
    436,
    439,
    440,
    442,
    445,
    451,
    458,
    461,
    462,
    463,
    466,
    467,
    468,
    470,
    471,
    474,
    475,
    477,
    478,
    479,
    480,
    482,
    483,
    489,
    491,
    492,
    496,
    498,
    500,
    505,
    506,
    507,
    508,
    516,
    517,
    518,
    521,
    522,
    526,
    527,
    529,
    531,
    533,
    534,
    535,
    536,
    540,
    541,
    542,
    543,
    545,
    546,
    547,
    549,
    550,
    551,
    554,
    555,
    558,
    559,
    560,
    561,
    562,
    565,
    566,
    567,
    572,
    575,
    576,
    579,
    580,
    581,
    585,
    586,
    587,
    589,
    600,
    602,
    603,
    604,
    605
};
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)