Job | Freeze

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 Leutz,
    Habe nen Kleines Prob. Wenn ich den Beruf "Straßenbahnfahrer" Machen möchte, und in den 1. Checkpoint fahre, Bin ich Zwar für 10 Sekunden Gefreezt aber Meine Bahn Fährt weiter.
    Wie behebe ich diesen kleinen Bug?
    LG
    Crocky


    Code :

    Spoiler anzeigen
    forward Tram(playerid);
    public Tram(playerid)
    {
    new Float:X,Float:Y,Float:Z;
    GetPlayerPos(playerid,X,Y,Z);
    TogglePlayerControllable(playerid,1);
    PlayerPlaySound(playerid, 1057, X, Y, Z);
    return 1;
    }

    Spoiler anzeigen
    if(TramvajVozacPosao[playerid] == 1)
    {
    if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 449)
    {
    if(CP[playerid] == 65)
    {
    CP[playerid] = 66;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 2284.8750,-1242.3596,24.6223,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 66)
    {
    CP[playerid] = 67;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 1994.2841,-499.2993,72.4063,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 67)
    {
    CP[playerid] = 68;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 2818.9097,115.7715,24.1249,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 68)
    {
    CP[playerid] = 69;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 2864.7500,1299.0325,11.2473,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 69)
    {
    CP[playerid] = 70;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 1424.0576,2632.2500,11.2473,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 70)
    {
    CP[playerid] = 71;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 183.2746,1252.0356,23.2473,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 71)
    {
    CP[playerid] = 72;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, -1944.1534,133.3291,26.1223,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 72)
    {
    CP[playerid] = 73;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 821.4446,-1372.4019,-1.1277,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 73)
    {
    CP[playerid] = 74;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid, 1687.5320,-1953.6309,13.9973,5.0);
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    SetTimerEx("Tram", 10000, 0, "i", playerid);
    GameTextForPlayer(playerid,"Warte 10 Sekunden",5000,4);
    TogglePlayerControllable(playerid,0);
    }
    else if(CP[playerid] == 74)
    {
    CP[playerid] = 0;
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid, COLOR_INFO, "Du hast die Route beendet | Gehalt: 2000€ | Bonus: 300€");
    PlayerPlaySound(playerid, 1058, X, Y, Z);
    TramvajVozacPosao[playerid] = 0;
    PlayerInfo[playerid][pGehalt] += 2000;
    GivePlayerCash(playerid, 300);
    }
    }
    }

  • Dein Zug bremst ab, wenn du in den Checkpoint fährst, jedoch bist du so schnell, dass der Zug dafür sehr lange braucht. Der Bremsweg eines Zugs ist sehr lang! Du solltest daher den Spieler nicht freezen, wenn du in den Checkpoint fährst, sondern einen Timer erstellen, wo der Spieler eine bestimmte Zeit lang in dem Checkpoint bleiben muss. Verlässt er ihn vorher, so muss er den Checkpoint wiederholen.


    mfg
    Jan