PROBLEM [BITTE HELFT MIR]

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
  • if(strcmp(cmd, "/fstyle", true) == 0)
    {
    if(IsPlayerConnected(playerid))
    {
    if (!IsPlayerInRangeOfPoint(playerid, 2,759.4875,5.3387,1000.7056))//gym's checkpoint
    {
    SendClientMessage(playerid, COLOR_GRAD2, "*** Du bist nicht im GYM San Andreas! ***");
    return 1;
    }
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
    SendClientMessage(playerid, COLOR_WHITE, "Nutzung: /fstyle [Nummer]");
    SendClientMessage(playerid, COLOR_LIGHTBLUE, "|_______ GYM San Andreas _______|");
    SendClientMessage(playerid, COLOR_GRAD1, "| 1: Boxer ($8000) | 2: Kung Fu ($7500) |");
    SendClientMessage(playerid, COLOR_GRAD1, "| 3: Grabkick ($6500) | 4: KneeHead ($9500) |");
    return 1;
    }
    new item = strval(tmp);
    if (item == 1 && GetPlayerMoney(playerid) > 8000)
    {
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
    SetTimerEx("BoxTrain", 1000, false, "i", playerid);
    format(string, sizeof(string), "%s WTrainiert...", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
    }
    else if (item == 2 && GetPlayerMoney(playerid) > 7500)
    {
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
    SetTimerEx("KungTrain", 1000, false, "i", playerid);
    format(string, sizeof(string), "%s Trainiert...", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
    }
    else if (item == 3 && GetPlayerMoney(playerid) > 6500)
    {
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
    SetTimerEx("GrabTrain", 1000, false, "i", playerid);
    format(string, sizeof(string), "%s Trainiert...", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
    }
    else if (item == 4 && GetPlayerMoney(playerid) > 9500)
    {
    PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
    SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
    SetTimerEx("KneeTrain", 1000, false, "i", playerid);
    format(string, sizeof(string), "%s Trainiert...", sendername);
    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
    return 1;
    }
    }


    new y, m, d;
    new h,mi,s;
    getdate(y,m,d);
    gettime(h,mi,s);
    format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [BEFEHL] -> /fstyle",d,m,y,h,mi,s,sendername);
    if (PlayerInfo[playerid][pAchievement1] == 0)
    {
    ShowPlayerDialog(playerid,515,DIALOG_STYLE_MSGBOX,"Achievements:\n Fitness (15)","Congratulations, You have Achieved The 'Fitness' Badge! \n You Won 175$","Okay","Cancel");
    GivePlayerMoney(playerid, 175);
    PlayerInfo[playerid][pAchievement1] = 1;
    }
    return 1;
    }


    WIE bekomme ich es so hin das Der Fightstyle auch nach dem Relogg gespeichert wird?
    Vezweifel schon ein wenig daran, aber ich hoffe das Einer Ahnung von sowas hat.


    MfG