Hallo Community,
irgendwie buggt grad voll das Speichern mit den Skins rum
Also er speichert alles andere aber nicht den Skin..
Hier mal der Code:
stock AccountLaden(playerid){
new Playerdatei[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdatei,sizeof(Playerdatei),"/Accounts/%s.ini",name);
SetPlayerScore(playerid,dini_Int(Playerdatei,"Level"));
Spieler[playerid][Adminlevel] = dini_Int(Playerdatei,"Adminlevel");
Spieler[playerid][Team] = dini_Int(Playerdatei,"Team");
SetPlayerSkin(playerid,dini_Int(Playerdatei,"Skin"));
Spieler[playerid][Krankenhaus] = dini_Int(Playerdatei,"Krankenhaus");
SetPVarInt(playerid,"Eingeloggt",1);
SpawnPlayer(playerid);
return 1;
}
stock SpielerSpeichern(playerid){
if(GetPVarInt(playerid,"Eingeloggt") == 1){
new Playerdatei[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdatei,sizeof(Playerdatei),"/Accounts/%s.ini",name);
dini_IntSet(Playerdatei,"Level",GetPlayerScore(playerid));
dini_IntSet(Playerdatei,"Adminlevel",Spieler[playerid][Adminlevel]);
dini_IntSet(Playerdatei,"Team",Spieler[playerid][Team]);
dini_IntSet(Playerdatei,"Skin",GetPlayerSkin(playerid));
dini_IntSet(Playerdatei,"Krankenhaus",Spieler[playerid][Krankenhaus]);
}
}