stock SavePlayer(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
if(GetPVarInt(playerid,"Eingeloggt") == 1)
{
new query[500];
SpielerInfo[playerid][pGeld] = GetPlayerMoney(playerid);
format(query, sizeof(query), "UPDATE `accounts` SET `Level`='%d', `Geld`='%d', `Adminlevel`='%d', `Language`='%d', `Cop`='%d', `Banned`='%d', `Bank`='%d' WHERE `Name`='%s'",
SpielerInfo[playerid][pLevel],
SpielerInfo[playerid][pGeld],
SpielerInfo[playerid][pAdminlevel],
SpielerInfo[playerid][pLanguage],
SpielerInfo[playerid][pCop],
SpielerInfo[playerid][pBanned],
SpielerInfo[playerid][pBank],
GetSpielerName(playerid));
mysql_query(query);
}
}
return 1;
}
stock LoadPlayer(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))
{
GetPlayerName(playerid, SpielerInfo[playerid][pName], MAX_PLAYER_NAME);
SpielerInfo[playerid][pLevel] = mysql_GetInt("accounts", "Level", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][pGeld] = mysql_GetInt("accounts", "Geld", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][pAdminlevel] = mysql_GetInt("accounts", "Adminlevel", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][pLanguage] = mysql_GetInt("accounts", "Language", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][pCop] = mysql_GetInt("accounts", "Cop", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][pBanned] = mysql_GetInt("accounts", "Banned", "Name", SpielerInfo[playerid][pName]);
SpielerInfo[playerid][pBank] = mysql_GetInt("accounts", "Bank", "Name", SpielerInfo[playerid][pBank]);
if(GetPVarInt(playerid, "Banned") == 1)
}
return 1;
}