Hilfe bei Bus System

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
  • Guten Tag,


    heute habe ich mich an mein Bus System dran gemacht habe es soweit auch geschafft. Allerdings bin ich noch nach 6 Sekunden gefreezed was eig nicht so sein sollte.


    Hier einmal der Code:


    if(L1Checkpoint[playerid]==1)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(tmpcar) == 431 || GetVehicleModel(tmpcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    SetPlayerCheckpoint(playerid,776.9352,-1042.2952,24.2814,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: LS Friedhof", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=2;
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus.");
    }
    }
    else if(L1Checkpoint[playerid]==2)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(tmpcar) == 431 || GetVehicleModel(tmpcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    SetPlayerCheckpoint(playerid,623.6121,-1254.5010,17.6575,6.0);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    ProxDetector(5.0, playerid, "Nächster Halt: LCN HQ", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    L1Checkpoint[playerid]=3;
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus.");
    }
    }
    else if(L1Checkpoint[playerid]==3)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(tmpcar) == 431 || GetVehicleModel(tmpcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    SetPlayerCheckpoint(playerid,505.9393,-1414.6676,16.0744,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: Noobspawn", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=4;
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus.");
    }
    }
    else if(L1Checkpoint[playerid]==4)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(tmpcar) == 431 || GetVehicleModel(tmpcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    SetPlayerCheckpoint(playerid,394.2750,-1654.1613,31.1475,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: Angelsteg", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=5;
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus.");
    }
    }
    else if(L1Checkpoint[playerid]==5)
    {
    SetPlayerCheckpoint(playerid,1033.9972,-1615.7546,13.4760,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: Jobcenter", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=6;
    }
    else if(L1Checkpoint[playerid]==6)
    {
    SetPlayerCheckpoint(playerid,1175.2574,-1855.5714,13.4916,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: Altes Busdepot", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=7;
    }
    else if(L1Checkpoint[playerid]==7)
    {
    SetPlayerCheckpoint(playerid,1481.6018,-1735.8101,13.4760,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: Stadthalle", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=8;
    }
    else if(L1Checkpoint[playerid]==8)
    {
    SetPlayerCheckpoint(playerid,1854.5161,-1755.6998,13.4761,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: Alhambra", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=9;
    }
    else if(L1Checkpoint[playerid]==9)
    {
    SetPlayerCheckpoint(playerid,1717.9143,-1356.6332,13.4759,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: LS Downtown", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=10;
    }
    else if(L1Checkpoint[playerid]==10)
    {
    SetPlayerCheckpoint(playerid,1461.2816,-1030.4275,23.7494,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: LS Bank", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=11;
    }
    else if(L1Checkpoint[playerid]==11)
    {
    SetPlayerCheckpoint(playerid,1181.5731,-936.9670,42.8555,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: BSN", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L1Checkpoint[playerid]=12;
    }
    else if(L1Checkpoint[playerid]==12)
    {
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"Sie haben diese Linie beendet und erhälten $6000.");
    ProxDetector(5.0, playerid, "Endstelle. Wir bitten alle Fahrgäste auszusteigen.", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    P_GivePlayerMoney(playerid,2800);
    DisablePlayerCheckpoint(playerid);
    L1Checkpoint[playerid]=0;
    }
    //LS Linie 2
    //BSN
    if(L2Checkpoint[playerid]==1)
    {
    new tmpcar = GetPlayerVehicleID(playerid);
    if(GetVehicleModel(tmpcar) == 431 || GetVehicleModel(tmpcar) == 437 &&(GetPlayerState(playerid)==PLAYER_STATE_DRIVER))
    {
    SetPlayerCheckpoint(playerid,794.0136,-1350.2284,13.1138,6.0);
    ProxDetector(5.0, playerid, "Nächster Halt: Market Station", COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE,COLOR_LIGHTBLUE);
    TogglePlayerControllable(playerid,false);
    SetTimerEx("HaltestelleTimer",6000,0,"i",playerid);
    L2Checkpoint[playerid]=2;
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Sie sind in keinem Bus.");
    }
    }

  • Beitrag von whitetiiger ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.
  • Ja mein Bus System Funktioniert. Alles so wie es soll. Der nächste Schritt ist eine Time Anzeige zu realisieren aber da will ich erstmal selbst dran arbeiten bevor ich hier rum frage =D


    Denn viel Spaß mit dein Bus System :D und Gute Nacht

    Mit Freundlichen Grüßen
    Whitetiiger aka. Kaito-sensei
    P.s. Alle mit #IRONIE bestätigten Sätze von mir, sind als Ironie anzusehen.