checkpoint

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 habe 2 fragen 1 frage ist wie bekomme ich das kleiner und die 2 frage ist wie mache ich das das der User ge freezet Wört bei jeden point



    if(Bus[playerid] == 1)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 1 erreicht.");
    SetPlayerCheckpoint(playerid,1436.0986,-1735.5679,13.0875, 5.0/* Koordinaten #2*/);
    Bus[playerid] = 2;
    }
    else if(Bus[playerid] == 2)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 2 erreicht.");
    SetPlayerCheckpoint(playerid,1818.4584,-1911.8336,13.0939, 5.0/* Koordinaten #3*/);
    Bus[playerid] = 3;
    }
    else if(Bus[playerid] == 3)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 3 erreicht.");
    SetPlayerCheckpoint(playerid,2059.4771,-1940.6632,13.0563, 5.0/* Koordinaten #4*/);
    Bus[playerid] = 4;
    }
    else if(Bus[playerid] == 4)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 4 erreicht.");
    SetPlayerCheckpoint(playerid,2008.5358,-1457.9471,13.0952, 5.0/* Koordinaten #5*/);
    Bus[playerid] = 5;
    }
    else if(Bus[playerid] == 5)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 5 erreicht.");
    SetPlayerCheckpoint(playerid,1718.0936,-1414.9360,13.0885, 5.0/* Koordinaten #6*/);
    Bus[playerid] = 6;
    }
    else if(Bus[playerid] == 6)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 6 erreicht.");
    SetPlayerCheckpoint(playerid,1558.5846,-1294.5383,16.4447, 5.0/* Koordinaten #7*/);
    Bus[playerid] = 7;
    }
    else if(Bus[playerid] == 7)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 7 erreicht.");
    SetPlayerCheckpoint(playerid,1427.1154,-1030.7017,23.3610, 5.0/* Koordinaten #4*/);
    Bus[playerid] = 8;
    }
    else if(Bus[playerid] == 8)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 8 erreicht.");
    SetPlayerCheckpoint(playerid,1203.2323,-933.3453,42.4372, 5.0/* Koordinaten #8*/);
    Bus[playerid] = 9;
    }
    else if(Bus[playerid] == 9)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 8 erreicht.");
    SetPlayerCheckpoint(playerid,793.3743,-1354.3220,13.0956, 5.0/* Koordinaten #8*/);
    Bus[playerid] = 10;
    }
    else if(Bus[playerid] == 10)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 8 erreicht.");
    SetPlayerCheckpoint(playerid,561.6163,-1399.9645,14.5171, 5.0/* Koordinaten #8*/);
    Bus[playerid] = 11;
    }
    else if(Bus[playerid] == 11)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 8 erreicht.");
    SetPlayerCheckpoint(playerid,357.1045,-1649.3328,32.5020, 5.0/* Koordinaten #8*/);
    Bus[playerid] = 12;
    }
    else if(Bus[playerid] == 12)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Du hast Checkpoint Nr. 8 erreicht.");
    SetPlayerCheckpoint(playerid,1143.0398,-1737.3237,13.2442, 5.0/* Koordinaten #8*/);
    Bus[playerid] = 13;
    }
    else if(Bus[playerid] == 13)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Herzlichen Glueckwunsch Du hast Bestanden");
    DestroyVehicle(GetPlayerVehicleID(playerid));
    }

  • Naja, du machst ein Array:


    //Oben in dein Skript schreiben:


    stock const Float:checkP[][3] = {
    {1436.0986,-1735.5679,13.0875},
    {1818.4584,-1911.8336,13.0939},
    {2059.4771,-1940.6632,13.0563},
    {2008.5358,-1457.9471,13.0952},
    {1718.0936,-1414.9360,13.0885},
    {1558.5846,-1294.5383,16.4447},
    {1427.1154,-1030.7017,23.3610},
    {1203.2323,-933.3453,42.4372},
    {793.3743,-1354.3220,13.0956},
    {561.6163,-1399.9645,14.5171},
    {357.1045,-1649.3328,32.5020},
    {1143.0398,-1737.3237,13.2442}
    };


    //Und dann unten einfach so:
    switch(Bus[playerid])
    {
    case 1..12: {
    new str[64],id=Bus[playerid]-1;
    format(str,64,"Du hast den Checkpoint Nr. %d erreicht.",Bus[playerid]);
    SendClientMessage(playerid,GRUN,str);
    SetPlayerCheckpoint(playerid,checkP[id][0],checkP[id][1],checkP[id][2], 5.0);
    Bus[playerid]++;
    }
    case 13: {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,GRUN, "Herzlichen Glueckwunsch Du hast Bestanden");
    DestroyVehicle(GetPlayerVehicleID(playerid));
    }
    }


    PS: Mit TogglePlayerControllable(playerid,0); freezt du den Spieler...musst ihn aber wieder entfreezen (TogglePlayerControllable(playerid,1)) mit einem Timer o.ä.


    mfg. :thumbup:

    ast2ufdyxkb1.png


    Leute, lernt scripten und versucht mal lieber etwas selber zu schreiben, als es aus einem GF zu kopieren. :S