Hallo, eine Frage:
Undzwar, wenn man sich einloggt, stirbt man sofort, zwar an der richtigen Position, aber die Lebensanzeige is direkt bei 0.
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new pname[32]; GetPlayerName(playerid, pname, sizeof(pname));
new ini[64]; format(ini, sizeof(ini), "/fun_rl/%s.ini", pname);
if (dialogid == DIALOG_LOGIN && response == 1)
{
if (strcmp(inputtext, dini_Get(ini, "password")) == 0)
{
pinfo[playerid][level] = dini_Int(ini, "level");
pinfo[playerid][skin] = dini_Int(ini, "skin");
pinfo[playerid][money] = dini_Int(ini, "money");
pinfo[playerid][health] = dini_Int(ini, "health");
pinfo[playerid][wanted] = dini_Int(ini, "wanted");
SetSpawnInfo(playerid, 0, pinfo[playerid][skin], dini_Float(ini, "spawn_x"), dini_Float(ini, "spawn_y"), dini_Float(ini, "spawn_z"), 0, 0, 0, 0, 0, 0, 0);
SpawnPlayer(playerid);
GivePlayerMoney(playerid, pinfo[playerid][money]);
SetPlayerHealth(playerid, pinfo[playerid][health]);
SetPlayerWantedLevel(playerid, pinfo[playerid][wanted]);
SendClientMessage(playerid, COLOR_GREEN, "Du hast dich eingeloggt.");
new string[64]; format(string, sizeof(string), "%s hat den Server betreten.", pname);
SendClientMessageToAll(COLOR_SERVER, string);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Du hast ein falsches Passwort eingegeben!");
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Login", "Bitte gib dein Passwort ein!", "Login", "Abbrechen");
}
}
}