Wenn er ein AddplayerClass macht geht es ja eben nicht!
Versuch evtl mal so..
Mit dem "SetSpawnInfo" musst du dann eben ein bisschen umarbeiten mit Fraktion und so..
X, Y, Z, A = Einfach deine Zivispawn-Koordinaten
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
case DIALOG_LOGIN:
{
if(!strlen(inputtext))
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte logge dich ein:","Weiter","Abbrechen");
return SendClientMessage(playerid,COLOR_RED,"Kein Passwort angegeben!");
}
if(strcmp(inputtext,dini_Get(accFormat,"Passwort")) == 0)
{
Login(playerid,inputtext);
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte logge dich ein:","Weiter","Abbrechen");
SendClientMessage(playerid,COLOR_RED,"Das Passwort war Falsch!");
}
}
}
stock Login(playerid,key[])
{
new accFormat[64], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(accFormat,sizeof(accFormat),"/Accounts/%s.txt",Name);
if(!strcmp(key,dini_Get(accFormat,"Passwort"),false))
{
if(PlayerInfo[playerid][Member] == 0 && PlayerInfo[playerid][Leader] == 0)
{
LoadPlayer(playerid);
pInfo[playerid][Eingeloggt] = 1;
SetSpawnInfo(playerid,0,PlayerInfo[playerid][pSkin],x,y,z,a,0,0,0,0,0,0);
SendClientMessage(playerid,COLOR_RED,"Du wurdest erfolgreich eingeloggt.");
SpawnPlayer(playerid);
}
return 1;
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Bitte logge dich ein:","Weiter","Abbrechen");
SendClientMessage(playerid,COLOR_RED,"Das Passwort war Falsch!");
return 1;
}
}
stock LoadPlayer(playerid)
{
new accFormat[64], Name[MAX_PLAYER_NAME];
GetPlayerName(playerid,Name,sizeof(Name));
format(accFormat,sizeof(accFormat),"/Accounts/%s.txt",Name);
if(dini_Exists(accFormat))
{
pInfo[playerid][Wanted] = dini_Int(accFormat,"Wanted");
pInfo[playerid][Geld] = dini_Int(accFormat,"Geld");
pInfo[playerid][Skin] = dini_Int(accFormat,"Skin");
pInfo[playerid][Tutorial] = dini_Int(accFormat,"Tutorial");
pInfo[playerid][Alter] = dini_Int(accFormat,"Alter");
pInfo[playerid][Geschlecht] = dini_Int(accFormat,"Geschlecht");
pInfo[playerid][Member] = dini_Int(accFormat,"Member");
pInfo[playerid][Leader] = dini_Int(accFormat,"Leader");
pInfo[playerid][AdminLvl] = dini_Int(accFormat,"AdminLvl");
SetPlayerSkin(playerid,pInfo[playerid][Skin]);
GivePlayerMoney(playerid,pInfo[playerid][Geld]);
SetPlayerWantedLevel(playerid,pInfo[playerid][Wanted]);
printf("Accounts: %s erfolgreich geladen!",Name);
}
return 1;
}