Hay ich habe in meinem Script ein Fehler den cih und Pawno nicht finden
Code
public OnPlayerDataSave(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
new query[256];
new plrIP[16];
GetPlayerIp(playerid, plrIP, sizeof(plrIP));
format(query,sizeof(query),"UPDATE `user` SET `Level`='%d',`AdminLevel`='%d',`Registered`='%d',`Win1`='%d',`Win2`='%d',`Win3`='%d',`Online`='%d' WHERE (`Name` = '%s')",PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pAdmin],PlayerInfo[playerid][pRegistered],PlayerInfo[playerid][pWin1],PlayerInfo[playerid][pWin2],PlayerInfo[playerid][pWin3],PlayerInfo[playerid][pOnline],PlayerInfo[playerid][pSpielminuten],PlayerInfo[playerid][pSkin],PlayerInfo[playerid][pGeld],PlayerName(playerid));
mysql_query(query);
format(query,sizeof(query),"UPDATE `user` SET `Spielminuten`='%d',`Skin`='%d',`Geld`='%d', WHERE (`Name` = '%s')",PlayerInfo[playerid][pSpielminuten],PlayerInfo[playerid][pSkin],PlayerInfo[playerid][pGeld],PlayerName(playerid));
mysql_query(query);
}
}
return 1;
}
Alles anzeigen
vieleicht findet ihn jemand von euch Danke
beim Register schreibt er auch alles in die Datenbank also Name und PW da das in einem anderen Public gemacht wird
Code
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new pName[MAX_PLAYER_NAME], query[256];
strmid(PlayerInfo[playerid][pKey], (password), 0, strlen((password)), 128);
GetPlayerName(playerid,pName,sizeof(pName));
mysql_real_escape_string(pName,pName);
mysql_real_escape_string(password,password);
format(query,sizeof(query),"INSERT INTO `user` (Name,Passwort) VALUES ('%s',md5('%s'))",pName,password);
mysql_query(query);
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pRegistered] = 1;
OnPlayerDataSave(playerid);
SendClientMessage(playerid, COLOR_GREEN, "Account wurde erstellt.");
SetSpawnInfo(playerid,0,255,0,0,0,0,0,0,0,0,0,0);
SpawnPlayer(playerid);
}
return 1;
}
Alles anzeigen