Auto Schein Problem

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
  • Hey,
    Ich arbeite an meinem Selfmade Script und will jetzt die Licenses machen..
    Das Register System usw.. hab ich alles richtig gemacht und ich hab jetzt ein Problem
    Ich hab das in meinem Script:



    Oben bei meinen forwards

    forward IsACar(playerid);


    Bei OnPlayerStateChange

    if(newstate == PLAYER_STATE_DRIVER)
    {
    IsACar(playerid);
    }


    Und ganz unten für mein public von IsACar:

    public IsACar(playerid)
    {
    new vehi = GetPlayerVehicleID(playerid);
    if(vehi==400||vehi==401||vehi==402||vehi==404||vehi==405||vehi==409||vehi==410||vehi==411||vehi==412||vehi==413||vehi==414||vehi==415||vehi==416||vehi==418||vehi==419||vehi==420||vehi==421
    ||vehi==422||vehi==423||vehi==424||vehi==426||vehi==427||vehi==428||vehi==429||vehi==431||vehi==432||vehi==434||vehi==435||vehi==436||vehi==437||vehi==438||vehi==439||vehi==440||vehi==441
    ||vehi==442||vehi==444||vehi==445||vehi==451||vehi==451||vehi==457||vehi==458||vehi==459||vehi==466||vehi==467||vehi==470||vehi==474||vehi==475||vehi==477||vehi==478||vehi==479||vehi==480
    ||vehi==482||vehi==483||vehi==485||vehi==489||vehi==490||vehi==490||vehi==491||vehi==492||vehi==494||vehi==495||vehi==496||vehi==498||vehi==499||vehi==500||vehi==502||vehi==503||vehi==504
    ||vehi==505||vehi==506||vehi==507||vehi==508||vehi==516||vehi==517||vehi==518||vehi==525||vehi==526||vehi==527||vehi==528||vehi==529||vehi==530||vehi==531||vehi==532||vehi==533||vehi==534
    ||vehi==535||vehi==536||vehi==539||vehi==540||vehi==541||vehi==542||vehi==543||vehi==545||vehi==546||vehi==547||vehi==549||vehi==550||vehi==551||vehi==552||vehi==554||vehi==555||vehi==556
    ||vehi==557||vehi==558||vehi==559||vehi==560||vehi==561||vehi==562||vehi==564||vehi==565||vehi==566||vehi==567||vehi==568||vehi==571||vehi==572||vehi==573||vehi==574||vehi==575||vehi==576
    ||vehi==579||vehi==580||vehi==582||vehi==583||vehi==585||vehi==587||vehi==588||vehi==589||vehi==596||vehi==597||vehi==598||vehi==599||vehi==600||vehi==601||vehi==602||vehi==603||vehi==604
    ||vehi==605||vehi==609)
    {
    if(Spieler[playerid][AutoSchein] == 0)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,COLOR_RED,"Du hast keinen Auto Schein");
    }
    }
    }



    Blöderweise kann man noch in das Auto einsteigen...
    Kann jemand zeigen/erklären wie das gemacht sein muss ?

  • public IsACar(playerid)
    {
    new vehi = GetPlayerVehicleID(playerid);
    if(vehi==400||vehi==401||vehi==402||vehi==404||vehi==405||vehi==409||vehi==410||vehi==411||vehi==412||vehi==413||vehi==414||vehi==415||vehi==416||vehi==418||vehi==419||vehi==420||vehi==421
    ||vehi==422||vehi==423||vehi==424||vehi==426||vehi==427||vehi==428||vehi==429||vehi==431||vehi==432||vehi==434||vehi==435||vehi==436||vehi==437||vehi==438||vehi==439||vehi==440||vehi==441
    ||vehi==442||vehi==444||vehi==445||vehi==451||vehi==451||vehi==457||vehi==458||vehi==459||vehi==466||vehi==467||vehi==470||vehi==474||vehi==475||vehi==477||vehi==478||vehi==479||vehi==480
    ||vehi==482||vehi==483||vehi==485||vehi==489||vehi==490||vehi==490||vehi==491||vehi==492||vehi==494||vehi==495||vehi==496||vehi==498||vehi==499||vehi==500||vehi==502||vehi==503||vehi==504
    ||vehi==505||vehi==506||vehi==507||vehi==508||vehi==516||vehi==517||vehi==518||vehi==525||vehi==526||vehi==527||vehi==528||vehi==529||vehi==530||vehi==531||vehi==532||vehi==533||vehi==534
    ||vehi==535||vehi==536||vehi==539||vehi==540||vehi==541||vehi==542||vehi==543||vehi==545||vehi==546||vehi==547||vehi==549||vehi==550||vehi==551||vehi==552||vehi==554||vehi==555||vehi==556
    ||vehi==557||vehi==558||vehi==559||vehi==560||vehi==561||vehi==562||vehi==564||vehi==565||vehi==566||vehi==567||vehi==568||vehi==571||vehi==572||vehi==573||vehi==574||vehi==575||vehi==576
    ||vehi==579||vehi==580||vehi==582||vehi==583||vehi==585||vehi==587||vehi==588||vehi==589||vehi==596||vehi==597||vehi==598||vehi==599||vehi==600||vehi==601||vehi==602||vehi==603||vehi==604
    ||vehi==605||vehi==609)
    {
    if(Spieler[playerid][AutoSchein] == 0)
    {
    RemovePlayerFromVehicle(playerid);
    return SendClientMessage(playerid,COLOR_RED,"Du hast keinen Auto Schein");
    }
    }
    return 1;
    }


    Schonmal so probiert?

  • Mhhh mach es doch lieber so vllt gehts dann:
    forward IsACar(vehicleid);

    if(newstate == PLAYER_STATE_DRIVER)
    {
    new vehicleid = GetPlayerVehicleID(playerid);
    if (IsACar(vehicleid))
    {
    if(Spieler[playerid][AutoSchein] == 0)
    {
    RemovePlayerFromVehicle(playerid);
    SendClientMessage(playerid,COLOR_RED,"Du hast keinen Auto Schein");
    }


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

    The fact is, I am right. And if you think I'm wrong, you are wrong.

  • funktioniert leider nicht



    edit: hab das Problem selber gelöst :D

    Einmal editiert, zuletzt von Sascha_Loisi ()