26.03.2016, 20:37
I create them IG with a command. They show up and save to MySQL. When I load the gamemode, I use this to load them:
It's printing that they have been loaded successfully.
pawn Код:
forward LoadEntrances();
public LoadEntrances()
{
if(cache_num_rows())
{
for(new i = 0; i<cache_num_rows(); i++)
{
new eid = cache_get_field_content_int(i, "ID", mysql);
Entrance[eid][ID] = eid;
Entrance[eid][posX] = cache_get_field_content_float(i, "PosX", mysql);
Entrance[eid][posY] = cache_get_field_content_float(i, "PosY", mysql);
Entrance[eid][posZ] = cache_get_field_content_float(i, "PosZ", mysql);
Entrance[eid][posX] = cache_get_field_content_float(i, "iPosX", mysql);
Entrance[eid][posY] = cache_get_field_content_float(i, "iPosY", mysql);
Entrance[eid][posZ] = cache_get_field_content_float(i, "iPosZ", mysql);
Entrance[eid][VW] = cache_get_field_content_int(i, "VW", mysql);
Entrance[eid][Interior] = cache_get_field_content_int(i, "Interior", mysql);
Entrance[eid][ID] = CreateDynamicPickup(1318, 1, Entrance[eid][posX], Entrance[eid][posY], Entrance[eid][posZ]);
Total_Entrances_Created ++;
printf("[MYSQL] Loading Entrance %d", Entrance[eid][ID]);
}
}
printf("[MYSQL]: %d Entrances have been successfully loaded from the database.", Total_Entrances_Created);
return 1;
}