Es können alle autos fahren

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.


    Habe ein Fehler und es stresst.


    Also..wenn ein spieler kein führrerschein hat kann er trozdem ein auto fahren..
    Kann mir jemand sagen wie ich das machen kann....NUR wenn jemand ein FÜHRRERSCHEIN hat dann kann er erst ein auto fahren.

  • Function OnPlayerStateChange(playerid, newstate, oldstate)
    {
    M_OnPlayerStateChange(playerid, newstate, oldstate);
    new string[256];


    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
    if(IsABike(GetPlayerVehicleID(playerid)))
    {
    switch(GetPlayerSkin(playerid))
    {
    #define SPAO{%0,%1,%2,%3,%4,%5} SetPlayerAttachedObject(playerid, SLOT, 18645, 2, (%0), (%1), (%2), (%3), (%4), (%5));
    case 0, 65, 74, 149, 208, 273: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 75.000000, 0.000000}
    case 1..6, 8, 14, 16, 22, 27, 29, 33, 41..49, 82..84, 86, 87, 119, 289: SPAO{0.070000, 0.000000, 0.000000, 88.000000, 77.000000, 0.000000}
    case 7, 10: SPAO{0.090000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
    case 9: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
    case 11..13: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 90.000000, 0.000000}
    case 15: SPAO{0.059999, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
    case 17..21: SPAO{0.059999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 23..26, 28, 30..32, 34..39, 57, 58, 98, 99, 104..118, 120..131: SPAO{0.079999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 40: SPAO{0.050000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 50, 100..103, 148, 150..189, 222: SPAO{0.070000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 51..54: SPAO{0.100000, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 55, 56, 63, 64, 66..73, 75, 76, 78..81, 133..143, 147, 190..207, 209..219, 221, 247..272, 274..288, 290..293: SPAO{0.070000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 59..62: SPAO{0.079999, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 77: SPAO{0.059999, 0.019999, 0.000000, 87.000000, 82.000000, 0.000000}
    case 85, 88, 89: SPAO{0.070000, 0.039999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 90..97: SPAO{0.050000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 132: SPAO{0.000000, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 144..146: SPAO{0.090000, 0.000000, 0.000000, 88.000000, 82.000000, 0.000000}
    case 220: SPAO{0.029999, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 223, 246: SPAO{0.070000, 0.050000, 0.000000, 88.000000, 82.000000, 0.000000}
    case 224..245: SPAO{0.070000, 0.029999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 294: SPAO{0.070000, 0.019999, 0.000000, 91.000000, 84.000000, 0.000000}
    case 295: SPAO{0.050000, 0.019998, 0.000000, 86.000000, 82.000000, 0.000000}
    case 296..298: SPAO{0.064999, 0.009999, 0.000000, 88.000000, 82.000000, 0.000000}
    case 299: SPAO{0.064998, 0.019999, 0.000000, 88.000000, 82.000000, 0.000000}
    }
    }
    }



    ODer brauchst du mehr?

  • Kann ich net Schicken zuviel zeilen......Was soll drinen stehn oder nach was soll ich suchen ....dann kann ich ja so schicken....oder sag einfach was ich da machen soll





    Bz else if(IsABike(newcar))
    {
    if(PlayerInfo[playerid][pMotoLic] < 1)
    {
    new oschein[257];
    new sendername[MAX_PLAYER_NAME];
    if(TakingLesson[playerid] == 1) { }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du hast kein Motorrad Schein !");
    SendClientMessage(playerid, COLOR_GREY, " Wenn du erwischt wirst, wird das Folgen haben!");
    GetPlayerName(playerid, sendername, sizeof(sendername));
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInFrac(i, 1) || IsPlayerInFrac(i, 2) || IsPlayerInFrac(i, 22))
    {
    format(oschein, sizeof(oschein), "HQ: VORSICHT %s Fährt Motorrad ohne Motorrad Schein", sendername);
    SendClientMessage(i, COLOR_RED, oschein);
    }
    }
    }
    }
    }

  • forward Auto(carid);



    public Auto(carid)
    {
    new car = GetVehicleModel(carid);
    if(car == 400 || car == 401 || car == 402 || car == 404 || car == 405 || car == 409 || car == 410 || car == 411 || car == 412 || car == 413 || car == 414 || car == 415
    || car == 416 || car == 418 || car == 419 || car == 420 || car == 421 || car == 422 || car == 423 || car == 424 || car == 426 || car == 427 || car == 428 || car == 429
    || car == 431 || car == 434 || car == 436 || car == 437 || car == 438 || car == 439 || car == 440 || car == 442 || car == 444 || car == 445 || car == 451 || car == 456
    || car == 458 || car == 459 || car == 466 || car == 467 || car == 470 || car == 474 || car == 475 || car == 477 || car == 478 || car == 479 || car == 480 || car == 482
    || car == 483 || car == 485 || car == 486 || car == 489 || car == 490 || car == 491 || car == 492 || car == 494 || car == 495 || car == 496 || car == 498 || car == 499
    || car == 500 || car == 502 || car == 503 || car == 504 || car == 505 || car == 506 || car == 507 || car == 508 || car == 516 || car == 517 || car == 518 || car == 525
    || car == 526 || car == 527 || car == 528 || car == 529 || car == 533 || car == 534 || car == 535 || car == 536 || car == 540 || car == 541 || car == 542 || car == 543
    || car == 545 || car == 546 || car == 547 || car == 549 || car == 550 || car == 551 || car == 552 || car == 554 || car == 555 || car == 556 || car == 557 || car == 558
    || car == 559 || car == 560 || car == 561 || car == 562 || car == 565 || car == 566 || car == 567 || car == 568 || car == 573 || car == 575 || car == 576 || car == 579
    || car == 580 || car == 582 || car == 583 || car == 585 || car == 587 || car == 588 || car == 589 || car == 596 || car == 597 || car == 598 || car == 599 || car == 600
    || car == 601 || car == 602 || car == 603 || car == 604 || car == 605 || car == 609)
    {
    return 1;
    }
    return 0;
    }



    if(Auto(carid) && newstate == PLAYER_STATE_DRIVER)
    {
    if(DEINEABFRAGE[playerid][DEINEABFRAGE] == 1) { } //Schein
    else
    {
    SendClientMessage(playerid,Rot,"Du hast keinen Führerschein!");
    RemovePlayerFromVehicle(playerid);
    }
    }

  • else if(IsABike(newcar))
    {
    if(PlayerInfo[playerid][pMotoLic] < 1)
    {
    new oschein[257];
    new sendername[MAX_PLAYER_NAME];
    if(TakingLesson[playerid] == 1) { }
    else
    {
    SendClientMessage(playerid, COLOR_GREY, " Du hast kein Motorrad Schein !");
    SendClientMessage(playerid, COLOR_GREY, " Wenn du erwischt wirst, wird das Folgen haben!");
    GetPlayerName(playerid, sendername, sizeof(sendername));
    for(new i=0; i<MAX_PLAYERS; i++)
    {
    if(IsPlayerInFrac(i, 1) || IsPlayerInFrac(i, 2) || IsPlayerInFrac(i, 22))
    {
    format(oschein, sizeof(oschein), "HQ: VORSICHT %s Fährt Motorrad ohne Motorrad Schein", sendername);
    SendClientMessage(i, COLOR_RED, oschein);
    }
    }
    }
    }
    }




    und hier nix ändern?

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