Guten Tag,
Mein Name lautet CIBERKILLER.
Und zwar hatte ich diesen Gamemode vor 6 Monaten geschrieben, möchte ich nun aber zum "meisterwerk" machen, zuerst einmal habe ich das ganze auf MySQL umgeschrieben.
Damals habe ich aber mysql_getint benutzt (maddin like<3).
Jetzt arbeite ich aber mit while & mysql_retrive_row().
Und wenn der Spieler geladen wird stürzt der Server ab.
Skriptcode:
stock SpielerLaden(playerid)
{
ShowEuro(playerid);
new query[128];
format(query, sizeof(query), "SELECT * FROM `acc` WHERE `Name`='%s'", GetName(playerid));
mysql_query(query); mysql_store_result();
while(mysql_retrieve_row())
{
mysql_fetch_field_row(query, "id"), sStats[playerid][sSQLID] = strval(query);
mysql_fetch_field_row(query, "Euro"), SetPlayerEuro(playerid, strval(query));
mysql_fetch_field_row(query, "Level"), SetPlayerScore(playerid, strval(query));
mysql_fetch_field_row(sStats[playerid][sGeschlecht], "Geschlecht");
mysql_fetch_field_row(query, "Kleidung"), sStats[playerid][sKleidung] = strval(query);
mysql_fetch_field_row(query, "Adminlevel"), sStats[playerid][sAdmin] = strval(query);
mysql_fetch_field_row(query, "Alter"), sStats[playerid][sAlter] = strval(query);
mysql_fetch_field_row(query, "Armor"), sStats[playerid][sArmor] = floatstr(query);
mysql_fetch_field_row(query, "Wanted"), sStats[playerid][sWanted] = strval(query);
mysql_fetch_field_row(query, "Fraktion"), sStats[playerid][sFraktion] = strval(query);
mysql_fetch_field_row(query, "Nummer"), sStats[playerid][sNummer] = strval(query);
mysql_fetch_field_row(query, "Bankguthaben"), sStats[playerid][sBankMoney] = strval(query);
mysql_fetch_field_row(query, "Fahrschein"), sStats[playerid][sCarLic] = strval(query);
mysql_fetch_field_row(query, "Motorradschein"), sStats[playerid][sMotorradLic] = strval(query);
mysql_fetch_field_row(query, "Flugschein"), sStats[playerid][sFlugLic] = strval(query);
mysql_fetch_field_row(query, "Truckerschein"), sStats[playerid][sTruckerLic] = strval(query);
mysql_fetch_field_row(query, "Waffenschein"), sStats[playerid][sWaffenLic] = strval(query);
mysql_fetch_field_row(query, "Beruf"), sStats[playerid][sBeruf] = strval(query);
mysql_fetch_field_row(query, "Gehalt"), sStats[playerid][sGehalt] = strval(query);
mysql_fetch_field_row(query, "Rang"), sStats[playerid][sRang] = strval(query);
mysql_fetch_field_row(query, "Hitsound"), sStats[playerid][sHitsound] = strval(query);
mysql_fetch_field_row(query, "Autologin"), sStats[playerid][sAutologin] = strval(query);
mysql_fetch_field_row(sStats[playerid][sSpawn], "Spawn");
}
mysql_free_result();
SetPlayerArmour(playerid, sStats[playerid][sArmor]);
TextDrawHideForPlayer(playerid,Textdraw[4]);
TextDrawHideForPlayer(playerid,Textdraw[5]);
TextDrawHideForPlayer(playerid,Textdraw[6]);
TextDrawHideForPlayer(playerid,Textdraw[7]);
TextDrawHideForPlayer(playerid,Textdraw[8]);
SetCameraBehindPlayer(playerid);
Spawn(playerid);
sStats[playerid][Eingeloggt] = 1;
SetTimerEx("eingeloggtmove", 250, false, "i", playerid);
//Zivispawn - VIP
Schild[0]=CreatePlayerObject(playerid, 19353, 1666.5688, -1901.3144, 15.6568, 0.0000, 0.0000, 82.6349);
SetPlayerObjectMaterialText(playerid, Schild[0], "V.I.P", 0, 50, "Arial", 24, 0, -16776961, 0, 1);
Schild[1] = CreatePlayerObject(playerid, 19353, 1660.3814, -1892.7495, 16.8083, -0.1000, 1.5000, -179.9973);
SetPlayerObjectMaterialText(playerid, Schild[1], "Zivispawn", 0, 100, "Courier New", 45, 0, -65536, 0, 1);
return 1;
}
Wenn ich es ausklammere Funktioniert alles (bis auf das Laden xD).
Sollte ich das mal Debuggen was meint ihr leute ?
Mit freundlichen Grüßen,
CIBERKILLER