Hey vielen dank aber ich habe ein Neues Problem beim Laden wird das Fahrzeug Unendlich Oft erstellt aber wieso ?
stock LoadPlayerCars(playerid)
{
new query[265];
mysql_format(dbhandle,query,sizeof(query),"SELECT * FROM car WHERE c_besitzer = '%e'", getPlayerName(playerid));
mysql_pquery(dbhandle, query, "LoadCars", "d", playerid);
return 1;
}
forward LoadCars(playerid);
public LoadCars(playerid)
{
if(cache_get_row_count() == 0) return 1;
printf("1");
for(new i = 0; i < sizeof(cInfo); i++)
{
if(cInfo[i][c_vID] != 0) continue;
cache_get_field_content(i, "c_besitzer", cInfo[i][c_besitzer], dbhandle, 32);
cInfo[i][c_model] = cache_get_field_content_int(0, "c_model", dbhandle);
cInfo[i][c_x] = cache_get_field_content_float(0, "c_x", dbhandle);
cInfo[i][c_y] = cache_get_field_content_float(0, "c_y", dbhandle);
cInfo[i][c_z] = cache_get_field_content_float(0, "c_z", dbhandle);
cInfo[i][c_r] = cache_get_field_content_float(0, "c_r", dbhandle);
cInfo[i][c_color1] = cache_get_field_content_int(0, "c_color1", dbhandle);
cInfo[i][c_color2] = cache_get_field_content_int(0, "c_color2", dbhandle);
cInfo[i][c_vID] = CreateVehicle(cInfo[i][c_model],cInfo[i][c_x],cInfo[i][c_y],cInfo[i][c_z],cInfo[i][c_r],cInfo[i][c_color1],cInfo[i][c_color2],0);
}
return 1;
}
Alles anzeigen