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
  • Jeffry:
    also es ist ja so das man
    Random Cp => Hinter Car
    Random Cp => Hinter Car
    Random Cp => Hinter Car
    .....
    und vorher war er so das beim
    Random Cp immer
    sInfo[playerid][post]++;
    gemacht wurde und abgefragt wurde ob es 10 ist aber das will ich jetze ändern sprich
    wenn man in den Cp Hinter dem Car fährt das
    sInfo[playerid][post]++;
    gemacht wird und abgefragt wird ob es 10 ist
    aber wenn ich jetze in den Cp hinter dem Car fahre Passiert nichts

  • Schreibe es mal so, und poste dann was im Log steht:

    Spoiler anzeigen
    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]++;
    printf("%d | %d", sizeof(postpacket), GetPlayerVehicleID(playerid));
    DestroyDynamicObject(postpacket[GetPlayerVehicleID(playerid)]);
    if(sInfo[playerid][post] == 10)
    {
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    printf("Setze neuen CP");
    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;
    }
    }
    }
    }
    }

  • so ist das jetze wie ich es haben will aber 1 problem wieso funktioniert das so
    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);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    printf("else1");//wenn ich das hier raus nehme
    {
    printf("Abfrage");
    if(Postinfo[playerid][post_Checkpoint] == 0)
    {
    printf("schleife1");
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("isPlayerInvehicle");
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    printf("post++");
    sInfo[playerid][post]++;
    Postinfo[playerid][post_Checkpoint] = 1;
    if(sInfo[playerid][post] == 10)
    {
    printf("fertig");
    SendClientMessage(playerid,0xFF0000FF,"Fertig");
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    printf("Setze random checkpoint");
    DisablePlayerCheckpoint(playerid);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    }
    else
    printf("else2");
    {
    printf("schelife2");
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("IsPlaerinvehicle2");
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    printf("rest");
    Postinfo[playerid][post_Checkpoint] = 0;
    printf("Setze Hintercar checkpoint");
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    }
    }


    aber wieso so nicht ?


    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);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    else
    {
    printf("Abfrage");
    if(Postinfo[playerid][post_Checkpoint] == 0)
    {
    printf("schleife1");
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("isPlayerInvehicle");
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    printf("post++");
    sInfo[playerid][post]++;
    Postinfo[playerid][post_Checkpoint] = 1;
    if(sInfo[playerid][post] == 10)
    {
    printf("fertig");
    SendClientMessage(playerid,0xFF0000FF,"Fertig");
    DisablePlayerCheckpoint(playerid);
    return 1;
    }
    else
    {
    printf("Setze random checkpoint");
    DisablePlayerCheckpoint(playerid);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    }
    else
    printf("else2");
    {
    printf("schelife2");
    for(new f = 0; f < sizeof(postg); f++)
    {
    printf("IsPlaerinvehicle2");
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    printf("rest");
    Postinfo[playerid][post_Checkpoint] = 0;
    printf("Setze Hintercar checkpoint");
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    }
    }

  • Weil das hier zwar syntaktisch richtig ist, aber keinen Sinn gibt:
    else
    printf("else1");//wenn ich das hier raus nehme


    Nur der print wird beim else ausgeführt, alles was drunter in der Klammer steht wird immer ausgeführt.


    Daher kann es sein, dass es bei dir tut, weil der Rest ja immer ausgeführt wird. Ob das wirklich richtig ist kann man nur beim testen sagen, aber es so zu schreiben macht keinen Sinn, auch wenn es geht.

  • habs jetze geändert aber jetze meine frage
    wie kann ich jetze aus dem Postfuhr_Stationen enum den Nächsten Cp setzen ? also sprich den 2 Cp ?
    und ab fragen ob er drinne ist und wenn dann den 3 setzen und so weiter

    enum e_Post
    {
    Float:P_fx,
    Float:P_fy,
    Float:P_fz,
    Float:P_fRad
    }


    enum e_PlayerPostInfo
    {
    bool:post_bAktiv,
    post_Checkpoint
    }


    new Postinfo[MAX_PLAYERS][e_PlayerPostInfo];


    new Postfuhr_Stationen[][e_Post] =
    {
    {2200.8418,-2302.9058,14.7647,5.0},
    {2069.5339,-1654.8695,13.5469,5.0},
    {1911.5476,-1603.8575,13.5469,5.0},
    {1800.0997,-1583.5662,13.4807,5.0}
    };
    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);
    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] == 1)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 2;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    sInfo[playerid][post]++;
    Postinfo[playerid][post_Checkpoint] = 1;
    if(sInfo[playerid][post] == 10)
    {
    DisablePlayerCheckpoint(playerid);
    SendClientMessage(playerid,ROT,"Fertig");
    return 1;
    }
    else
    {
    DisablePlayerCheckpoint(playerid);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    }
    }
    }

  • Sollte so passen:

    Spoiler anzeigen
    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);
    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] == 1)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 2;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    sInfo[playerid][post]++;
    if(sInfo[playerid][post] >= 10)
    {
    DisablePlayerCheckpoint(playerid);
    Postinfo[playerid][post_Checkpoint]++;
    if(Postinfo[playerid][post_Checkpoint] == sizeof(Postfuhr_Stationen) + 2)
    {
    SendClientMessage(playerid,ROT,"Fertig");
    }
    else
    {
    new id = Postinfo[playerid][post_Checkpoint] - 2;
    SetPlayerCheckpoint(playerid,Postfuhr_Stationen[id][P_fx], Postfuhr_Stationen[id][P_fy], Postfuhr_Stationen[id][P_fz],5.0);
    }
    return 1;
    }
    else
    {
    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;
    }
    }
    }
    }
    }
    }

  • Warum sagst du das nicht gleich?

    Spoiler anzeigen
    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);
    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] == 1)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 2;
    DisablePlayerCheckpoint(playerid);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if((sInfo[playerid][post] < 10 && IsPlayerInVehicle(playerid,postg[f])) || (sInfo[playerid][post] >= 10 && !IsPlayerInAnyVehicle(playerid)))
    {
    sInfo[playerid][post]++;
    if(sInfo[playerid][post] >= 10)
    {
    DisablePlayerCheckpoint(playerid);
    Postinfo[playerid][post_Checkpoint]++;
    if(Postinfo[playerid][post_Checkpoint] == sizeof(Postfuhr_Stationen) + 2)
    {
    SendClientMessage(playerid,ROT,"Fertig");
    }
    else
    {
    new id = Postinfo[playerid][post_Checkpoint] - 2;
    SetPlayerCheckpoint(playerid,Postfuhr_Stationen[id][P_fx], Postfuhr_Stationen[id][P_fy], Postfuhr_Stationen[id][P_fz],5.0);
    }
    return 1;
    }
    else
    {
    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;
    }
    }
    }
    }
    }
    }

  • Beitrag von reaL. ()

    Dieser Beitrag wurde gelöscht, Informationen über den Löschvorgang sind nicht verfügbar.
  • Jeffry:
    ich habe es jetze so
    Ich starte fahre zum 1 CP und Lagere die Packet ins Car ein aber wenn ich jetze die Packete austrage kommt immer
    Du hast die Packet erfolgreich eingeladen Trage sie nun aus
    aber es soll so sein das dann dort kommt
    Du hast das Packet erfolgreich abgeliefert %d/10 Paketen

    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);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    SendClientMessage(playerid,weiß,"Bitte lagere jetze 10 Packete in dein Postwagen, welche du anschließend ausliefern musst!");
    return 1;
    }
    }
    }
    else
    {
    if(Postinfo[playerid][post_Checkpoint] == 1)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 2;
    DisablePlayerCheckpoint(playerid);
    postpacket[GetPlayerVehicleID(playerid)] = CreateObject(1558,0,0,-1000,0,0,0,100);
    AttachObjectToVehicle(postpacket[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,0.599999,0.449999,-0.000001,0.000000,-91.799980);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    GameTextForPlayer(playerid,"~r~Packet aufgeladen",250,0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if((sInfo[playerid][post] == 10 && IsPlayerInVehicle(playerid,postg[f])) || (sInfo[playerid][post] == 10 && !IsPlayerInAnyVehicle(playerid)))
    {
    sInfo[playerid][post]++;
    if(sInfo[playerid][post] == 10)
    {
    DisablePlayerCheckpoint(playerid);
    Postinfo[playerid][post_Checkpoint]++;
    if(Postinfo[playerid][post_Checkpoint] == sizeof(Postfuhr_Stationen) + 2)
    {
    SendClientMessage(playerid,ROT,"Du bist Fertig, Fahr nun Zurück zum Postamt");
    }
    else
    {
    new veh = GetPlayerVehicleID(playerid);
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    SendClientMessage(playerid,IGELB,"Du hast die Packet erfolgreich eingeladen Trage sie nun aus!");
    new id = Postinfo[playerid][post_Checkpoint] - 2;
    SetPlayerCheckpoint(playerid,Postfuhr_Stationen[id][P_fx], Postfuhr_Stationen[id][P_fy], Postfuhr_Stationen[id][P_fz],5.0);
    }
    return 1;
    }
    else
    {
    new string[128];
    format(string,sizeof(string),"%d/10 Packete eingelagert!",sInfo[playerid][post]);
    SendClientMessage(playerid,weiß,string);
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    DestroyObject(postpacket[GetPlayerVehicleID(playerid)]);
    GameTextForPlayer(playerid,"~g~Packet eingelagert",1000,0);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    }
    }
    }

  • Jeffry:
    Funktioniert nicht wenn ich das so mache dann starte ich
    10 Packete ins Car und dann wenn ich beim Austragen in den 1 CP will passiert nichts wenn ich da drinne bin


    Hier ist das Video
    https://www.youtube.com/watch?v=LxhBS3RBpfQ
    bei 5:36min geht es nichtmehr alles andere Funktioniert



    //Spieler Enum
    post,
    Float:postx,
    Float:posty,
    Float:postz


    //Post Enum's
    enum e_Post
    {
    Float:P_fx,
    Float:P_fy,
    Float:P_fz,
    Float:P_fRad
    }


    enum e_PlayerPostInfo
    {
    bool:post_bAktiv,
    post_Checkpoint
    }


    new Postinfo[MAX_PLAYERS][e_PlayerPostInfo];


    new Postfuhr_Stationen[][e_Post] =
    {
    {2200.8418,-2302.9058,14.7647,5.0},
    {2069.5339,-1654.8695,13.5469,5.0},
    {1911.5476,-1603.8575,13.5469,5.0},
    {1800.0997,-1583.5662,13.4807,5.0}
    };


    new Float:RandomSpawn1[][4] =
    {
    // Positions, (X, Y, Z and Facing Angle)
    {2227.2026,-2270.1094,14.7647,5.0},
    {2231.3899,-2269.3999,14.7647,5.0},
    {2239.1406,-2264.8552,14.7647,5.0},
    {2242.1814,-2263.8989,14.7647,5.0}
    };


    //Starten
    ocmd:starten(playerid)
    {
    if(sInfo[playerid][pjob] == 4)
    {
    for(new i = 0; i < sizeof(postCars); i++)
    {
    if(Postinfo[playerid][post_bAktiv] == true)
    {
    SendClientMessage(playerid,ROT,"Du bist schon im Post Dienst!");
    }
    else
    {
    Postinfo[playerid][post_Checkpoint]=0;
    Postinfo[playerid][post_bAktiv]=true;
    SetPlayerCheckpoint(playerid,Postfuhr_Stationen[0][P_fx],Postfuhr_Stationen[0][P_fy],Postfuhr_Stationen[0][P_fz],Postfuhr_Stationen[0][P_fRad]);
    return 1;
    }
    }
    }
    else
    {
    SendClientMessage(playerid,ROT,"Du bist kein Postbote!");
    return 1;
    }
    return 1;
    }


    //OnPlayerEnterCheckpoint
    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);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    SendClientMessage(playerid,weiß,"Bitte lagere jetze 10 Packete in dein Postwagen, welche du anschließend ausliefern musst!");
    return 1;
    }
    }
    }
    else
    {
    if(Postinfo[playerid][post_Checkpoint] == 1)
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if(IsPlayerInVehicle(playerid,postg[f]))
    {
    Postinfo[playerid][post_Checkpoint] = 2;
    DisablePlayerCheckpoint(playerid);
    postpacket[GetPlayerVehicleID(playerid)] = CreateObject(1558,0,0,-1000,0,0,0,100);
    AttachObjectToVehicle(postpacket[GetPlayerVehicleID(playerid)], GetPlayerVehicleID(playerid), 0.000000,0.599999,0.449999,-0.000001,0.000000,-91.799980);
    SetPlayerCheckpoint(playerid,sInfo[playerid][postx], sInfo[playerid][posty],sInfo[playerid][postz],3.0);
    GameTextForPlayer(playerid,"~r~Packet aufgeladen",250,0);
    return 1;
    }
    }
    }
    else
    {
    for(new f = 0; f < sizeof(postg); f++)
    {
    if((sInfo[playerid][post] < 10 && IsPlayerInVehicle(playerid,postg[f])) || (sInfo[playerid][post] >= 10 && !IsPlayerInAnyVehicle(playerid)))
    {
    sInfo[playerid][post]++;
    if(sInfo[playerid][post] >= 10)
    {
    DisablePlayerCheckpoint(playerid);
    Postinfo[playerid][post_Checkpoint]++;
    if(Postinfo[playerid][post_Checkpoint] == sizeof(Postfuhr_Stationen) + 2)
    {
    SendClientMessage(playerid,ROT,"Du bist Fertig, Fahr nun Zurück zum Postamt");
    }
    else
    {
    new veh = GetPlayerVehicleID(playerid);
    SetVehicleToRespawn(veh);
    tank[veh] = 100;
    SendClientMessage(playerid,IGELB,"Du hast die Packet erfolgreich eingeladen Trage sie nun aus!");
    sInfo[playerid][post] = 0;
    new id = Postinfo[playerid][post_Checkpoint] - 2;
    SetPlayerCheckpoint(playerid,Postfuhr_Stationen[id][P_fx], Postfuhr_Stationen[id][P_fy], Postfuhr_Stationen[id][P_fz],5.0);
    }
    return 1;
    }
    else
    {
    new string[128];
    format(string,sizeof(string),"%d/10 Packete eingelagert!",sInfo[playerid][post]);
    SendClientMessage(playerid,weiß,string);
    Postinfo[playerid][post_Checkpoint] = 1;
    DisablePlayerCheckpoint(playerid);
    DestroyObject(postpacket[GetPlayerVehicleID(playerid)]);
    GameTextForPlayer(playerid,"~g~Packet eingelagert",1000,0);
    new rand = random(sizeof(RandomSpawn1));
    SetPlayerCheckpoint(playerid,RandomSpawn1[rand][0], RandomSpawn1[rand][1],RandomSpawn1[rand][2],5.0);
    return 1;
    }
    }
    }
    }
    }
    }

  • FUnktioniert immernoch nicht
    ich Starte und fahre zur Rampe Lagere die 10 Packete ein dann Kommt die Nachricht
    Du hast die Packet erfolgreich eingeladen Trage sie nun aus!
    so und wenn ich sie Ausliefern will und in den CP gehe kommt wieder
    Du hast die Packet erfolgreich eingeladen Trage sie nun aus!
    die Checkpoints gehen Ganz normal weiter wie sie sollen aber beim austragen soll die Message nicht kommen nur wenn ich die 10 Packete fertig eingelagert habe