Hallo,
habe leider immernoch ein Problem beim Speichern und zwar wird einfach nichts in die Tabelle eingetragen.
Hier mal der Code:
public OnPlayerConnect(playerid)
{
SetPlayerMapIcon(playerid,62,2488.4680,-1664.7520,13.3438,62, 1);//grove
SetPlayerMapIcon(playerid,59,1785.2446,-1904.3571,13.3932,59, 1);//ballas
SetPlayerMapIcon(playerid, 22,1176.9657,-1322.6366,14.0474, 22, 1);//Medic
SetPlayerMapIcon(playerid,36,-2026.9082,-91.9935,35.3203,36, 1);//Fahrschule
SetPlayerMapIcon(playerid,56,289.5088,-1627.6656,33.3381,56, 1);//Arbeitsamt
SetPlayerMapIcon(playerid,30,1550.2314,-1675.3286,15.3149,30, 1);//LSPD
SetPlayerMapIcon(playerid,61,2274.2861,2054.8062,10.8203,61, 1);//Yakuza
SetPlayerMapIcon(playerid,58,1643.9701,990.0135,10.5923,58, 1);//LVR
SetPlayerMapIcon(playerid,60,1428.5942,730.5257,10.8203,60, 1);//La Cosa Nostra
///Uhr
gettime(stunde,Minute);
SetPlayerTime(playerid,stunde,Minute);
///
SetPVarInt(playerid,"Call",-1);
SetPVarInt(playerid,"Anrufer",-1);
SetPVarInt(playerid,"Handystatus",1);
RemoveBuildingForPlayer(playerid, 11372, -2076.4375, -107.9297, 36.9688, 0.25);
{
new string[40];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string), "%s hat den Server betreten.", name);
SendClientMessageToAll(Gruen, string);
if(mysql_CheckAccount(playerid) == 1)
{
ShowPlayerDialog(playerid,DIALOG_Login,DIALOG_STYLE_PASSWORD,"Login","Dein Account wurde gefunden. Gib bitte das Passwort ein.","Login","Abbrechen");
}
else
{
ShowPlayerDialog(playerid,DIALOG_Register,DIALOG_STYLE_INPUT,"Registrieren","Gib bitte das gewünschte Passwort ein:","Register","Abbrechen");
}
{
SetPVarInt(playerid,"Nebenjob",0);
truckercheckpoint[playerid] = 0;
fscp[playerid] = 0;
acceptrepair[playerid] = 0;
acceptheal[playerid] = 0;
ticket[playerid] = 0;
SavePlayer(playerid);
}
}
return 1;
}
Und hier der Stock:
stock SavePlayer(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid)) //wir überprüfen ob der Spieler überhaupt noch Connected ist und ob er nicht ein NPC ist.
{
if(GetPVarInt(playerid,"Eingeloggt") == 1) //Und hier ob er noch eingeloggt ist.
{
mysql_SetInt("accounts", "Level", 12, "Name", SpielerName(playerid));
mysql_SetInt("accounts", "Geld", 300, "Name", SpielerName(playerid));
mysql_SetInt("accounts", "Kills", 10, "Name", SpielerName(playerid));
mysql_SetInt("accounts", "Tode", 5, "Name", SpielerName(playerid));
mysql_SetFloat("accounts", "Health", 10.0, "Name", SpielerName(playerid));
}
}
return 1;
}
Verbindungs Daten stimmen soweit