Skin speichert/lädt nicht

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
  • Hallo meine Skins die ich dem Spieler gebe werden nicht gespeichert/geladen..


    Speicher Stock

    Spoiler anzeigen

    stock SpielerSpeichern(playerid)
    {
    if(GetPVarInt(playerid,"loggedin")==1)
    {
    new Spielerdatei[128];
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",SpielerName(playerid));
    dini_IntSet(Spielerdatei,"Level",GetPlayerScore(playerid));
    dini_IntSet(Spielerdatei,"Geld",GetPlayerMoney(playerid));
    dini_IntSet(Spielerdatei,"Skin",GetPlayerSkin(playerid));
    dini_IntSet(Spielerdatei,"Gang",GetPVarInt(playerid,"Gang"));
    dini_IntSet(Spielerdatei,"Banned",GetPVarInt(playerid,"Banned"));
    return 1;
    }
    return 1;
    }


    Lade Stock

    Spoiler anzeigen

    stock SpielerLaden(playerid)
    {
    new Spielerdatei[128];
    format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.ini",SpielerName(playerid));
    SetPlayerScore(playerid,dini_Int(Spielerdatei,"Level"));
    GivePlayerMoney(playerid,dini_Int(Spielerdatei,"Geld"));
    SetPVarInt(playerid,"Gang",dini_Int(Spielerdatei,"Gang"));
    SetPVarInt(playerid,"loggedin",1);
    SetPlayerSkin(playerid,dini_Int(Spielerdatei,"Skin"));
    SetPVarInt(playerid,"Banned",dini_Int(Spielerdatei,"Banned"));
    if(GetPVarInt(playerid,"Banned")==1)
    {
    SendClientMessage(playerid,rot,"Du kannst mit diesem Account nicht spielen, da du gebannt bist.\nBei Fragen oder Einwänden melde dich bei einem Admin");
    Kick(playerid);
    return 1;
    }
    return 1;
    }



    Dialog Response wo er sich die Gang aussucht

    Spoiler anzeigen

    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid==GANGAUSWAHL)//rheinfolge //gs ballas vagos aztecas lcn rs
    {
    if(response==0)
    {
    if(listitem==0)//GS
    {
    SendClientMessage(playerid,gruen,"Du bist Grove Street beigetreten, um die Gang zu ändern tippe /gang ein.");
    SetPVarInt(playerid,"Gang",1);
    SetPlayerColor(playerid,gruen);
    SetPVarInt(playerid,"Skin",106);
    SetPlayerSkin(playerid,106);
    SpawnPlayer(playerid);
    }
    if(listitem==1)//Ballas
    {
    SendClientMessage(playerid,lila,"Du bist Ballas beigetreten, um die Gang zu ändern tippe /gang ein.");
    SetPVarInt(playerid,"Gang",2);
    SetPlayerColor(playerid,lila);
    SetPVarInt(playerid,"Skin",102);
    SetPlayerSkin(playerid,102);
    SpawnPlayer(playerid);
    }
    if(listitem==2)//Vagos
    {
    SendClientMessage(playerid,gelb,"Du bist Vagos beigetreten, um die Gang zu ändern tippe /gang ein.");
    SetPVarInt(playerid,"Gang",3);
    SetPlayerColor(playerid,gelb);
    SetPVarInt(playerid,"Skin",110);
    SetPlayerSkin(playerid,110);
    SpawnPlayer(playerid);
    }
    if(listitem==3)//Aztecas
    {
    SendClientMessage(playerid,tuerkis,"Du bist Aztecas beigetreten, um die Gang zu ändern tippe /gang ein.");
    SetPVarInt(playerid,"Gang",4);
    SetPlayerColor(playerid,tuerkis);
    SetPVarInt(playerid,"Skin",116);
    SetPlayerSkin(playerid,116);
    SpawnPlayer(playerid);
    }
    if(listitem==4)//LCN
    {
    SendClientMessage(playerid,grau,"Du bist La Cosa Nostra beigetreten, um die Gang zu ändern tippe /gang ein.");
    SetPVarInt(playerid,"Gang",5);
    SetPlayerColor(playerid,grau);
    SetPVarInt(playerid,"Skin",46);
    SetPlayerSkin(playerid,46);
    SpawnPlayer(playerid);
    }
    if(listitem==5)//RS
    {
    SendClientMessage(playerid,rot,"Du bist Red Soldiers beigetreten, um die Gang zu ändern tippe /gang ein.");
    SetPVarInt(playerid,"Gang",6);
    SetPlayerColor(playerid,rot);
    SetPVarInt(playerid,"Skin",16);
    SetPlayerSkin(playerid,16);
    SpawnPlayer(playerid);
    }
    }
    }
    }



    OnPlayerSpawn

    Spoiler anzeigen
    [pwn]public OnPlayerSpawn(playerid)
    {
    SetPlayerSkin(playerid,GetPVarInt(playerid,"Skin"));
    if(GetPVarInt(playerid,"Gang")==1)
    {
    SetPlayerPos(playerid,2495.1516,-1703.9337,1018.3438);
    SetPlayerFacingAngle(playerid,172.6701);
    SetPlayerInterior(playerid,3);
    }
    if(GetPVarInt(playerid,"Gang")==2)
    {
    SetPlayerPos(playerid,309.1957,1123.9982,1083.8828);
    SetPlayerFacingAngle(playerid,268.6078);
    SetPlayerInterior(playerid,5);
    }
    if(GetPVarInt(playerid,"Gang")==3)
    {
    SetPlayerPos(playerid,488.4064,-82.1507,998.7578);
    SetPlayerFacingAngle(playerid,357.6701);
    SetPlayerInterior(playerid,11);
    }
    if(GetPVarInt(playerid,"Gang")==4)
    {
    SetPlayerPos(playerid,2815.7634,-1168.8008,1029.1719);
    SetPlayerFacingAngle(playerid,89.2076);
    SetPlayerInterior(playerid,8);
    }
    if(GetPVarInt(playerid,"Gang")==5)
    {
    SetPlayerPos(playerid,2339.4756,-1136.5942,1054.3047);
    SetPlayerFacingAngle(playerid,267.5869);
    SetPlayerInterior(playerid,12);
    }
    if(GetPVarInt(playerid,"Gang")==6)
    {
    SetPlayerPos(playerid,475.0661,-12.1029,1003.6953);
    SetPlayerFacingAngle(playerid,179.1290);
    SetPlayerInterior(playerid,17);
    }
    return 1;
    }[/pwn]



    OnPlayerRequestClass

    Spoiler anzeigen
    [pwn]public OnPlayerRequestClass(playerid, classid)
    {
    if(GetPVarInt(playerid,"Gang")==0)
    {
    ShowPlayerDialog(playerid,GANGAUSWAHL,DIALOG_STYLE_LIST,"Welche Gang?","{2BD300}Grove Street\n{FA00FF}Ballas\n{F5FF00}Vagos\n{00F5FF}Aztecas\n{8C8C8C}La Cosa Nostra\n{FF1400}Red Soldiers","In","die");
    }
    if(GetPVarInt(playerid,"Gang")==1)
    {
    SetPlayerColor(playerid,gruen);
    SetPlayerPos(playerid,2495.1516,-1703.9337,1018.3438);
    SetPlayerFacingAngle(playerid,172.6701);
    SetPlayerInterior(playerid,3);
    }
    if(GetPVarInt(playerid,"Gang")==2)
    {
    SetPlayerColor(playerid,lila);
    SetPlayerPos(playerid,309.1957,1123.9982,1083.8828);
    SetPlayerFacingAngle(playerid,268.6078);
    SetPlayerInterior(playerid,5);
    }
    if(GetPVarInt(playerid,"Gang")==3)
    {
    SetPlayerColor(playerid,gelb);
    SetPlayerPos(playerid,488.4064,-82.1507,998.7578);
    SetPlayerFacingAngle(playerid,357.6701);
    SetPlayerInterior(playerid,11);
    }
    if(GetPVarInt(playerid,"Gang")==4)
    {
    SetPlayerColor(playerid,tuerkis);
    SetPlayerPos(playerid,2815.7634,-1168.8008,1029.1719);
    SetPlayerFacingAngle(playerid,89.2076);
    SetPlayerInterior(playerid,8);
    }
    if(GetPVarInt(playerid,"Gang")==5)
    {
    SetPlayerColor(playerid,grau);
    SetPlayerPos(playerid,2339.4756,-1136.5942,1054.3047);
    SetPlayerFacingAngle(playerid,267.5869);
    SetPlayerInterior(playerid,12);
    }
    if(GetPVarInt(playerid,"Gang")==6)
    {
    SetPlayerColor(playerid,rot);
    SetPlayerPos(playerid,475.0661,-12.1029,1003.6953);
    SetPlayerFacingAngle(playerid,179.1290);
    SetPlayerInterior(playerid,17);
    }
    return 1;
    }[/pwn]




    Hoffe ich habe nichts vergessen.
    MFG :S

  • Lasse den Spieler dann noch mit der Funktion SpawnPlayer(playerid); spawnen, und dann unter OnPlayerSpawn gibst du dem Spieler den Skin.
    SetPlayerSkin(playerid,GetPVarInt(playerid,"Skin"));