Wenn ich mich einlogge, will ich einen Skin wählen, den das Script dann Speichert und jedes mal wenn ich mich dann Ingame einlogge auch benutzt. Jedoch spawne ich immer mit dem CJ Skin, auch wenn ich ein anderen ausgewählt habe..
enum SpielerInfo
{
Level,
Admin,
Skin
}
new Spieler[MAX_PLAYERS][SpielerInfo];
public OnGameModeInit()
{
SetGameModeText("Name");
UsePlayerPedAnims();
ShowPlayerMarkers(0);
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(219, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(220, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(221, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(222, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetupPlayerForClassSelection(playerid);
switch (classid)
{
case 0: { GameTextForPlayer(playerid, "~g~Skin 1", 1200, 3); }
case 1: { GameTextForPlayer(playerid, "~y~Skin 2", 1200, 3); }
case 2: { GameTextForPlayer(playerid, "~r~Skin 3", 1200, 3); }
case 3: { GameTextForPlayer(playerid, "~b~Skin 4", 1200, 3); }
}
return 1;
}
public SetupPlayerForClassSelection(playerid)
{
SetPlayerInterior(playerid,11);
SetPlayerPos(playerid,508.7362,-87.4335,998.9609);
SetPlayerCameraPos(playerid,508.7362,-83.4335,998.9609);
SetPlayerCameraLookAt(playerid,508.7362,-87.4335,998.9609);
SetPlayerFacingAngle(playerid,0.0);
}
public OnPlayerSpawn(playerid)
{
new Playerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdatei,sizeof(Playerdatei),"/Accounts/%s.ini",name);
SetPlayerSkin(playerid, dini_Int(Playerdatei,"Skin"));
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1568.6803,-1692.5853,5.8906);
return 1;
}
stock AccountLaden(playerid)
{
new Playerdatei[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdatei,sizeof(Playerdatei),"/Accounts/%s.ini",name);
Spieler[playerid][Level] = dini_Int(Playerdatei,"Level");
Spieler[playerid][Admin] = dini_Int(Playerdatei,"Admin");
SetPlayerSkin(playerid, dini_Int(Playerdatei, "Skin"));
SetPVarInt(playerid,"Eingeloggt",1);
return 1;
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"Eingeloggt") == 1)
{
new Playerdatei[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Playerdatei,sizeof(Playerdatei),"/Accounts/%s.ini",name);
dini_IntSet(Playerdatei, "Level", Spieler[playerid][Level]);
dini_IntSet(Playerdatei, "Admin", Spieler[playerid][Admin]);
dini_IntSet(Playerdatei, "Skin", GetPlayerSkin(playerid));
}
}
Freue mich ueber jede Hilfe
Edit: Push, keiner eine Idee woran es liegen koennte?