Ich habe ein Haussystem gescriptet wo man mit createhaus die coords in die db schreibt aber ichg habe das prob dass die pickups die aufgrund der coords ertellt werden net funzen. wenn createhaus mache gehen die pickups aber wenn ich dann den server neustarte dann sind keine pickups da. Weiss vlt. jemand warum?
stock LoadHaus()
{
MySQLCheck();
new sql[64], fields[25][40], row[255];
format(sql, sizeof(sql), "SELECT COUNT(*) FROM haus");
samp_mysql_query(sql);
//if (DEBUG) SQLLog(sql);
samp_mysql_store_result();
samp_mysql_fetch_row(row);
totalhaus = strval(row);
// samp_mysql_free_result();
for (new i=1; i<totalhaus; i++)
{
format(sql, sizeof(sql), "SELECT * FROM haus WHERE id=%d", i);
samp_mysql_query(sql);
samp_mysql_store_result();
samp_mysql_fetch_row(row);
split(row, fields, '|');
// samp_mysql_free_result();
HausInfo[i][Besitzer] = strins(HausInfo[i][Besitzer],fields[1],0,MAX_PLAYER_NAME);
HausInfo[i][EnterX] = floatstr(fields[2]);
HausInfo[i][EnterY] = floatstr(fields[3]);
HausInfo[i][EnterZ] = floatstr(fields[4]);
HausInfo[i][Interior] = strval(fields[5]);
HausInfo[i][VirtualWorld] = strval(fields[6]);
HausInfo[i][ExitX] = floatstr(fields[7]);
HausInfo[i][ExitY] = floatstr(fields[8]);
HausInfo[i][ExitZ] = floatstr(fields[9]);
HausInfo[i][Preis] = strval(fields[10]);
HausInfo[i][Owned] = strval(fields[11]);
HausInfo[i][Locked] = strval(fields[12]);
// HausInfo[i][id] = strval(fields[12]);
if(HausInfo[i][Owned] == 0)
{
CreatePickup(1273, 1, HausInfo[i][EnterX],HausInfo[i][EnterY],HausInfo[i][EnterZ]);
CreateMapIcon(31,0,HausInfo[i][EnterX],HausInfo[i][EnterY],HausInfo[i][EnterZ]);
}
else
{
CreatePickup(1239, 1, HausInfo[i][EnterX],HausInfo[i][EnterY],HausInfo[i][EnterZ]);
CreateMapIcon(32,0,HausInfo[i][EnterX],HausInfo[i][EnterY],HausInfo[i][EnterZ]);
}
}
format(row, sizeof(row), "LoadHaus(): %d Immobilien geladen", totalhaus);
printf(row);
return 1;
}
das ist der code bitte nur leute die mir helfen können antworten