Mit car in Checkpoint's

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
  • aber bei dem Code ist das so das es hinter dem Car gesetzt wird in dem ich bin


    if(Postinfo[playerid][post_bAktiv])
    {
    printf("checkpoint: %d", Postinfo[playerid][post_Checkpoint]);
    if(sInfo[playerid][post] == 0 && Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new i = 0; i < sizeof(postCars); i++)
    {
    printf("Fahrzeug: %d / postCars: %d", GetPlayerVehicleID(playerid), postCars[i]);
    if(IsPlayerInVehicle(playerid,postCars[i]))
    {
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    //sprich hier müsste er die pos hinter dem Car auslesen
    return 1;
    }
    }
    }
    else
    {
    if(Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    sInfo[playerid][post]++;
    Postinfo[playerid][post_Checkpoint] = 0;
    printf("post: %i",sInfo[playerid][post]);
    if(sInfo[playerid][post] == 10)
    {
    SendClientMessage(playerid,0xFF0000FF,"Fertig");
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    printf("Setze checkpoint hinter Fahrzeug.");
    new veh = GetPlayerVehicleID(playerid);
    new Float:x,Float:y,Float:z;
    GetPosHinterFahrzeug(veh,7,Float:x,Float:y,Float:z);
    sInfo[playerid][postx] = x;
    sInfo[playerid][posty] = y;
    sInfo[playerid][postz] = z;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    }
    }
    }


    und bei dem 1 Cp kann ich auch ohne car in den Cp wie kann ich das machen das er den nur mit einem PostCars dort rein kann ?
    wenn ich das else return 1; mache kann ich nicht mit car dort rein und nicht ohne car

    if(IsPlayerInVehicle(playerid,postCars[i]))
    {
    new Float:x,Float:y,Float:z;
    new veh = GetPlayerVehicleID(playerid);
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    GetPosHinterFahrzeug(veh,7,Float:x,Float:y,Float:z);
    sInfo[playerid][postx] = x;
    sInfo[playerid][posty] = y;
    sInfo[playerid][postz] = z;
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    else
    {
    return 1;
    }

  • mein ganzer OnPlayerEnterCheckpoint


    public OnPlayerEnterCheckpoint(playerid)
    {
    printf("aktiv: %d", Postinfo[playerid][post_bAktiv]);
    if(Postinfo[playerid][post_bAktiv])
    {
    printf("checkpoint: %d", Postinfo[playerid][post_Checkpoint]);
    if(sInfo[playerid][post] == 0 && Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new i = 0; i < sizeof(postCars); i++)
    {
    printf("Fahrzeug: %d / postCars: %d", GetPlayerVehicleID(playerid), postCars[i]);
    if(IsPlayerInVehicle(playerid,postCars[i]))
    {
    new Float:x,Float:y,Float:z;
    new veh = GetPlayerVehicleID(playerid);
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    GetPosHinterFahrzeug(veh,7,Float:x,Float:y,Float:z);
    sInfo[playerid][postx] = x;
    sInfo[playerid][posty] = y;
    sInfo[playerid][postz] = z;
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    if(Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    sInfo[playerid][post]++;
    Postinfo[playerid][post_Checkpoint] = 0;
    printf("post: %i",sInfo[playerid][post]);
    if(sInfo[playerid][post] == 10)
    {
    SendClientMessage(playerid,0xFF0000FF,"Fertig");
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    printf("Setze checkpoint hinter Fahrzeug.");
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    }
    }
    }
    if(Fahrsstunde[playerid][fahr_bAktiv])
    {
    Fahrsstunde[playerid][fahr_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Fahrsstunde[playerid][fahr_Checkpoint],veh = GetPlayerVehicleID(playerid),Float:hp;
    if(playercp == sizeof(Fahrss_Stationen))
    {
    GetVehicleHealth(veh,hp);
    hp = floatmul(floatdiv(100,750),(hp-250));
    if(hp < 80)
    {
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    SendClientMessage(playerid,IGELB,"Du bist durchgefallen da das Auto weniger als 80 Zustand hatte!");
    return 1;
    }
    else
    {
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast die Praktische Prüfung beendet bitte warte auf dein Ergebnis!");
    Fahrsstunde[playerid][fahr_bAktiv]=false;
    GetVehicleHealth(veh, hp);
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    return 1;
    }
    }
    else
    {
    new string[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(string,sizeof(string),"(%d | %d)",playercp,sizeof(Fahrss_Stationen));
    SendClientMessage(playerid,IGELB,string);
    new id = Fahrsstunde[playerid][fahr_Checkpoint];
    SetPlayerCheckpoint(playerid,Fahrss_Stationen[id][F_fx],Fahrss_Stationen[id][F_fy],Fahrss_Stationen[id][F_fz],Fahrss_Stationen[id][F_fRad]);
    }
    }
    if(Muellmann[playerid][pmi_bAktiv])
    {
    Muellmann[playerid][pmi_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Muellmann[playerid][pmi_Checkpoint];
    if(playercp == sizeof(Muellfuhr_Stationen))
    {
    new veh = GetPlayerVehicleID(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast deine Arbeit Erledigt!");
    Muellmann[playerid][pmi_bAktiv]=false;
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    }
    else
    {
    new String[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(String,sizeof(String),"Weiter so,du hast es fasst geschafft ! (%d / %d)",playercp,sizeof(Muellfuhr_Stationen));
    SendClientMessage(playerid,IGELB,String);
    SetPlayerCheckpoint(playerid,Muellfuhr_Stationen[playercp][M_fx],Muellfuhr_Stationen[playercp][M_fy],Muellfuhr_Stationen[playercp][M_fz],Muellfuhr_Stationen[playercp][M_fRad]);
    }
    return 1;
    }
    if(Strassenmann[playerid][str_bAktiv])
    {
    Strassenmann[playerid][str_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Strassenmann[playerid][str_Checkpoint];
    if(playercp == sizeof(Strassen_Stationen))
    {
    new veh = GetPlayerVehicleID(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast deine Arbeit Erledigt!");
    Strassenmann[playerid][str_bAktiv]=false;
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    }
    else
    {
    new string[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(string,sizeof(string),"Weiter so,du hast es fasst geschafft! (%d | %d)",playercp,sizeof(Strassen_Stationen));
    SendClientMessage(playerid,IGELB,string);
    SetPlayerCheckpoint(playerid,Strassen_Stationen[0][S_fx],Strassen_Stationen[0][S_fy],Strassen_Stationen[0][S_fz],Strassen_Stationen[0][S_fRad]);
    }
    }
    else
    {
    DisablePlayerCheckpoint(playerid);
    }
    return 1;
    }

  • Der else-Teil ganz unten war falsch. Deshalb ging der Checkpoint weg.

    Spoiler anzeigen
    public OnPlayerEnterCheckpoint(playerid)
    {
    printf("aktiv: %d", Postinfo[playerid][post_bAktiv]);
    if(Postinfo[playerid][post_bAktiv])
    {
    printf("checkpoint: %d", Postinfo[playerid][post_Checkpoint]);
    if(sInfo[playerid][post] == 0 && Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new i = 0; i < sizeof(postCars); i++)
    {
    printf("Fahrzeug: %d / postCars: %d", GetPlayerVehicleID(playerid), postCars[i]);
    if(IsPlayerInVehicle(playerid,postCars[i]))
    {
    new Float:x,Float:y,Float:z;
    new veh = GetPlayerVehicleID(playerid);
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    GetPosHinterFahrzeug(veh,7,Float:x,Float:y,Float:z);
    sInfo[playerid][postx] = x;
    sInfo[playerid][posty] = y;
    sInfo[playerid][postz] = z;
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    if(Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    sInfo[playerid][post]++;
    Postinfo[playerid][post_Checkpoint] = 0;
    printf("post: %i",sInfo[playerid][post]);
    if(sInfo[playerid][post] == 10)
    {
    SendClientMessage(playerid,0xFF0000FF,"Fertig");
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    printf("Setze checkpoint hinter Fahrzeug.");
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    }
    }
    }
    if(Fahrsstunde[playerid][fahr_bAktiv])
    {
    Fahrsstunde[playerid][fahr_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Fahrsstunde[playerid][fahr_Checkpoint],veh = GetPlayerVehicleID(playerid),Float:hp;
    if(playercp == sizeof(Fahrss_Stationen))
    {
    GetVehicleHealth(veh,hp);
    hp = floatmul(floatdiv(100,750),(hp-250));
    if(hp < 80)
    {
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    SendClientMessage(playerid,IGELB,"Du bist durchgefallen da das Auto weniger als 80 Zustand hatte!");
    return 1;
    }
    else
    {
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast die Praktische Prüfung beendet bitte warte auf dein Ergebnis!");
    Fahrsstunde[playerid][fahr_bAktiv]=false;
    GetVehicleHealth(veh, hp);
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    return 1;
    }
    }
    else
    {
    new string[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(string,sizeof(string),"(%d | %d)",playercp,sizeof(Fahrss_Stationen));
    SendClientMessage(playerid,IGELB,string);
    new id = Fahrsstunde[playerid][fahr_Checkpoint];
    SetPlayerCheckpoint(playerid,Fahrss_Stationen[id][F_fx],Fahrss_Stationen[id][F_fy],Fahrss_Stationen[id][F_fz],Fahrss_Stationen[id][F_fRad]);
    }
    }
    if(Muellmann[playerid][pmi_bAktiv])
    {
    Muellmann[playerid][pmi_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Muellmann[playerid][pmi_Checkpoint];
    if(playercp == sizeof(Muellfuhr_Stationen))
    {
    new veh = GetPlayerVehicleID(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast deine Arbeit Erledigt!");
    Muellmann[playerid][pmi_bAktiv]=false;
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    }
    else
    {
    new String[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(String,sizeof(String),"Weiter so,du hast es fasst geschafft ! (%d / %d)",playercp,sizeof(Muellfuhr_Stationen));
    SendClientMessage(playerid,IGELB,String);
    SetPlayerCheckpoint(playerid,Muellfuhr_Stationen[playercp][M_fx],Muellfuhr_Stationen[playercp][M_fy],Muellfuhr_Stationen[playercp][M_fz],Muellfuhr_Stationen[playercp][M_fRad]);
    }
    return 1;
    }
    if(Strassenmann[playerid][str_bAktiv])
    {
    Strassenmann[playerid][str_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Strassenmann[playerid][str_Checkpoint];
    if(playercp == sizeof(Strassen_Stationen))
    {
    new veh = GetPlayerVehicleID(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast deine Arbeit Erledigt!");
    Strassenmann[playerid][str_bAktiv]=false;
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    }
    else
    {
    new string[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(string,sizeof(string),"Weiter so,du hast es fasst geschafft! (%d | %d)",playercp,sizeof(Strassen_Stationen));
    SendClientMessage(playerid,IGELB,string);
    SetPlayerCheckpoint(playerid,Strassen_Stationen[0][S_fx],Strassen_Stationen[0][S_fy],Strassen_Stationen[0][S_fz],Strassen_Stationen[0][S_fRad]);
    }
    }
    return 1;
    }


    Das mit dem Checkpoint hinter dem Fahrzeug sollte so passen, das kannst du auch nicht groß anders machen, das würde ich so lassen.

  • do.de - Domain-Offensive - Domains für alle und zu super Preisen
  • Naja, alternativ könntest du es über else-if's lösen, wenn das bei deinen Systemen zu keinen Konflikten führt:

    Spoiler anzeigen
    public OnPlayerEnterCheckpoint(playerid)
    {
    printf("aktiv: %d", Postinfo[playerid][post_bAktiv]);
    if(Postinfo[playerid][post_bAktiv])
    {
    printf("checkpoint: %d", Postinfo[playerid][post_Checkpoint]);
    if(sInfo[playerid][post] == 0 && Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new i = 0; i < sizeof(postCars); i++)
    {
    printf("Fahrzeug: %d / postCars: %d", GetPlayerVehicleID(playerid), postCars[i]);
    if(IsPlayerInVehicle(playerid,postCars[i]))
    {
    new Float:x,Float:y,Float:z;
    new veh = GetPlayerVehicleID(playerid);
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    GetPosHinterFahrzeug(veh,7,Float:x,Float:y,Float:z);
    sInfo[playerid][postx] = x;
    sInfo[playerid][posty] = y;
    sInfo[playerid][postz] = z;
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    if(Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    printf("Setze random checkpoint");
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("Fahrzeug: %d / postg: %d", GetPlayerVehicleID(playerid), postg[f]);
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    sInfo[playerid][post]++;
    Postinfo[playerid][post_Checkpoint] = 0;
    printf("post: %i",sInfo[playerid][post]);
    if(sInfo[playerid][post] == 10)
    {
    SendClientMessage(playerid,0xFF0000FF,"Fertig");
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    printf("Setze checkpoint hinter Fahrzeug.");
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    }
    }
    }
    else if(Fahrsstunde[playerid][fahr_bAktiv])
    {
    Fahrsstunde[playerid][fahr_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Fahrsstunde[playerid][fahr_Checkpoint],veh = GetPlayerVehicleID(playerid),Float:hp;
    if(playercp == sizeof(Fahrss_Stationen))
    {
    GetVehicleHealth(veh,hp);
    hp = floatmul(floatdiv(100,750),(hp-250));
    if(hp < 80)
    {
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    SendClientMessage(playerid,IGELB,"Du bist durchgefallen da das Auto weniger als 80 Zustand hatte!");
    return 1;
    }
    else
    {
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast die Praktische Prüfung beendet bitte warte auf dein Ergebnis!");
    Fahrsstunde[playerid][fahr_bAktiv]=false;
    GetVehicleHealth(veh, hp);
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    return 1;
    }
    }
    else
    {
    new string[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(string,sizeof(string),"(%d | %d)",playercp,sizeof(Fahrss_Stationen));
    SendClientMessage(playerid,IGELB,string);
    new id = Fahrsstunde[playerid][fahr_Checkpoint];
    SetPlayerCheckpoint(playerid,Fahrss_Stationen[id][F_fx],Fahrss_Stationen[id][F_fy],Fahrss_Stationen[id][F_fz],Fahrss_Stationen[id][F_fRad]);
    }
    }
    else if(Muellmann[playerid][pmi_bAktiv])
    {
    Muellmann[playerid][pmi_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Muellmann[playerid][pmi_Checkpoint];
    if(playercp == sizeof(Muellfuhr_Stationen))
    {
    new veh = GetPlayerVehicleID(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast deine Arbeit Erledigt!");
    Muellmann[playerid][pmi_bAktiv]=false;
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    }
    else
    {
    new String[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(String,sizeof(String),"Weiter so,du hast es fasst geschafft ! (%d / %d)",playercp,sizeof(Muellfuhr_Stationen));
    SendClientMessage(playerid,IGELB,String);
    SetPlayerCheckpoint(playerid,Muellfuhr_Stationen[playercp][M_fx],Muellfuhr_Stationen[playercp][M_fy],Muellfuhr_Stationen[playercp][M_fz],Muellfuhr_Stationen[playercp][M_fRad]);
    }
    return 1;
    }
    else if(Strassenmann[playerid][str_bAktiv])
    {
    Strassenmann[playerid][str_Checkpoint]++;
    DisablePlayerCheckpoint(playerid);
    new playercp = Strassenmann[playerid][str_Checkpoint];
    if(playercp == sizeof(Strassen_Stationen))
    {
    new veh = GetPlayerVehicleID(playerid);
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    SendClientMessage(playerid,EGRÜN,"Du hast deine Arbeit Erledigt!");
    Strassenmann[playerid][str_bAktiv]=false;
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    }
    else
    {
    new string[128];
    PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
    format(string,sizeof(string),"Weiter so,du hast es fasst geschafft! (%d | %d)",playercp,sizeof(Strassen_Stationen));
    SendClientMessage(playerid,IGELB,string);
    SetPlayerCheckpoint(playerid,Strassen_Stationen[0][S_fx],Strassen_Stationen[0][S_fy],Strassen_Stationen[0][S_fz],Strassen_Stationen[0][S_fRad]);
    }
    }
    else
    {
    DisablePlayerCheckpoint(playerid);
    }
    return 1;
    }

  • Oke das funktioniert danke aber das mit dem wenn ich jezte ein navi cp mache und dort rein fahre geht immernoch nicht passiert einfach nichts
    Jeffry:
    und wie kann ich das machen das wenn er ein CP betritt ein Packet vorne auf den Gabelstabler bekommt und wenn er ein Anderen das er wieder gelöscht wird ?

  • Beitrag von reaL. ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.
  • Jeffry:
    habe das jetze so da ich möchte wenn man in den Cp hinter dem Car fährt also das Packet in das Fahrzeug packt das er dann aufhört und nicht beim aufladen aber wieso funktioniert das nicht ?
    ich fahre rein in den Cp hinter dem Car und es passiert nichts
    if(Postinfo[playerid][post_bAktiv])
    {
    if(sInfo[playerid][post] == 0 && Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new i = 0; i < sizeof(postCars); i++)
    {
    if(IsPlayerInVehicle(playerid,postCars[i]))
    {
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    if(Postinfo[playerid][post_Checkpoint] == 0)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    DisablePlayerCheckpoint(playerid);
    sInfo[playerid][post]++;
    if(sInfo[playerid][post] == 10)
    {
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    DestroyDynamicObject(postpacket[GetPlayerVehicleID(playerid)]);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    }
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 0;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    postpacket[GetPlayerVehicleID(playerid)] = CreateDynamicObject(1558,0,0,-1000,0,0,0,100);
    AttachDynamicObjectToVehicle(postpacket[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,0.599999,0.449999,-0.000001,0.000000,-91.799980);
    return 1;
    }
    }
    }
    }
    }