Hallo Leute .. ich will , dass wenn man schon einen Skin zuvor ausgewählt hatte "nach dem Registrieren" ..dass dann der spieler direkt spawnt mit dem Skin der gespeichert werden soll nach dem man disconectet
public OnGameModeInit()
{
AddPlayerClass(1,2047.4270,1336.5569,10.6719,188.9284,0,0,0,0,0,0);
AddPlayerClass(2,2047.4270,1336.5569,10.6719,188.9284,0,0,0,0,0,0);
AddPlayerClass(3,2047.4270,1336.5569,10.6719,188.9284,0,0,0,0,0,0);
AddPlayerClass(4,2047.4270,1336.5569,10.6719,188.9284,0,0,0,0,0,0);
AddPlayerClass(5,2047.4270,1336.5569,10.6719,188.9284,0,0,0,0,0,0);
AddPlayerClass(6,2047.4270,1336.5569,10.6719,188.9284,0,0,0,0,0,0);
AddPlayerClass(7,2047.4270,1336.5569,10.6719,188.9284,0,0,0,0,0,0);
}
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))return 1;
SetPlayerPos(playerid,2047.4270,1336.5569,10.6719);
SetPlayerFacingAngle(playerid,188.9284);
SetPlayerCameraPos(playerid,2047.6205,1333.3314,10.6719);
SetPlayerCameraLookAt(playerid,2047.4270,1336.5569,10.6719);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
SpielerSpeichern(playerid);
}
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
dini_IntSet(Spielerdatei,"SkinID",GetPlayerSkin(playerid));
..................
}
return 1;
}
stock LoadAccount(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.txt",name);
SetPlayerSkin(playerid,dini_Int(Spielerdatei,"SkinID"));
.........
return 1;
}