public savetimer(playerid)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
SpielerSpeichern(playerid);
}
return 1;
}
stock SpielerSpeichern(playerid)
{
if(GetPVarInt(playerid,"loggedin")==1)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
new string[949],mysql[128];
format(mysql, sizeof(mysql), "fuehrerschein='%d',",GetPVarInt(playerid,"Fuehrerschein"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "flugschein='%d',",GetPVarInt(playerid,"flugschein"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "bootschein='%d',",GetPVarInt(playerid,"bootschein"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "lkwschein='%d',",GetPVarInt(playerid,"LKWschein"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "waffenschein='%d',",GetPVarInt(playerid,"Waffenschein"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "motorradschein='%d',",GetPVarInt(playerid,"Motorradschein"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "level='%d',",GetPlayerScore(playerid));
strcat(string, mysql);
format(mysql, sizeof(mysql), "spielzeit='%d',",GetPVarInt(playerid,"spielzeit"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "geld='%d',",GetPlayerMoney(playerid));
strcat(string, mysql);
format(mysql, sizeof(mysql), "adminlevel='%d',",GetPVarInt(playerid,"Adminlevel"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "suplevel='%d',",GetPVarInt(playerid,"Suplevel"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "maprang='%d',",GetPVarInt(playerid,"Maprang"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "fraktion='%d',",GetPVarInt(playerid,"fraktion"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "banned='%d',",GetPVarInt(playerid,"Baned"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "perso='%d',",GetPVarInt(playerid,"Perso"));
strcat(string, mysql);
if(Tot[playerid] == 0)
{
format(mysql, sizeof(mysql), "skinID='%d',",GetPlayerSkin(playerid));
strcat(string, mysql);
}
format(mysql, sizeof(mysql), "zeitseitpd='%d',",GetPVarInt(playerid,"ZeitSeitPD"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "vip='%d',",GetPVarInt(playerid,"VIP"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "punkte='%d',",GetPVarInt(playerid,"punkte"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "kopfgeld='%d',",GetPVarInt(playerid,"kopfgeld"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "job='%d',",GetPVarInt(playerid,"JOB"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "jobzeit='%d',",GetPVarInt(playerid,"JobZeit"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "jobzeit='%d',",GetPVarInt(playerid,"JobZeit"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "mautpass='%d',",GetPVarInt(playerid,"mautpass"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "rang='%d',",GetPVarInt(playerid,"Rang"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "phonek='%d',",GetPVarInt(playerid,"Phonek"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "handytyp='%d',",GetPVarInt(playerid,"handytyp"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "telebuch='%d',",GetPVarInt(playerid,"Telebuch"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "pnummer='%d',",GetPVarInt(playerid,"Pnummer"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "drogen='%d',",GetPVarInt(playerid,"drogen"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "mats='%d',",GetPVarInt(playerid,"mats"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "SpawnHaus='%d',",GetPVarInt(playerid,"SpawnHaus"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "knastid='%d',",GetPVarInt(playerid,"KnastID"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "knastzeit='%d',",GetPVarInt(playerid,"KnastZeit"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "respektpunkte='%d',",GetPVarInt(playerid,"Respektpunkte"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "respekt='%d',",GetPVarInt(playerid,"Respekt"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "levelmoney='%d',",GetPVarInt(playerid,"LevelMoney"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "bank='%d',",GetPVarInt(playerid,"Bank"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "hauskey='%d',",GetPVarInt(playerid,"HausKey"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "wanted='%d',",GetPVarInt(playerid,"Wanted"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "jobgeld='%d',",GetPVarInt(playerid,"jobgeld"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "leader='%d',",GetPVarInt(playerid,"Leader"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "invite='%d',",GetPVarInt(playerid,"invite"));
strcat(string, mysql);
format(mysql, sizeof(mysql), "geschlecht='%d'",GetPVarInt(playerid,"Geschlecht"));
strcat(string, mysql);
new query[999];
format(query, 999, "UPDATE benutzer SET %s WHERE name = '%s'",string,SpielerName(playerid));
mysql_query(query);
}
return 1;
}
Beim Register und Login wird immer loggedin auf 1 gesetz, trotzdem wird leider nix gespeichert.
Mysql verbindung steht.
mfg