Respektpunkte #2

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
    • Offizieller Beitrag

    Abend,
    momentan ist es so, dass wenn der Spieler Payday bei mir bekommt auch einen Respektpunkt bekommt. Nur anscheined bekommt er keinen, obwohl theoretisch alles richtig ist.
    Der Abschnitt aus einem Timer mit dem Payday:


    if(GetPVarInt(i,"Paydaytime") > 1)
    {
    SubtractPVar(i,"Paydaytime",1);
    }
    else if(GetPVarInt(i,"Paydaytime") == 1)
    {
    SetPVarInt(i,"Paydaytime",3600);
    new gehalt;
    SCM(i,COLOR_YELLOW,"|=============== PAYDAY ===============|");

    if(GetPVarInt(i,"Fraktion") == 0)
    {
    if(GetPVarInt(i,"Job") == 0)
    {
    gehalt = randomEx(200,600);

    }
    else
    {
    gehalt = randomEx(2000,4000);
    }
    }
    else
    {
    if(GetPVarInt(i,"Fraktion") != 8 || GetPVarInt(i,"Fraktion") != 9 || GetPVarInt(i,"Fraktion") != 10)
    {
    gehalt = randomEx(7000,9000);
    }
    else
    {
    gehalt = randomEx(6000,8000);
    }
    }
    GivePlayerMoneyEx(i,gehalt);
    format(str,144,"| + $%d",gehalt);
    SCM(i,COLOR_GREEN,str);
    SCM(i,COLOR_GREEN,"| + 1 Respektpunkt");
    if(GetPVarInt(i,"Respektpunkte") == GetPVarInt(i,"maxRespekt"))
    {
    SCM(i,COLOR_GREEN,"Du bist nun Level-Up gekommen, es sind genug Respektpunkte vorhanden.");
    SCM(i,COLOR_GREEN,"Herzlichen Glückwunsch!");
    SetPVarInt(i,"Respektpunkte",0);
    AddOnePVar(i,"maxRespekt",4);
    GivePlayerScore(i,1);
    }
    SCM(i,COLOR_YELLOW,"|=============== PAYDAY ===============|");
    }


    Abschnitt aus dem Lade- und Speicherstock:

    SetPVarInt(playerid,"Respektpunkte",dini_Int(pfad,"Respektpunkte")); SetPVarInt(playerid,"maxRespekt",dini_Int(pfad,"maxRespekt"));


    dini_IntSet(pfad,"Respektpunkte",GetPVarInt(playerid,"Respektpunkte")); dini_IntSet(pfad,"maxRespekt",GetPVarInt(playerid,"maxRespekt"));


    Das Problem: Mit den PVars passiert überhaupt nichts. Also wenn die PVarzahl der Punkte passt, bekommt man aber keinen Level Up. Wie behebt man das Problem?

    VG