Problem bei vehicleid

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • Hallo Com,
    ich habe ein kleines Problem ich habe eine
    Fühererschein abfrage leider geht es nicht weil es zum error bei vehicleid kommt
    was mich iritiert weil ich habe es auch so bei IsNoNitroCar gemacht und da kommen keine errors ???


    stock IsNoNitroCar(vehicleid)
    {
    if(vehicleid == 581 || vehicleid == 523 || vehicleid == 462 || vehicleid == 521 ||
    vehicleid == 463 || vehicleid == 522 || vehicleid == 461 || vehicleid == 448 ||
    vehicleid == 468 || vehicleid == 586 || vehicleid == 509 || vehicleid == 481 ||
    vehicleid == 510 || vehicleid == 472 || vehicleid == 473 || vehicleid == 493 ||
    vehicleid == 595 || vehicleid == 484 || vehicleid == 430 || vehicleid == 453 ||
    vehicleid == 452 || vehicleid == 446 || vehicleid == 454 || vehicleid == 590 ||
    vehicleid == 569 || vehicleid == 537 || vehicleid == 538 || vehicleid == 570 ||
    vehicleid == 449 || vehicleid == 406)
    {
    return 1;
    }
    else return 0;
    }





    C:\Users\EliteBread\Desktop\Spiele usw\Andere Programme\Daten\Selfmade Script\gamemodes\Bread.pwn(2885) : error 017: undefined symbol "vehicleid"
    C:\Users\EliteBread\Desktop\Spiele usw\Andere Programme\Daten\Selfmade Script\gamemodes\Bread.pwn(2895) : error 017: undefined symbol "vehicleid"
    C:\Users\EliteBread\Desktop\Spiele usw\Andere Programme\Daten\Selfmade Script\gamemodes\Bread.pwn(2927) : error 017: undefined symbol "vehicleid"
    Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    3 Errors.

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777


  • stock IsNoNitroCar(vehicleid)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    if(vehicleid == 581 || vehicleid == 523 || vehicleid == 462 || vehicleid == 521 ||
    vehicleid == 463 || vehicleid == 522 || vehicleid == 461 || vehicleid == 448 ||
    vehicleid == 468 || vehicleid == 586 || vehicleid == 509 || vehicleid == 481 ||
    vehicleid == 510 || vehicleid == 472 || vehicleid == 473 || vehicleid == 493 ||
    vehicleid == 595 || vehicleid == 484 || vehicleid == 430 || vehicleid == 453 ||
    vehicleid == 452 || vehicleid == 446 || vehicleid == 454 || vehicleid == 590 ||
    vehicleid == 569 || vehicleid == 537 || vehicleid == 538 || vehicleid == 570 ||
    vehicleid == 449 || vehicleid == 406)
    {
    return 1;
    }
    else return 0;
    }


    lg :thumbup:

    RTL - Das N steht für Niveau!
    MfG,
    StreetS


    Jegliche Freundesanfragen, die für mich keinen Sinn ergeben, werden professionell Ignoriert. (Gleiche mit Skype!)
    Wer es nicht kapiert wird in Breadfish & Skype blockiert.


    - Stolzer PAWN Scripter der Klasse Beherrscht


  • Quatsch, vehicleid wird ja über die Funktion übergeben.


    Du musst überall wo du IsNoNitroCar benutzt folgendes vorher einfügen:


    new vehicleid = GetPlayerVehicleID(playerid);
    Und dann benutzt du
    IsNoNitroCar(vehicleid)

  • stock IsNoNitroCar(vehicleid)
    {
    vehicleid = GetVehicleModel(vehicleid);
    if(vehicleid == 581 || vehicleid == 523 || vehicleid == 462 || vehicleid == 521 ||
    vehicleid == 463 || vehicleid == 522 || vehicleid == 461 || vehicleid == 448 ||
    vehicleid == 468 || vehicleid == 586 || vehicleid == 509 || vehicleid == 481 ||
    vehicleid == 510 || vehicleid == 472 || vehicleid == 473 || vehicleid == 493 ||
    vehicleid == 595 || vehicleid == 484 || vehicleid == 430 || vehicleid == 453 ||
    vehicleid == 452 || vehicleid == 446 || vehicleid == 454 || vehicleid == 590 ||
    vehicleid == 569 || vehicleid == 537 || vehicleid == 538 || vehicleid == 570 ||
    vehicleid == 449 || vehicleid == 406)
    {
    return 1;
    }
    else return 0;
    }


    Wenn Vehicleid das Fahrzeugmodell beinhalten soll, ist diese Variante richtig.
    GetPlayerVehicleID nimmt die ID des Fahrzeugs, NICHT die ModelID.

  • dabei geht es ja aber hier bei nicht


    public OnPlayerStateChange(playerid, newstate, oldstate)
    {
    if(vehicleid == 448 || vehicleid == 461 || vehicleid == 462 || vehicleid == 463 || vehicleid == 468 || vehicleid == 471 || vehicleid == 521
    || vehicleid == 522 || vehicleid == 523 || vehicleid == 581 || vehicleid == 586)
    {
    if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[playerid][BikeL] != 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, Rot, "Du hast keinen Motorradschein");
    }
    }


    if(vehicleid == 400 || vehicleid == 401 || vehicleid == 402 || vehicleid == 404 || vehicleid == 405 ||
    vehicleid == 409 || vehicleid == 410 || vehicleid == 411 || vehicleid == 412 || vehicleid == 413 ||
    vehicleid == 414 || vehicleid == 415 || vehicleid == 416 || vehicleid == 418 || vehicleid == 419 ||
    vehicleid == 420 || vehicleid == 421 || vehicleid == 422 || vehicleid == 423 || vehicleid == 424 ||
    vehicleid == 426 || vehicleid == 496 || vehicleid == 541 ||
    vehicleid == 427 || vehicleid == 428 || vehicleid == 429 || vehicleid == 434 || vehicleid == 436 ||
    vehicleid == 438 || vehicleid == 439 || vehicleid == 440 || vehicleid == 442 || vehicleid == 445 ||
    vehicleid == 451 || vehicleid == 458 || vehicleid == 459 || vehicleid == 466 || vehicleid == 467 ||
    vehicleid == 470 || vehicleid == 474 || vehicleid == 475 || vehicleid == 477 || vehicleid == 478 ||
    vehicleid == 479 || vehicleid == 480 || vehicleid == 482 || vehicleid == 483 || vehicleid == 489 ||
    vehicleid == 490 || vehicleid == 491 || vehicleid == 492 || vehicleid == 494 || vehicleid == 495 ||
    vehicleid == 498 || vehicleid == 499 || vehicleid == 500 || vehicleid == 502 || vehicleid == 503 ||
    vehicleid == 504 || vehicleid == 505 || vehicleid == 506 || vehicleid == 507 || vehicleid == 508 ||
    vehicleid == 516 || vehicleid == 517 || vehicleid == 518 || vehicleid == 525 || vehicleid == 526 ||
    vehicleid == 527 || vehicleid == 528 || vehicleid == 529 || vehicleid == 531 || vehicleid == 532 ||
    vehicleid == 533 || vehicleid == 534 || vehicleid == 535 || vehicleid == 536 || vehicleid == 540 ||
    vehicleid == 542 || vehicleid == 543 || vehicleid == 545 || vehicleid == 546 || vehicleid == 547 ||
    vehicleid == 549 || vehicleid == 550 || vehicleid == 551 || vehicleid == 552 || vehicleid == 554 ||
    vehicleid == 555 || vehicleid == 558 || vehicleid == 560 || vehicleid == 561 || vehicleid == 562 ||
    vehicleid == 565 || vehicleid == 566 || vehicleid == 567 || vehicleid == 568 || vehicleid == 573 ||
    vehicleid == 575 || vehicleid == 576 || vehicleid == 579 || vehicleid == 580 || vehicleid == 496 ||
    vehicleid == 582 || vehicleid == 585 || vehicleid == 587 || vehicleid == 588 || vehicleid == 589 ||
    vehicleid == 596 || vehicleid == 597 || vehicleid == 598 || vehicleid == 599 || vehicleid == 600 ||
    vehicleid == 601 || vehicleid == 602 || vehicleid == 603 || vehicleid == 604 || vehicleid == 605 ||
    vehicleid == 609)
    {
    if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[playerid][CarL] != 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, Rot, "Du hast keinen Fühererschein");
    }
    }
    if(vehicleid == 417 || vehicleid == 425 ||
    vehicleid == 447 || vehicleid == 460 ||
    vehicleid == 469 || vehicleid == 476 ||
    vehicleid == 487 || vehicleid == 488 ||
    vehicleid == 497 || vehicleid == 511 ||
    vehicleid == 512 || vehicleid == 513 ||
    vehicleid == 519 || vehicleid == 520 ||
    vehicleid == 548 || vehicleid == 553 ||
    vehicleid == 563 || vehicleid == 577 ||
    vehicleid == 592 || vehicleid == 593)
    {
    if(newstate == PLAYER_STATE_DRIVER && PlayerInfo[playerid][FlyL] != 1)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid, Rot, "Du hast keinen Flugschein");
    }
    }
    da kommt die errors

    ↓Das ist der Youtube Channel von mir und meinen Kollegen↓



    Sa-Mp Server [Im Aufbau/Beta]
    128.65.216.200:7777

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen