Hey,
steht oben...
Code:
stock SpielerSpeichern(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
GetPlayerName(playerid,pInfo[playerid][pName],MAX_PLAYER_NAME);
pInfo[playerid][Level] = GetPlayerScore(playerid);
pInfo[playerid][Geld] = GetPlayerMoney(playerid);
mysql_SetInt("accounts", "Level", pInfo[playerid][Level], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Geld", pInfo[playerid][Geld], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Skin", pInfo[playerid][Skin], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Skin2", pInfo[playerid][Skin2], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Geschlecht", pInfo[playerid][Geschlecht], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Haus", pInfo[playerid][Haus], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Alter", pInfo[playerid][Alter], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Fraktion", pInfo[playerid][Fraktion], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Leader", pInfo[playerid][Leader], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Rank", pInfo[playerid][Rank], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Adminlevel", pInfo[playerid][Adminlevel], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Ehrenmember", pInfo[playerid][Ehrenmember], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Kopfgeld", pInfo[playerid][Kopfgeld], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "FSchein", pInfo[playerid][FSchein], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Gebannt", pInfo[playerid][Gebannt], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "PayDay", pInfo[playerid][NextPayday], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "GWD", pInfo[playerid][gwdgrade], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Wanteds", pInfo[playerid][wps], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "Fightstyle", pInfo[playerid][fightstyle], "Name", pInfo[playerid][pName]);
mysql_SetInt("accounts", "C4", pInfo[playerid][HatC4], "Name", pInfo[playerid][pName]);
printf("Spielerdaten vom Spieler %s erfolgreich in der Datenbank gespeichert.",SpielerName(playerid));
}
return 1;
}
stock SpielerLaden(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
GetPlayerName(playerid,pInfo[playerid][pName],MAX_PLAYER_NAME);
pInfo[playerid][Level] = mysql_GetInt("accounts", "Level", "Name", pInfo[playerid][pName]); //Wir holen uns den wert der unter "Level" eingetragen ist und Speichern ihn in unserer Variable.
SetPlayerScore(playerid, pInfo[playerid][Level]);
pInfo[playerid][Geld] = mysql_GetInt("accounts", "Geld", "Name", pInfo[playerid][pName]);
GivePlayerMoney(playerid, pInfo[playerid][Geld]);
pInfo[playerid][Skin] = mysql_GetInt("accounts", "Skin", "Name", pInfo[playerid][pName]);
pInfo[playerid][Haus] = mysql_GetInt("accounts", "Haus", "Name", pInfo[playerid][pName]);
pInfo[playerid][Skin2] = mysql_GetInt("accounts", "Skin2", "Name", pInfo[playerid][pName]);
pInfo[playerid][Geschlecht] = mysql_GetInt("accounts", "Geschlecht", "Name", pInfo[playerid][pName]);
pInfo[playerid][Alter] = mysql_GetInt("accounts", "Alter", "Name", pInfo[playerid][pName]);
pInfo[playerid][Fraktion] = mysql_GetInt("accounts", "Fraktion", "Name", pInfo[playerid][pName]);
pInfo[playerid][Leader] = mysql_GetInt("accounts", "Leader", "Name", pInfo[playerid][pName]);
pInfo[playerid][Rank] = mysql_GetInt("accounts", "Rank", "Name", pInfo[playerid][pName]);
pInfo[playerid][Adminlevel] = mysql_GetInt("accounts", "Adminlevel", "Name", pInfo[playerid][pName]);
pInfo[playerid][Ehrenmember] = mysql_GetInt("accounts", "Ehrenmember", "Name", pInfo[playerid][pName]);
pInfo[playerid][Kopfgeld] = mysql_GetInt("accounts", "Kopfgeld", "Name", pInfo[playerid][pName]);
pInfo[playerid][FSchein] = mysql_GetInt("accounts", "FSchein", "Name", pInfo[playerid][pName]);
pInfo[playerid][Gebannt] = mysql_GetInt("accounts", "Gebannt", "Name", pInfo[playerid][pName]);
pInfo[playerid][NextPayday] = mysql_GetInt("accounts", "PayDay", "Name", pInfo[playerid][pName]);
pInfo[playerid][gwdgrade] = mysql_GetInt("accounts", "GWD", "Name", pInfo[playerid][pName]);
pInfo[playerid][wps] = mysql_GetInt("accounts", "Wanteds", "Name", pInfo[playerid][pName]);
pInfo[playerid][fightstyle] = mysql_GetInt("accounts", "Fightstyle", "Name", pInfo[playerid][pName]);
pInfo[playerid][HatC4] = mysql_GetInt("accounts", "C4", "Name", pInfo[playerid][pName]);
printf("Spielerdaten vom Spieler %s erfolgreich aus der Datenbank geladen",SpielerName(playerid));
SpawnPlayer(playerid);
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(string, sizeof(string), ""CYAN"<< Fraktionsmitglied "ROT1"%s "CYAN"hat sich eingeloggt. >>", name);
SendFraktionMessage(pInfo[playerid][Fraktion],COLOR_WHITE,string);
if(IsPlayerAnAdmin(playerid,1))
{
new string2[256];
format(string2, sizeof(string2), ""GRÜN"<< Teammitglied "ROT1"%s "GRÜN"hat sich eingeloggt. >>", name);
SendAdminMessage(COLOR_WHITE, string2);
}
if(pInfo[playerid][Level] <= 3 || IsPlayerAnAdmin(playerid,1))
{
TogNC[playerid] = 1;
SendClientMessage(playerid, COLOR_PURPLE, "Der Newbiechat ist angeschaltet, benutzen kannst du ihn mit /nc.");
}
}
return 1;
}