Waffen werden nicht geladen...

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
  • Ich bin grad an einer Sackgasse an meinem Script angekommen und brauche hilfe :pinch:


    Waffen werden gespeichert, aber beim Spawn nicht geladen.


    Hier der Speichern und Laden stock:


    stock sSpeichern(playerid)
    {
    new Account[16 + MAX_PLAYER_NAME];
    new Sname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Sname,sizeof(Sname));
    format(Account,sizeof(Account),"/Accounts/%s.txt",Sname);

    new Float:hp;
    new Float:ar;

    new Float:fx;
    new Float:fy;
    new Float:fz;
    new Float:fa;

    new we0,we0a,we1,we1a,we2,we2a,we3,we3a,we4,we4a,we5,we5a,we6,we6a,we8,we8a;
    if(dini_Exists(Account))
    {
    dini_IntSet(Account,"Geld", GetPlayerMoney(playerid));
    dini_IntSet(Account,"Adminlevel",sAccount[playerid][Adminlevel]);
    dini_IntSet(Account,"Level",GetPlayerScore(playerid));
    dini_IntSet(Account,"Fraktion",sAccount[playerid][Fraktion]);
    dini_IntSet(Account,"Team",sAccount[playerid][Team]);
    dini_IntSet(Account,"Skin",GetPlayerSkin(playerid));
    dini_IntSet(Account,"iGrand",sAccount[playerid][iGrand]);
    dini_IntSet(Account,"Autoschein",sAccount[playerid][Autoschein]);
    dini_IntSet(Account,"Motoschein",sAccount[playerid][Motoschein]);
    dini_IntSet(Account,"Flugschein",sAccount[playerid][Flugschein]);
    dini_IntSet(Account,"Waffenschein",sAccount[playerid][Waffenschein]);
    dini_IntSet(Account,"Bootschein",sAccount[playerid][Bootschein]);
    dini_IntSet(Account,"BUSLKWschein",sAccount[playerid][BUSLKWschein]);
    dini_IntSet(Account,"Perso",sAccount[playerid][Perso]);

    GetPlayerHealth(playerid,hp);
    dini_FloatSet(Account,"fHealth",hp);

    GetPlayerArmour(playerid,ar);
    dini_FloatSet(Account,"fArmour",ar);

    dini_IntSet(Account,"s_i",GetPlayerInterior(playerid));

    GetPlayerPos(playerid,fx,fy,fz);
    GetPlayerFacingAngle(playerid,fa);
    dini_FloatSet(Account,"s_x",fx);
    dini_FloatSet(Account,"s_y",fy);
    dini_FloatSet(Account,"s_z",fz);
    dini_FloatSet(Account,"s_a",fa);

    GetPlayerWeaponData(playerid,0,we0,we0a);
    GetPlayerWeaponData(playerid,1,we1,we1a);
    GetPlayerWeaponData(playerid,2,we2,we2a);
    GetPlayerWeaponData(playerid,3,we3,we3a);
    GetPlayerWeaponData(playerid,4,we4,we4a);
    GetPlayerWeaponData(playerid,5,we5,we5a);
    GetPlayerWeaponData(playerid,6,we6,we6a);
    GetPlayerWeaponData(playerid,8,we8,we8a);

    dini_IntSet(Account,"w0",we0);
    dini_IntSet(Account,"w0Ammo",we0a);
    dini_IntSet(Account,"w1",we1);
    dini_IntSet(Account,"w1Ammo",we1a);
    dini_IntSet(Account,"w2",we2);
    dini_IntSet(Account,"w2Ammo",we2a);
    dini_IntSet(Account,"w3",we3);
    dini_IntSet(Account,"w3Ammo",we3a);
    dini_IntSet(Account,"w4",we4);
    dini_IntSet(Account,"w4Ammo",we4a);
    dini_IntSet(Account,"w5",we5);
    dini_IntSet(Account,"w5Ammo",we5a);
    dini_IntSet(Account,"w6",we6);
    dini_IntSet(Account,"w6Ammo",we6a);
    dini_IntSet(Account,"w8",we8);
    dini_IntSet(Account,"w8Ammo",we8a);

    }

    else
    {
    SendClientMessageToAll(RED,"EIN FEHLER IST AUFGETRETEN !");
    }

    return 1;
    }


    stock sLaden(playerid)
    {
    new Account[16 + MAX_PLAYER_NAME];
    new Sname[MAX_PLAYER_NAME];
    GetPlayerName(playerid,Sname,sizeof(Sname));
    format(Account,sizeof(Account),"/Accounts/%s.txt",Sname);


    if(dini_Exists(Account))
    {
    SetPlayerInterior(playerid,dini_Int(Account,"s_i"));
    SetSpawnInfo(playerid,0,dini_Int(Account,"Skin"),dini_Float(Account,"s_x"),dini_Float(Account,"s_y"),dini_Float(Account,"s_z"),dini_Float(Account,"s_a"),0,0,0,0,0,0);
    SpawnPlayer(playerid);

    GivePlayerMoney(playerid, dini_Int(Account,"Geld"));
    SetPlayerScore(playerid,dini_Int(Account,"Level"));
    sAccount[playerid][Adminlevel] = dini_Int(Account,"Adminlevel");
    sAccount[playerid][Fraktion] = dini_Int(Account,"Fraktion");
    sAccount[playerid][Team] = dini_Int(Account,"Team");
    SetPlayerSkin(playerid, dini_Int(Account,"Skin"));
    sAccount[playerid][iGrand] = dini_Int(Account,"iGrand");
    sAccount[playerid][Autoschein] = dini_Int(Account,"Autoschein");
    sAccount[playerid][Motoschein] = dini_Int(Account,"Motoschein");
    sAccount[playerid][Flugschein] = dini_Int(Account,"Flugschein");
    sAccount[playerid][Waffenschein] = dini_Int(Account,"Waffenschein");
    sAccount[playerid][Bootschein] = dini_Int(Account,"Bootschein");
    sAccount[playerid][BUSLKWschein] = dini_Int(Account,"BUSLKWschein");
    sAccount[playerid][Perso] = dini_Int(Account,"Perso");
    SetPlayerHealth(playerid,dini_Int(Account,"fHealth"));
    SetPlayerArmour(playerid,dini_Int(Account,"fArmour"));

    GivePlayerWeapon(playerid,dini_Int(Account,"w0"),dini_Int(Account,"w0Ammo"));
    GivePlayerWeapon(playerid,dini_Int(Account,"w1"),dini_Int(Account,"w1Ammo"));
    GivePlayerWeapon(playerid,dini_Int(Account,"w2"),dini_Int(Account,"w2Ammo"));
    GivePlayerWeapon(playerid,dini_Int(Account,"w3"),dini_Int(Account,"w3Ammo"));
    GivePlayerWeapon(playerid,dini_Int(Account,"w4"),dini_Int(Account,"w4Ammo"));
    GivePlayerWeapon(playerid,dini_Int(Account,"w5"),dini_Int(Account,"w5Ammo"));
    GivePlayerWeapon(playerid,dini_Int(Account,"w6"),dini_Int(Account,"w6Ammo"));
    GivePlayerWeapon(playerid,dini_Int(Account,"w8"),dini_Int(Account,"w8Ammo"));
    }

    return 1;
    }


    Vielen dank schonmal :)


    mfG
    RAiNBoMb

    Einmal editiert, zuletzt von RAiNBoMb ()